From d9b41d6c292feaa829603b0215830109463ce74f Mon Sep 17 00:00:00 2001 From: Pantelis Malekas Date: Tue, 4 Aug 2026 11:25:16 +0300 Subject: [PATCH 1/2] feat: add optional ingress case --- charts/hypo/templates/fabric-api/ingress.yaml | 2 +- charts/hypo/templates/grafana/ingress.yaml | 2 +- charts/hypo/templates/peering-api/ingress.yaml | 2 +- charts/hypo/templates/portal/ingress.yaml | 2 +- charts/hypo/templates/prometheus/ingress.yaml | 2 +- charts/hypo/templates/tmf-api/ingress.yaml | 2 +- charts/hypo/values.yaml | 4 ++++ 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/charts/hypo/templates/fabric-api/ingress.yaml b/charts/hypo/templates/fabric-api/ingress.yaml index 0175fa2..65cc996 100644 --- a/charts/hypo/templates/fabric-api/ingress.yaml +++ b/charts/hypo/templates/fabric-api/ingress.yaml @@ -1,6 +1,6 @@ {{ $ingressNginx := index .Values "ingress-nginx" }} {{ $fabricApi := index .Values "fabric-api" }} -{{- if $fabricApi.enabled -}} +{{- if and $fabricApi.enabled $fabricApi.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/hypo/templates/grafana/ingress.yaml b/charts/hypo/templates/grafana/ingress.yaml index f157f00..7ef2012 100644 --- a/charts/hypo/templates/grafana/ingress.yaml +++ b/charts/hypo/templates/grafana/ingress.yaml @@ -1,6 +1,6 @@ {{ $ingressNginx := index .Values "ingress-nginx" }} {{ $kubePrometheusStack := index .Values "kube-prometheus-stack" }} -{{- if $kubePrometheusStack.setup -}} +{{- if and $kubePrometheusStack.setup $kubePrometheusStack.grafana.ingress.setup -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/hypo/templates/peering-api/ingress.yaml b/charts/hypo/templates/peering-api/ingress.yaml index 0834931..84e2e70 100644 --- a/charts/hypo/templates/peering-api/ingress.yaml +++ b/charts/hypo/templates/peering-api/ingress.yaml @@ -1,6 +1,6 @@ {{ $ingressNginx := index .Values "ingress-nginx" }} {{ $peeringApi := index .Values "peering-api" }} -{{- if $peeringApi.enabled -}} +{{- if and $peeringApi.enabled $peeringApi.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/hypo/templates/portal/ingress.yaml b/charts/hypo/templates/portal/ingress.yaml index e90712e..a6a4683 100644 --- a/charts/hypo/templates/portal/ingress.yaml +++ b/charts/hypo/templates/portal/ingress.yaml @@ -1,5 +1,5 @@ {{ $ingressNginx := index .Values "ingress-nginx" }} -{{- if .Values.portal.enabled -}} +{{- if and .Values.portal.enabled .Values.portal.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/hypo/templates/prometheus/ingress.yaml b/charts/hypo/templates/prometheus/ingress.yaml index 94fe1d8..0bd300b 100644 --- a/charts/hypo/templates/prometheus/ingress.yaml +++ b/charts/hypo/templates/prometheus/ingress.yaml @@ -1,6 +1,6 @@ {{ $ingressNginx := index .Values "ingress-nginx" }} {{ $kubePrometheusStack := index .Values "kube-prometheus-stack" }} -{{- if $kubePrometheusStack.setup -}} +{{- if and $kubePrometheusStack.setup $kubePrometheusStack.prometheus.ingress.setup -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/hypo/templates/tmf-api/ingress.yaml b/charts/hypo/templates/tmf-api/ingress.yaml index a683276..fe377cb 100644 --- a/charts/hypo/templates/tmf-api/ingress.yaml +++ b/charts/hypo/templates/tmf-api/ingress.yaml @@ -1,6 +1,6 @@ {{ $ingressNginx := index .Values "ingress-nginx" }} {{ $tmfApi := index .Values "tmf-api" }} -{{- if $tmfApi.enabled -}} +{{- if and $tmfApi.enabled $tmfApi.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/hypo/values.yaml b/charts/hypo/values.yaml index 08d5ab8..0ffd3dd 100644 --- a/charts/hypo/values.yaml +++ b/charts/hypo/values.yaml @@ -769,6 +769,8 @@ kube-prometheus-stack: port: 3000 targetPort: 3000 nodePort: 30030 + ingress: + setup: true persistence: type: pvc enabled: true @@ -879,6 +881,8 @@ kube-prometheus-stack: port: 9090 targetPort: 9090 nodePort: 30090 + ingress: + setup: true prometheusSpec: externalUrl: http://__NODE_IP__:30713/prometheus routePrefix: /prometheus -- GitLab From 41be18c6143bd5b7ba65679c95bb2f4ca65e3487 Mon Sep 17 00:00:00 2001 From: Pantelis Malekas Date: Wed, 5 Aug 2026 17:27:26 +0300 Subject: [PATCH 2/2] fix: corrected ingress job and paths --- charts/hypo/templates/grafana/job.yaml | 16 ++++++++++-- .../hypo/templates/portal-cart/ingress.yaml | 2 +- .../hypo/templates/registry-api/ingress.yaml | 26 +++++++++++++++++++ charts/hypo/values.yaml | 6 +++++ 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 charts/hypo/templates/registry-api/ingress.yaml diff --git a/charts/hypo/templates/grafana/job.yaml b/charts/hypo/templates/grafana/job.yaml index 431b2ee..4130eb1 100644 --- a/charts/hypo/templates/grafana/job.yaml +++ b/charts/hypo/templates/grafana/job.yaml @@ -86,12 +86,24 @@ spec: echo "Found Prometheus CR: ${PROM}" + {{- if $kubePrometheusStack.prometheus.ingress.setup }} + + EXTERNAL_URL="http://${NODE_IP}:{{ $ingressNginx.controller.service.nodePorts.http }}/prometheus" + + {{- else }} + + EXTERNAL_URL="http://${NODE_IP}:{{ $kubePrometheusStack.prometheus.service.nodePort }}" + + {{- end }} + + echo "Setting Prometheus external URL to: ${EXTERNAL_URL}" + kubectl patch prometheus "${PROM}" \ -n "${RELEASE_NAMESPACE}" \ --type merge \ -p "{ \"spec\": { - \"externalUrl\": \"http://${NODE_IP}:{{ $ingressNginx.controller.service.nodePorts.http }}/prometheus\" + \"externalUrl\": \"${EXTERNAL_URL}\" } }" - + diff --git a/charts/hypo/templates/portal-cart/ingress.yaml b/charts/hypo/templates/portal-cart/ingress.yaml index e0aedb6..7e9fa55 100644 --- a/charts/hypo/templates/portal-cart/ingress.yaml +++ b/charts/hypo/templates/portal-cart/ingress.yaml @@ -1,6 +1,6 @@ {{ $ingressNginx := index .Values "ingress-nginx" }} {{ $portalCart := index .Values "portal-cart" }} -{{- if $portalCart.enabled -}} +{{- if and $portalCart.enabled $portalCart.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/hypo/templates/registry-api/ingress.yaml b/charts/hypo/templates/registry-api/ingress.yaml new file mode 100644 index 0000000..5954333 --- /dev/null +++ b/charts/hypo/templates/registry-api/ingress.yaml @@ -0,0 +1,26 @@ +{{ $ingressNginx := index .Values "ingress-nginx" }} +{{ $registryApi := index .Values "registry-api" }} +{{- if and $registryApi.enabled $registryApi.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ template "hypo.registry-api.fullname" . }} + namespace: {{ .Release.Namespace }} + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "false" +spec: + ingressClassName: {{ $ingressNginx.controller.ingressClass }} + rules: + - http: + paths: + - path: /registry-api + pathType: Prefix + backend: + service: + name: {{ template "hypo.registry-api.fullname" . }} + port: + number: {{ $registryApi.service.port }} + {{ if eq .Values.installation "prod" }} + host: hyper-orchestrator.eu + {{- end }} +{{- end -}} diff --git a/charts/hypo/values.yaml b/charts/hypo/values.yaml index 0ffd3dd..b807823 100644 --- a/charts/hypo/values.yaml +++ b/charts/hypo/values.yaml @@ -302,6 +302,9 @@ portal-cart: port: 8101 nodePort: 30092 + ingress: + enabled: true + securityContext: {} resources: {} @@ -447,6 +450,9 @@ registry-api: port: 8091 nodePort: 30094 + ingress: + enabled: true + securityContext: {} resources: {} -- GitLab