From 8f5c0b0876255840fcdd527b45a8c72c9779c478 Mon Sep 17 00:00:00 2001 From: Ruslan Khizhnyak Date: Mon, 4 Sep 2023 09:10:10 +0300 Subject: [PATCH] Remove rand suffix in test job name Also added possibility to add additional annotations for test job. --- charts/mattermost-team-edition/Chart.yaml | 2 +- .../templates/tests/mattermost-test.yaml | 5 ++++- charts/mattermost-team-edition/values.yaml | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/mattermost-team-edition/Chart.yaml b/charts/mattermost-team-edition/Chart.yaml index 5612cd6c..4cb8b51c 100644 --- a/charts/mattermost-team-edition/Chart.yaml +++ b/charts/mattermost-team-edition/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: Mattermost Team Edition server. type: application name: mattermost-team-edition -version: 6.6.35 +version: 6.6.36 appVersion: 8.1.1 keywords: - mattermost diff --git a/charts/mattermost-team-edition/templates/tests/mattermost-test.yaml b/charts/mattermost-team-edition/templates/tests/mattermost-test.yaml index aa3c231c..bb8b85dd 100644 --- a/charts/mattermost-team-edition/templates/tests/mattermost-test.yaml +++ b/charts/mattermost-team-edition/templates/tests/mattermost-test.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include "mattermost-team-edition.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + name: "{{ include "mattermost-team-edition.fullname" . }}-test" labels: app.kubernetes.io/name: {{ include "mattermost-team-edition.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} @@ -9,6 +9,9 @@ metadata: helm.sh/chart: {{ include "mattermost-team-edition.chart" . }} annotations: "helm.sh/hook": test-success + {{- with .Values.testJob.annotations }} + {{- . | toYaml | nindent 4 }} + {{- end }} spec: containers: - name: {{ .Release.Name }}-test diff --git a/charts/mattermost-team-edition/values.yaml b/charts/mattermost-team-edition/values.yaml index 7232080e..68b7326e 100644 --- a/charts/mattermost-team-edition/values.yaml +++ b/charts/mattermost-team-edition/values.yaml @@ -247,3 +247,8 @@ readinessProbe: failureThreshold: 3 timeoutSeconds: 5 periodSeconds: 10 + +## Additional annotations for test job + +testJob: + annotations: {}