fix(argo-cd): Ensure app.kubernetes.io/version
label is valid (#2148)
Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
This commit is contained in:
parent
6dab4fa326
commit
e053486fab
2 changed files with 11 additions and 4 deletions
|
@ -3,7 +3,7 @@ appVersion: v2.7.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: 5.39.0
|
||||
version: 5.39.1
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||
sources:
|
||||
|
@ -26,5 +26,5 @@ annotations:
|
|||
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
|
||||
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
||||
artifacthub.io/changes: |
|
||||
- kind: added
|
||||
description: Allow configuring Dex's init image resources separately
|
||||
- kind: fixed
|
||||
description: Ensure `app.kubernetes.io/version` label is valid
|
||||
|
|
|
@ -38,6 +38,13 @@ Create Argo CD app version
|
|||
{{- default .Chart.AppVersion .Values.global.image.tag }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return valid version label
|
||||
*/}}
|
||||
{{- define "argo-cd.versionLabelValue" -}}
|
||||
{{ regexReplaceAll "[^-A-Za-z0-9_.]" (include "argo-cd.defaultTag" .) "-" | trunc 63 | trimAll "-" | trimAll "_" | trimAll "." | quote }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
|
@ -46,7 +53,7 @@ helm.sh/chart: {{ include "argo-cd.chart" .context }}
|
|||
{{ include "argo-cd.selectorLabels" (dict "context" .context "component" .component "name" .name) }}
|
||||
app.kubernetes.io/managed-by: {{ .context.Release.Service }}
|
||||
app.kubernetes.io/part-of: argocd
|
||||
app.kubernetes.io/version: {{ include "argo-cd.defaultTag" .context }}
|
||||
app.kubernetes.io/version: {{ include "argo-cd.versionLabelValue" .context }}
|
||||
{{- with .context.Values.global.additionalLabels }}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue