Skip to content

Commit

Permalink
Merge pull request #111 from adberger/master
Browse files Browse the repository at this point in the history
[common] Add ability to add external pvcs to pods
  • Loading branch information
adberger authored Aug 18, 2023
2 parents c0cdb7a + 106efc2 commit 6b22d5a
Show file tree
Hide file tree
Showing 4 changed files with 17 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.3.2
version: 10.4.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.3.2](https://img.shields.io/badge/Version-10.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 10.4.0](https://img.shields.io/badge/Version-10.4.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
8 changes: 8 additions & 0 deletions charts/common/templates/_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ volumes:
{{- else }}
emptyDir: {}
{{- end }}
{{- else if eq .type "external" }}
{{- if .pvcName }}
persistentVolumeClaim:
claimName: {{ .pvcName }}
{{- if .readOnly }}
readOnly: {{ .readOnly }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
8 changes: 7 additions & 1 deletion charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ components:
volumes: []
# -- name of the volume
# - name: generic-name
# -- type can either be "secret", "configMap", "persistentVolumeClaim" or "emptyDir"
# -- type can either be "secret", "configMap", "persistentVolumeClaim", "emptyDir" or "external"
# 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 @@ -445,6 +445,12 @@ components:
# sizeLimit is the total amount of local storage required for this EmptyDir volume. Default is nil which means that the limit is undefined.
# sizeLimit: 100Mi
# END ONLY FOR EMPTYDIR
# START ONLY FOR EXTERNAL
# pvcName represents what name the external existing PVC has.
# pvcName: "foo"
# readOnly will force the ReadOnly setting in VolumeMounts. Comment out for using default (false)
# readOnly: true
# END ONLY FOR EXTERNAL
# end pod

# start containers
Expand Down

0 comments on commit 6b22d5a

Please sign in to comment.