From a51722e2239b715aa56c0cd5760f6569639360ec Mon Sep 17 00:00:00 2001 From: Gregory 'GaLi' Cavelier Date: Mon, 26 Feb 2024 15:05:42 +0100 Subject: [PATCH] add support for configMap volumes (#172) * add support for configMap volumes * github: use chart-testing-action v2.5.0 * github: use chart-testing-action v2.6.0 * default-chart: bump version * pipeline: fix config * pipeline: fix config * pipeline: bump helm/chart-testing-action to 2.6.1 * pipeline: add debug * pipeline: add debug * Revert "pipeline: add debug" This reverts commit e28298b3e0173330d49497e1f890e10158e37d63. * pipeline: remove undefined option --- .github/workflows/helm.yaml | 2 +- charts/default-chart/Chart.yaml | 2 +- charts/default-chart/templates/deployment.yaml | 3 +++ charts/default-chart/templates/persistent-volume-claim.yaml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml index 1c8be333..a4faa5fc 100644 --- a/.github/workflows/helm.yaml +++ b/.github/workflows/helm.yaml @@ -30,7 +30,7 @@ jobs: python-version: 3.7 - name: Set up chart-testing - uses: helm/chart-testing-action@v2.4.0 + uses: helm/chart-testing-action@v2.6.1 - name: Run chart-testing (list-changed) id: list-changed diff --git a/charts/default-chart/Chart.yaml b/charts/default-chart/Chart.yaml index 5596d17c..4c0ca04b 100644 --- a/charts/default-chart/Chart.yaml +++ b/charts/default-chart/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 3.0.7 +version: 3.0.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/default-chart/templates/deployment.yaml b/charts/default-chart/templates/deployment.yaml index 5d1fdce8..c25b3fd3 100644 --- a/charts/default-chart/templates/deployment.yaml +++ b/charts/default-chart/templates/deployment.yaml @@ -93,6 +93,9 @@ spec: {{- if .secretName }} secret: secretName: {{ .secretName }} + {{- else if .configMapName }} + configMap: + name: {{ .configMapName }} {{- else }} persistentVolumeClaim: claimName: {{ $chartName }}-{{ .name }} diff --git a/charts/default-chart/templates/persistent-volume-claim.yaml b/charts/default-chart/templates/persistent-volume-claim.yaml index 542269ba..a4577845 100644 --- a/charts/default-chart/templates/persistent-volume-claim.yaml +++ b/charts/default-chart/templates/persistent-volume-claim.yaml @@ -2,7 +2,7 @@ {{- $labels := include "default-chart.labels" . -}} {{- if and .Values.persistence.enabled }} {{- range .Values.persistence.volumes }} - {{- if not .secretName }} + {{- if not (or .secretName .configMapName) }} apiVersion: v1 kind: PersistentVolumeClaim metadata: