add doc-origin label

This commit is contained in:
Vasili Karaev 2021-06-02 11:42:32 +03:00
parent d99de50c56
commit 01eb2fea06
1 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,7 @@ Common labels
{{- define "<CHARTNAME>.labels" -}}
helm.sh/chart: {{ include "<CHARTNAME>.chart" . }}
{{ include "<CHARTNAME>.selectorLabels" . }}
{{ include "<CHARTNAME>.touchinLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@ -69,3 +70,14 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Touchin labels
*/}}
{{- define "<CHARTNAME>.touchinLabels" -}}
{{- if .Values.docs.meta.pullRequestNumber }}
touchin.ru/doc-origin: pr:{{ .Values.docs.meta.pullRequestNumber }}
{{- else if .Values.docs.meta.releaseBranch }}
touchin.ru/doc-origin: release:{{ .Values.docs.meta.releaseBranch }}
{{- end }}
{{- end }}