Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[common] Add ability to add external pvcs to pods #111

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading