fix: trim optional docker digest from version labels (#772)
Closes #771 Reviewed-on: https://code.forgejo.org/forgejo-helm/forgejo-helm/pulls/772 Co-authored-by: Michael Kriese <michael.kriese@visualon.de> Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
This commit is contained in:
parent
159a7636fc
commit
1c1768245a
1 changed files with 10 additions and 2 deletions
|
@ -32,6 +32,14 @@ Create chart name and version as used by the chart label.
|
|||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get version from .Values.image.tag or Chart.AppVersion.
|
||||
Trim optional docker digest.
|
||||
*/}}
|
||||
{{- define "gitea.version" -}}
|
||||
{{- regexReplaceAll "@.+" (.Values.image.tag | default .Chart.AppVersion | toString) "" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create image name and tag used by the deployment.
|
||||
*/}}
|
||||
|
@ -87,8 +95,8 @@ Common labels
|
|||
helm.sh/chart: {{ include "gitea.chart" . }}
|
||||
app: {{ include "gitea.name" . }}
|
||||
{{ include "gitea.selectorLabels" . }}
|
||||
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||
version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/version: {{ include "gitea.version" . | quote }}
|
||||
version: {{ include "gitea.version" . | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue