Skip to content

Commit

Permalink
Merge pull request #121 from janlauber/add-csi-volumes
Browse files Browse the repository at this point in the history
[common]: add volume type csi
  • Loading branch information
adberger committed Oct 31, 2023
2 parents 4948fa2 + dadd6af commit 532ed46
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/common/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
14 changes: 14 additions & 0 deletions charts/common/templates/_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ 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 }}
{{- if or $controllerValues.containers $controllerValues.initContainers }}
Expand Down
11 changes: 10 additions & 1 deletion charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 532ed46

Please sign in to comment.