feat: Define custom styles via values (#689)
* feat: define custom styles via values Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * Version Bump Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * Mount to correct server Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * fix(argo-cd): correct alphabetical place of new values Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * fix(argo-cd): correct alphabetical place of new values in README Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
0919bbc116
commit
a70e1779af
7 changed files with 50 additions and 4 deletions
|
@ -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.0
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
|
||||
keywords:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 -}}
|
|
@ -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 }}
|
|
@ -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 }}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue