From 8311aa0baadaeb314e0b79b5997df879f11d6ffd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 6 Aug 2022 15:29:09 +0000 Subject: [PATCH 1/2] Add renovate.json --- renovate.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..39a2b6e9 --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base" + ] +} From 0b3aeb0c48cb5bd19a665295cd2b821b26cd7bb6 Mon Sep 17 00:00:00 2001 From: Michael Sprauer Date: Sat, 6 Aug 2022 21:16:55 +0200 Subject: [PATCH 2/2] detect appVersion in Chart.yaml Signed-off-by: Michael Sprauer --- charts/docker-mailserver/templates/deployment.yaml | 2 +- charts/docker-mailserver/values.yaml | 7 ++++--- renovate.json | 10 ++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 218784c2..24cee7a9 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -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 }} diff --git a/charts/docker-mailserver/values.yaml b/charts/docker-mailserver/values.yaml index c197cc15..15591a02 100644 --- a/charts/docker-mailserver/values.yaml +++ b/charts/docker-mailserver/values.yaml @@ -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: diff --git a/renovate.json b/renovate.json index 39a2b6e9..20100b63 100644 --- a/renovate.json +++ b/renovate.json @@ -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+['\"]?(?\\d+\\.\\d+\\.\\d+)['\"]?"], + "depNameTemplate": "mailserver/docker-mailserver", + "datasourceTemplate": "docker", + "versioningTemplate": "docker" + } ] }