From cd6b594caba5f81b09376e3e10a3fefd2086b654 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Thu, 2 Nov 2023 08:02:36 +0100 Subject: [PATCH] Added template variables --- helm/argocd/templates/app-of-apps.yaml | 4 ++-- helm/argocd/templates/argocd-ingress.yaml | 6 +++--- helm/argocd/values.yaml | 13 ++++++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/helm/argocd/templates/app-of-apps.yaml b/helm/argocd/templates/app-of-apps.yaml index 1d44774..276bda7 100644 --- a/helm/argocd/templates/app-of-apps.yaml +++ b/helm/argocd/templates/app-of-apps.yaml @@ -14,6 +14,6 @@ spec: server: https://kubernetes.default.svc project: default source: - path: argocd/app-of-apps/test - repoURL: https://git.2martens.de/2martens/cloud-configuration/ + path: {{ tpl .Values.appOfApps.path . }} + repoURL: {{ .Values.appOfApps.repoURL }} targetRevision: main \ No newline at end of file diff --git a/helm/argocd/templates/argocd-ingress.yaml b/helm/argocd/templates/argocd-ingress.yaml index de73e18..5aed2dc 100644 --- a/helm/argocd/templates/argocd-ingress.yaml +++ b/helm/argocd/templates/argocd-ingress.yaml @@ -4,7 +4,7 @@ metadata: name: argocd-server-ingress namespace: argocd annotations: - cert-manager.io/cluster-issuer: lets-encrypt + cert-manager.io/cluster-issuer: {{ .Values.ingress.certIssuer }} ingress.kubernetes.io/rewrite-target: / nginx.ingress.kubernetes.io/ssl-passthrough: "true" # If you encounter a redirect loop or are getting a 307 response code @@ -14,7 +14,7 @@ metadata: spec: ingressClassName: public rules: - - host: argocd.2martens.de + - host: {{ tpl .Values.ingress.host . }} http: paths: - path: / @@ -26,5 +26,5 @@ spec: name: https tls: - hosts: - - argocd.k8s.{{ .Values.environment }}.2martens.de + - {{ tpl .Values.ingress.host . }} secretName: argocd-server-tls # as expected by argocd-server \ No newline at end of file diff --git a/helm/argocd/values.yaml b/helm/argocd/values.yaml index 6a8905d..61abd2d 100644 --- a/helm/argocd/values.yaml +++ b/helm/argocd/values.yaml @@ -1 +1,12 @@ -environment: test \ No newline at end of file +appOfApps: + repoURL: https://git.2martens.de/2martens/cloud-configuration/ + # variable is templated + path: argocd/app-of-apps/{{ .Values.environment }} + +ingress: + # variable is templated + host: argocd.k8s.{{ .Values.environment }}.2martens.de + certIssuer: lets-encrypt + +# should be overriden for the specific installation +environment: \ No newline at end of file