fix(argo-cd): Pre-set statusbadge.url only when statusbadge is enabled (#2658)

- Add `statusbadge.enabled` to values.yaml as `false`
- Pre-set `statusbadge.url` to `global.domain` URL only when `statusbadge.enabled` is `true`
- Update README.md
- Fix a minor comment typo

Signed-off-by: Bojan Raic <code@bojan.io>
This commit is contained in:
Bojan Raic 2024-04-24 09:07:57 +02:00 committed by GitHub
parent 7ad09a972f
commit da00680758
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 3 deletions

View file

@ -159,12 +159,14 @@ Create the name of the notifications service account to use
{{- end -}}
{{/*
Argo Configuration Preset Values (Incluenced by Values configuration)
Argo Configuration Preset Values (Influenced by Values configuration)
*/}}
{{- define "argo-cd.config.cm.presets" -}}
{{- $presets := dict -}}
{{- $_ := set $presets "url" (printf "https://%s" .Values.global.domain) -}}
{{- if index .Values.configs.cm "statusbadge.enabled" | eq true -}}
{{- $_ := set $presets "statusbadge.url" (printf "https://%s/" .Values.global.domain) -}}
{{- end -}}
{{- if .Values.configs.styles -}}
{{- $_ := set $presets "ui.cssurl" "./custom/custom.styles.css" -}}
{{- end -}}