From 6a7cf71f84ed0f16e684955cdab785fe918ad053 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Mon, 16 Mar 2026 00:26:38 +0100 Subject: [PATCH] Added homepage autodiscovery to helm charts --- helm/shorefront/templates/_helpers.tpl | 4 ++++ helm/shorefront/templates/backend-deployment.yaml | 1 + helm/shorefront/templates/frontend-deployment.yaml | 1 + helm/shorefront/templates/ingress.yaml | 3 +++ helm/shorefront/templates/postgres-deployment.yaml | 1 + helm/shorefront/values.yaml | 10 ++++++++++ 6 files changed, 20 insertions(+) diff --git a/helm/shorefront/templates/_helpers.tpl b/helm/shorefront/templates/_helpers.tpl index f212885..c376995 100644 --- a/helm/shorefront/templates/_helpers.tpl +++ b/helm/shorefront/templates/_helpers.tpl @@ -7,3 +7,7 @@ app.kubernetes.io/name: {{ include "shorefront.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} + +{{- define "shorefront.podLabels" -}} +app.kubernetes.io/name: {{ include "shorefront.name" . }} +{{- end }} diff --git a/helm/shorefront/templates/backend-deployment.yaml b/helm/shorefront/templates/backend-deployment.yaml index 8428e1f..e9970ae 100644 --- a/helm/shorefront/templates/backend-deployment.yaml +++ b/helm/shorefront/templates/backend-deployment.yaml @@ -15,6 +15,7 @@ spec: metadata: labels: app: backend + {{- include "shorefront.podLabels" . | nindent 8 }} spec: initContainers: - name: migrate diff --git a/helm/shorefront/templates/frontend-deployment.yaml b/helm/shorefront/templates/frontend-deployment.yaml index d4bc284..864e5a9 100644 --- a/helm/shorefront/templates/frontend-deployment.yaml +++ b/helm/shorefront/templates/frontend-deployment.yaml @@ -15,6 +15,7 @@ spec: metadata: labels: app: frontend + {{- include "shorefront.podLabels" . | nindent 8 }} spec: containers: - name: frontend diff --git a/helm/shorefront/templates/ingress.yaml b/helm/shorefront/templates/ingress.yaml index 4a83189..9849b0e 100644 --- a/helm/shorefront/templates/ingress.yaml +++ b/helm/shorefront/templates/ingress.yaml @@ -7,6 +7,9 @@ metadata: {{- include "shorefront.labels" . | nindent 4 }} annotations: traefik.ingress.kubernetes.io/router.entrypoints: web,websecure + {{- with .Values.ingress.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: ingressClassName: {{ .Values.ingress.ingressClassName }} rules: diff --git a/helm/shorefront/templates/postgres-deployment.yaml b/helm/shorefront/templates/postgres-deployment.yaml index e7859a3..21a2d59 100644 --- a/helm/shorefront/templates/postgres-deployment.yaml +++ b/helm/shorefront/templates/postgres-deployment.yaml @@ -15,6 +15,7 @@ spec: metadata: labels: app: postgres + {{- include "shorefront.podLabels" . | nindent 8 }} spec: securityContext: runAsUser: {{ .Values.postgres.runAsUser }} diff --git a/helm/shorefront/values.yaml b/helm/shorefront/values.yaml index b78dc99..7042472 100644 --- a/helm/shorefront/values.yaml +++ b/helm/shorefront/values.yaml @@ -34,6 +34,16 @@ nfs: ingress: host: shorefront.baumann.gr ingressClassName: traefik + annotations: + gethomepage.dev/enabled: "true" + gethomepage.dev/name: "Shorefront" + gethomepage.dev/description: "Shorewall management system" + gethomepage.dev/group: "Kubernetes" + gethomepage.dev/icon: "" + gethomepage.dev/href: "https://shorefront.baumann.gr" + gethomepage.dev/ping: "https://shorefront.baumann.gr" + gethomepage.dev/pod-selector: "app.kubernetes.io/name=shorefront" + keycloak: url: https://sso.baumann.gr