diff --git a/charts/base/templates/pvc.yaml b/charts/base/templates/pvc.yaml index eaa584e..8e77c07 100644 --- a/charts/base/templates/pvc.yaml +++ b/charts/base/templates/pvc.yaml @@ -1,28 +1,31 @@ -{{- range .Values.storage }} +{{- if .Values.storage -}} +{{- $storageValues := (kindIs "slice" .Values.storage | ternary .Values.storage (list .Values.storage)) -}} +{{- range $storage := $storageValues }} --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ .persistentVolumeClaimName | default (include "base.fullname" .) }} + name: {{ $storage.persistentVolumeClaimName | default (include "base.fullname" $) }} labels: {{- include "base.labels" $ | nindent 4 }} - {{- if .keepPvc }} + {{- if $storage.keepPvc }} annotations: "helm.sh/resource-policy": "keep" {{- end }} spec: accessModes: - {{- toYaml .accessModes | nindent 4 }} - volumeMode: {{ .volumeMode | default "Filesystem" }} + {{- toYaml $storage.accessModes | nindent 4 }} + volumeMode: {{ $storage.volumeMode | default "Filesystem" }} resources: requests: - storage: {{ .requestedSize }} - {{- if .className }} - storageClassName: {{ .className }} + storage: {{ $storage.requestedSize }} + {{- if $storage.className }} + storageClassName: {{ $storage.className }} {{- end }} - {{- if .enableDataSource }} + {{- if $storage.enableDataSource }} dataSource: kind: PersistentVolumeClaim - name: {{ .persistentVolumeClaimName| default (include "base.fullname" .) }} + name: {{ $storage.persistentVolumeClaimName | default (include "base.fullname" $) }} {{- end }} {{- end }} +{{- end }} diff --git a/charts/base/values.yaml b/charts/base/values.yaml index 1de0d7c..2aa8fc6 100644 --- a/charts/base/values.yaml +++ b/charts/base/values.yaml @@ -50,7 +50,8 @@ podAnnotations: {} podSecurityContext: {} # fsGroup: 2000 -securityContext: {} +securityContext: + {} # capabilities: # drop: # - ALL @@ -91,7 +92,7 @@ ingress: secrets: [] secretsDefaultEngine: "ExternalSecrets" -# secrets: +# secrets: # - external-secret-1 # - external-secret-2 # - external-secret-3 @@ -114,7 +115,8 @@ secretsDefaultEngine: "ExternalSecrets" extraContainer: {} -resources: {} +resources: + {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -143,7 +145,8 @@ config: {} containerPort: 80 -livenessProbe: {} +livenessProbe: + {} # failureThreshold: 3 # httpGet: # path: / @@ -154,7 +157,8 @@ livenessProbe: {} # successThreshold: 1 # timeoutSeconds: 1 -readinessProbe: {} +readinessProbe: + {} # httpGet: # path: / # port: http @@ -164,18 +168,26 @@ readinessProbe: {} envFrom: secret: -startupProbe: {} +startupProbe: + {} # httpGet: # path: / # port: http -storage: {} - # persistentVolumeClaimName: pvc-docs - # requestedSize: 1G - # className: gp2 - # accessModes: - # - ReadWriteOnce -# keepPvc: false +storage: + {} + # - persistentVolumeClaimName: "pvc-1" + # accessModes: + # - ReadWriteMany + # className: efs-sc + # requestedSize: 2Gi + # enableDataSource: false + # - persistentVolumeClaimName: pvc-2 + # accessModes: + # - ReadWriteMany + # className: efs-sc-root + # requestedSize: "2Gi" + # enableDataSource: false deployment: {}