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

@ -3,7 +3,7 @@ appVersion: v2.10.7
kubeVersion: ">=1.23.0-0"
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 6.7.14
version: 6.7.15
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources:
@ -27,4 +27,4 @@ annotations:
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: Pre-set statusbadge.url value to global.domain value
description: Pre-set statusbadge.url to global.domain when statusbadge is enabled

View file

@ -663,6 +663,7 @@ NAME: my-release
| configs.cm."application.instanceLabelKey" | string | `"argocd.argoproj.io/instance"` | The name of tracking label used by Argo CD for resource pruning |
| configs.cm."exec.enabled" | bool | `false` | Enable exec feature in Argo UI |
| configs.cm."server.rbac.log.enforce.enable" | bool | `false` | Enable logs RBAC enforcement |
| configs.cm."statusbadge.enabled" | bool | `false` | Enable Status Badge |
| configs.cm."timeout.hard.reconciliation" | string | `"0s"` | Timeout to refresh application data as well as target manifests cache |
| configs.cm."timeout.reconciliation" | string | `"180s"` | Timeout to discover if a new manifests version got published to the repository |
| configs.cm.annotations | object | `{}` | Annotations to be added to argocd-cm configmap |

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 -}}

View file

@ -180,6 +180,10 @@ configs:
# -- Timeout to refresh application data as well as target manifests cache
timeout.hard.reconciliation: 0s
# -- Enable Status Badge
## Ref: https://argo-cd.readthedocs.io/en/stable/user-guide/status-badge/
statusbadge.enabled: false
# Dex configuration
# dex.config: |
# connectors: