feat(argo-cd): Truncate version labels to 63 characters (#1368)

Allow to use digests.
https://github.com/argoproj/argo-helm/issues/417

Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
This commit is contained in:
Mathieu Parent 2022-07-21 11:53:19 +02:00 committed by GitHub
parent 833c877ca5
commit 8f0914dc4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 16 deletions

View file

@ -5,7 +5,7 @@ metadata:
name: {{ template "argo-cd.controller.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | quote }}
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | trunc 63 | quote }}
spec:
selector:
matchLabels:
@ -25,7 +25,7 @@ spec:
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }}
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | quote }}
app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | trunc 63 | quote }}
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.controller.podLabels) }}
{{- toYaml . | nindent 8 }}
{{- end }}