diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index e154e4b0..c2e9e948 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.0.1 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.2.5 +version: 3.3.2 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 7716e41e..5513a8fd 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -113,6 +113,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | configs.tlsCertsAnnotations | TLS certificate configmap annotations | `{}` | | configs.tlsCerts.data."argocd.example.com" | TLS certificate | See [values.yaml](values.yaml) | | configs.secret.extra | add additional secrets to be added to argocd-secret | `{}` | +| configs.styles | Define custom CSS styles for your argo instance ([Read More](https://argo-cd.readthedocs.io/en/stable/operator-manual/custom-styles/)). This Settings will automatically mount the provided css and reference it in the argo configuration. | `""` (See [values.yaml](values.yaml)) | | openshift.enabled | enables using arbitrary uid for argo repo server | `false` | ## ArgoCD Controller diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index 9ab07ef4..79723e71 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -151,4 +151,22 @@ Return the appropriate apiVersion for ingress {{- else -}} {{- print "networking.k8s.io/v1" -}} {{- end -}} +{{- end -}} + +{{/* +Argo Configuration Preset Values (Incluenced by Values configuration) +*/}} +{{- define "argo-cd.config.presets" -}} + {{- if .Values.configs.styles }} +ui.cssurl: "./custom/custom.styles.css" + {{- end }} +{{- end -}} + +{{/* +Merge Argo Configuration with Preset Configuration +*/}} +{{- define "argo-cd.config" -}} + {{- if .Values.server.configEnabled -}} +{{- 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-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index 7c87bce8..524f302e 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -95,9 +95,9 @@ spec: volumeMounts: - mountPath: /app/config/controller/tls name: argocd-repo-server-tls -{{- if .Values.controller.volumeMounts }} -{{- toYaml .Values.controller.volumeMounts | nindent 10}} -{{- end }} + {{- with .Values.controller.volumeMounts }} + {{- toYaml . | nindent 8 }} + {{- end }} resources: {{- toYaml .Values.controller.resources | nindent 10 }} {{- if .Values.controller.nodeSelector }} @@ -129,9 +129,9 @@ spec: path: ca.crt optional: true secretName: argocd-repo-server-tls -{{- if .Values.controller.volumes }} -{{- toYaml .Values.controller.volumes | nindent 8 }} -{{- end }} + {{- with .Values.controller.volumes }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.controller.priorityClassName }} priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml b/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml index b17f4f1b..0da0c1ed 100644 --- a/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml +++ b/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml @@ -11,6 +11,5 @@ metadata: {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} -data: -{{- toYaml .Values.server.config | nindent 4 }} +data: {{- include "argo-cd.config" $ | nindent 4 }} {{- 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 new file mode 100644 index 00000000..a8079671 --- /dev/null +++ b/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml @@ -0,0 +1,11 @@ +{{- if .Values.configs.styles }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-custom-styles + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} +data: + custom.styles.css: | + {{- .Values.configs.styles | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index d12c8446..2ee5b7e3 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -82,6 +82,11 @@ spec: {{- end }} - mountPath: /app/config/server/tls name: argocd-repo-server-tls + {{- 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 }} @@ -141,6 +146,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 f5bff3b4..1a9fab3b 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -283,7 +283,7 @@ redis: image: repository: redis - tag: 6.2.1-alpine + tag: 6.2.2-alpine imagePullPolicy: IfNotPresent ## Additional command line arguments to pass to redis-server @@ -360,7 +360,7 @@ redis-ha: metrics: enabled: true image: - tag: 6.2.1-alpine + tag: 6.2.2-alpine ## Server server: @@ -1015,9 +1015,16 @@ 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" + ## Custom CSS Styles + ## Reference: https://argo-cd.readthedocs.io/en/stable/operator-manual/custom-styles/ + # styles: | + # .nav-bar { + # background: linear-gradient(to bottom, #999, #777, #333, #222, #111); + # } + openshift: enabled: false diff --git a/charts/argocd-applicationset/Chart.yaml b/charts/argocd-applicationset/Chart.yaml index ebb5ee1c..fba7f6bd 100644 --- a/charts/argocd-applicationset/Chart.yaml +++ b/charts/argocd-applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationset description: A Helm chart for installing ArgoCD ApplicationSet type: application -version: 0.1.3 +version: 0.1.4 appVersion: "v0.1.0" home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png diff --git a/charts/argocd-applicationset/templates/_helpers.tpl b/charts/argocd-applicationset/templates/_helpers.tpl index 4d0e98b5..e86139e1 100644 --- a/charts/argocd-applicationset/templates/_helpers.tpl +++ b/charts/argocd-applicationset/templates/_helpers.tpl @@ -40,7 +40,6 @@ helm.sh/chart: {{ include "argo-applicationset.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/name: {{ include "argo-applicationset.name" . }} app.kubernetes.io/part-of: argo-cd-applicationset app.kubernetes.io/component: controller {{- end }}