Skip to content

Commit 2bc6d4d

Browse files
committed
Make sure docker image tag follows chart value
1 parent 1e0110d commit 2bc6d4d

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

charts/yourls/Chart.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ annotations:
3434
url: https://github.com/YOURLS/charts
3535
- name: Upstream Project
3636
url: https://github.com/YOURLS/YOURLS
37+
artifacthub.io/changes: |
38+
- Add Helm Provenance Signature
39+
- YOURLS Docker image tag now follows chart app version

charts/yourls/templates/_helpers.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Return the proper YOURLS image name
2929
{{- define "yourls.image" -}}
3030
{{- $registryName := .Values.image.registry -}}
3131
{{- $repositoryName := .Values.image.repository -}}
32-
{{- $tag := .Values.image.tag | toString -}}
32+
{{- $tag := .Values.image.tag | default .Chart.AppVersion | toString -}}
3333
{{/*
3434
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
3535
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.

charts/yourls/values.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"tag": {
2222
"title": "YOURLS image tag",
2323
"type": "string",
24-
"default": "1.8.1"
24+
"default": "{{ .Chart.AppVersion }}"
2525
},
2626
"pullPolicy": {
2727
"title": "Image pull policy",

charts/yourls/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image:
22
registry: docker.io
33
repository: yourls
4-
tag: 1.8.1
4+
# tag: {{ .Chart.Version }}
55
pullPolicy: IfNotPresent
66
# pullSecrets:
77
# - myRegistrKeySecretName

0 commit comments

Comments
 (0)