fix(argo-workflows): avoid label exceeding maximum length (#1692)

fix(argo-workflows): generated value for app.kubernetes.io/version label for argo-workflows will not exceed maximum length and support image tags with a SHA digest.

Signed-off-by: Pedro Salgado <steenzout@users.noreply.github.com>

Signed-off-by: Pedro Salgado <steenzout@users.noreply.github.com>
This commit is contained in:
Pedro 2022-12-09 00:50:05 -06:00 committed by GitHub
parent 7bb7caa2cf
commit 5b15810e2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 7 deletions

View file

@ -4,7 +4,7 @@ metadata:
name: {{ template "argo-workflows.controller.fullname" . }}
labels:
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.controller.image.tag | trunc 63 | quote }}
app.kubernetes.io/version: {{ include "argo-workflows.controller_chart_version_label" . }}
{{- with .Values.controller.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
@ -18,7 +18,7 @@ spec:
metadata:
labels:
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }}
app.kubernetes.io/version: {{ default (include "argo-workflows.defaultTag" .) .Values.controller.image.tag | trunc 63 | quote }}
app.kubernetes.io/version: {{ include "argo-workflows.controller_chart_version_label" . }}
{{- with.Values.controller.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}