diff --git a/zammad/Chart.yaml b/zammad/Chart.yaml index b6c8063b..c67d1b71 100644 --- a/zammad/Chart.yaml +++ b/zammad/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: zammad -version: 12.3.4 +version: 12.3.5 appVersion: 6.3.1-130 description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails. home: https://zammad.org diff --git a/zammad/ci/default-values.yaml b/zammad/ci/default-values.yaml index b87a2449..e69de29b 100644 --- a/zammad/ci/default-values.yaml +++ b/zammad/ci/default-values.yaml @@ -1,9 +0,0 @@ -zammadConfig: - customVolumes: - - name: custom-volume - configMap: - name: helm-tests - customVolumeMounts: - - name: custom-volume - mountPath: /opt/zammad/lib/tasks/helm - readOnly: true diff --git a/zammad/ci/full-objects.yaml b/zammad/ci/full-objects.yaml index 16c11824..4d4e71d0 100644 --- a/zammad/ci/full-objects.yaml +++ b/zammad/ci/full-objects.yaml @@ -59,18 +59,7 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: helm-tests + name: custom-file namespace: zammad data: - helm-test.rake: |- - namespace :zammad do - namespace :helm do - desc 'Runs a set of Helm tests' - task test: :environment do |_task, args| - puts 'Checking if temporary file can be created...' - Tempfile.create do |f| - puts ' Temporary file was created successfully.' - end - end - end - end \ No newline at end of file + custom_file.txt: test \ No newline at end of file diff --git a/zammad/ci/full-values.yaml b/zammad/ci/full-values.yaml index 68c88b66..81d50ddd 100644 --- a/zammad/ci/full-values.yaml +++ b/zammad/ci/full-values.yaml @@ -44,10 +44,10 @@ zammadConfig: customVolumes: - name: custom-volume configMap: - name: helm-tests + name: custom-file customVolumeMounts: - name: custom-volume - mountPath: /opt/zammad/lib/tasks/helm + mountPath: /opt/zammad/custom_mount readOnly: true nginx: podLabels: diff --git a/zammad/templates/tests/run-tests.yaml b/zammad/templates/tests/run-tests.yaml index 8837c5bd..c6593ac0 100644 --- a/zammad/templates/tests/run-tests.yaml +++ b/zammad/templates/tests/run-tests.yaml @@ -1,7 +1,29 @@ apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ include "zammad.fullname" . }}-helm-test-rake-task" + labels: + {{- include "zammad.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +data: + helm-test.rake: |- + namespace :zammad do + namespace :helm do + desc 'Runs a set of Helm tests' + task test: :environment do |_task, args| + puts 'Checking if temporary file can be created...' + Tempfile.create do |f| + puts ' Temporary file was created successfully.' + end + end + end + end +--- +apiVersion: v1 kind: Pod metadata: - name: "{{ include "zammad.fullname" . }}-run-tests" + name: "{{ include "zammad.fullname" . }}-run-helm-test-rake-task" labels: {{- include "zammad.labels" . | nindent 4 }} annotations: @@ -18,6 +40,12 @@ spec: {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} volumeMounts: {{- include "zammad.volumeMounts" . | nindent 10 }} + - name: helm-rake-test-volume + mountPath: /opt/zammad/lib/tasks/helm + readOnly: true volumes: {{- include "zammad.volumes" . | nindent 6 }} + - name: helm-rake-test-volume + configMap: + name: "{{ include "zammad.fullname" . }}-helm-test-rake-task" restartPolicy: Never