feat: define custom styles via values
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
parent
49ccf4ae8a
commit
484ed6916d
6 changed files with 47 additions and 2 deletions
|
@ -80,6 +80,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i
|
|||
| global.hostAliases | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files | `[]` |
|
||||
| nameOverride | Provide a name in place of `argocd` | `"argocd"` |
|
||||
| installCRDs | Install CRDs if you are using Helm2. | `true` |
|
||||
| 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)) |
|
||||
| configs.clusterCredentials | Provide one or multiple [external cluster credentials](https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#clusters) | `[]` (See [values.yaml](values.yaml)) |
|
||||
| configs.knownHostsAnnotations | Known Hosts configmap annotations | `{}` |
|
||||
| configs.knownHosts.data.ssh_known_hosts | Known Hosts | See [values.yaml](values.yaml) |
|
||||
|
|
|
@ -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 .Values.server.config (default dict (fromYaml (include "argo-cd.config.presets" $)))) }}
|
||||
{{- 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: {{ template "argo-cd.repoServer.fullname" . }}-styles-cm
|
||||
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 }}
|
|
@ -73,6 +73,11 @@ 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
|
||||
|
@ -131,6 +136,11 @@ 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 }}
|
||||
|
|
|
@ -874,6 +874,12 @@ repoServer:
|
|||
|
||||
## Argo Configs
|
||||
configs:
|
||||
## 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);
|
||||
# }
|
||||
## External Cluster Credentials
|
||||
## reference:
|
||||
## - https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#clusters
|
||||
|
|
Loading…
Reference in a new issue