From 3df1a0e5a83338215f2a1cf87e8ce50ea20bf399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Thu, 22 Apr 2021 10:00:05 +0200 Subject: [PATCH] Mount to correct server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Oliver Bähler --- charts/argo-cd/templates/_helpers.tpl | 2 +- .../templates/argocd-configs/argocd-styles-cm.yaml | 2 +- .../templates/argocd-repo-server/deployment.yaml | 10 ---------- charts/argo-cd/templates/argocd-server/deployment.yaml | 10 ++++++++++ charts/argo-cd/values.yaml | 5 +++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index ab619393..79723e71 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -167,6 +167,6 @@ Merge Argo Configuration with Preset Configuration */}} {{- define "argo-cd.config" -}} {{- if .Values.server.configEnabled -}} -{{- toYaml (mergeOverwrite .Values.server.config (default dict (fromYaml (include "argo-cd.config.presets" $)))) }} +{{- toYaml (mergeOverwrite (default dict (fromYaml (include "argo-cd.config.presets" $))) .Values.server.config) }} {{- end -}} {{- end -}} \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml b/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml index 3fcae04b..a8079671 100644 --- a/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml +++ b/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "argo-cd.repoServer.fullname" . }}-styles-cm + name: argocd-custom-styles labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} data: diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 41c60f12..47f04d9d 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -73,11 +73,6 @@ spec: {{- end }} - mountPath: /app/config/gpg/keys name: gpg-keyring - {{- if .Values.configs.styles }} - - mountPath: /shared/app/custom - subPath: "custom.styles.css" - name: custom-styles - {{- end }} {{- if .Values.configs.knownHosts }} - mountPath: /app/config/ssh name: ssh-known-hosts @@ -136,11 +131,6 @@ spec: {{- if .Values.repoServer.volumes }} {{- toYaml .Values.repoServer.volumes | nindent 6}} {{- end }} - {{- if .Values.configs.styles }} - - configMap: - name: {{ template "argo-cd.repoServer.fullname" . }}-styles-cm - name: custom-styles - {{- end }} - emptyDir: {} name: gpg-keyring {{- if .Values.configs.knownHosts }} diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 4ae1c4c2..050315d6 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -80,6 +80,11 @@ spec: - mountPath: /app/config/tls name: tls-certs {{- end }} + {{- if .Values.configs.styles }} + - mountPath: "/shared/app/custom/custom.styles.css" + subPath: "custom.styles.css" + name: custom-styles + {{- end }} ports: - name: {{ .Values.server.name }} containerPort: {{ .Values.server.containerPort }} @@ -139,6 +144,11 @@ spec: {{- end }} - emptyDir: {} name: static-files + {{- if .Values.configs.styles }} + - configMap: + name: argocd-custom-styles + name: custom-styles + {{- end }} {{- if .Values.configs.knownHosts }} - configMap: name: argocd-ssh-known-hosts-cm diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 5fcbbc96..774dec75 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -876,10 +876,11 @@ repoServer: configs: ## Custom CSS Styles ## Reference: https://argo-cd.readthedocs.io/en/stable/operator-manual/custom-styles/ - #styles: | + # styles: | # .nav-bar { # background: linear-gradient(to bottom, #999, #777, #333, #222, #111); # } + ## External Cluster Credentials ## reference: ## - https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#clusters @@ -1006,7 +1007,7 @@ configs: # Argo expects the password in the secret to be bcrypt hashed. You can create this hash with # `htpasswd -nbBC 10 "" $ARGO_PWD | tr -d ':\n' | sed 's/$2y/$2a/'` - # argocdServerAdminPassword: + # argocdServerAdminPassword: "" # Password modification time defaults to current time if not set # argocdServerAdminPasswordMtime: "2006-01-02T15:04:05Z"