Skip to content

Commit

Permalink
detect appVersion in Chart.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sprauer <[email protected]>
  • Loading branch information
MichaelSp committed Aug 6, 2022
1 parent 8311aa0 commit 0b3aeb0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
- name: dockermailserver
env:
{{- include "dockermailserver.upstream-env-variables" . | nindent 10 }}
image: {{ .Values.image.name }}:{{ .Values.image.tag }}
image: {{ .Values.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{ toYaml .Values.resources | indent 12 }}
Expand Down
7 changes: 4 additions & 3 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
image:
# image.name is the name of the container image to use. Refer to https://hub.docker.com/r/mailserver/docker-mailserver
## image.name is the name of the container image to use. Refer to https://hub.docker.com/r/mailserver/docker-mailserver
name: "mailserver/docker-mailserver"
# image.tag is the tag of the container image to use. Refer to https://hub.docker.com/r/mailserver/docker-mailserver
tag: "11.0.0"
## image.tag is the tag of the container image to use. Refer to https://hub.docker.com/r/mailserver/docker-mailserver
## If image.tag is not defined it will default to `.Chart.appVersion`
# tag: "latest"
pullPolicy: "IfNotPresent"

initContainer:
Expand Down
10 changes: 10 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"regexManagers": [
{
"description": "Update docker-mailserver docker image references in appVersion",
"fileMatch": ["Chart\\.yaml$"],
"matchStrings": ["appVersion:\\s+['\"]?(?<currentValue>\\d+\\.\\d+\\.\\d+)['\"]?"],
"depNameTemplate": "mailserver/docker-mailserver",
"datasourceTemplate": "docker",
"versioningTemplate": "docker"
}
]
}

0 comments on commit 0b3aeb0

Please sign in to comment.