From 6fb262120a8ffe8df76ab5731957fcebfbf4ab1e Mon Sep 17 00:00:00 2001 From: Jan Lauber Date: Mon, 30 Oct 2023 21:34:41 +0100 Subject: [PATCH 1/2] feat(common): add volume type csi Signed-off-by: Jan Lauber --- charts/common/Chart.yaml | 2 +- charts/common/README.md | 2 +- charts/common/templates/_pod.yaml | 15 +++++++++++++++ charts/common/values.yaml | 11 ++++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index c4ba090e..0d3d6507 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: common description: "Bedag's common Helm chart to use for creating other Helm charts" -version: 10.9.0 +version: 10.10.0 # A chart can be either an 'application' or a 'library' chart. # # Application charts are a collection of templates that can be packaged into versioned archives diff --git a/charts/common/README.md b/charts/common/README.md index 0c379f03..77d4b04b 100644 --- a/charts/common/README.md +++ b/charts/common/README.md @@ -1,6 +1,6 @@ # common -![Version: 10.9.0](https://img.shields.io/badge/Version-10.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 10.10.0](https://img.shields.io/badge/Version-10.10.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Bedag's common Helm chart to use for creating other Helm charts diff --git a/charts/common/templates/_pod.yaml b/charts/common/templates/_pod.yaml index 1dcabff8..4a48b0b1 100644 --- a/charts/common/templates/_pod.yaml +++ b/charts/common/templates/_pod.yaml @@ -89,6 +89,21 @@ volumes: {{- end }} {{- end }} {{- end }} + {{- else if eq .type "csi" }} + {{- if .driver }} + csi: + driver: {{ .driver }} + {{- if .readOnly }} + readOnly: {{ .readOnly }} + {{- end }} + {{- if .volumeAttributes }} + volumeAttributes: + {{- range $key, $val := .volumeAttributes }} + {{ $key }}: {{ $val }} + {{- end }} + {{- end }} + {{- end }} + {{- end}} {{- end }} {{- end }} {{- if or $controllerValues.containers $controllerValues.initContainers }} diff --git a/charts/common/values.yaml b/charts/common/values.yaml index 73163e0a..20ab4582 100644 --- a/charts/common/values.yaml +++ b/charts/common/values.yaml @@ -458,7 +458,7 @@ components: volumes: [] # -- name of the volume # - name: generic-name - # -- type can either be "secret", "configMap", "persistentVolumeClaim", "emptyDir" or "external" + # -- type can either be "secret", "configMap", "persistentVolumeClaim", "emptyDir", "external" or "csi" # type: "secret" # START ONLY FOR SECRET or CONFIGMAP # filePath is optional for specifying a filePath in the helm chart where the file is located. @@ -484,6 +484,15 @@ components: # readOnly will force the ReadOnly setting in VolumeMounts. Comment out for using default (false) # readOnly: true # END ONLY FOR EXTERNAL + # START ONLY FOR CSI + # driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + # driver: "foo" + # readOnly will force the ReadOnly setting in VolumeMounts. Comment out for using default (false) + # readOnly: true + # volumeAttributes represents the arbitrary volume driver attributes. + # volumeAttributes: + # foo: "bar" + # END ONLY FOR CSI # end pod # start containers From dadd6afc530b74fa0d4d77b2b2d3ed1d06346e5e Mon Sep 17 00:00:00 2001 From: Jan Lauber Date: Mon, 30 Oct 2023 21:58:19 +0100 Subject: [PATCH 2/2] fix(common): _pod.yaml Signed-off-by: Jan Lauber --- charts/common/templates/_pod.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/common/templates/_pod.yaml b/charts/common/templates/_pod.yaml index 4a48b0b1..e706cf17 100644 --- a/charts/common/templates/_pod.yaml +++ b/charts/common/templates/_pod.yaml @@ -103,7 +103,6 @@ volumes: {{- end }} {{- end }} {{- end }} - {{- end}} {{- end }} {{- end }} {{- if or $controllerValues.containers $controllerValues.initContainers }}