diff --git a/charts/base/Chart.yaml b/charts/base/Chart.yaml index df631b1..3de9f00 100644 --- a/charts/base/Chart.yaml +++ b/charts/base/Chart.yaml @@ -15,10 +15,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.1 +version: 0.2.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.2.1" +appVersion: "0.2.2" diff --git a/charts/base/templates/pvc.yaml b/charts/base/templates/pvc.yaml index 04037b5..8e77c07 100644 --- a/charts/base/templates/pvc.yaml +++ b/charts/base/templates/pvc.yaml @@ -1,29 +1,31 @@ {{- if .Values.storage -}} +{{- $storageValues := (kindIs "slice" .Values.storage | ternary .Values.storage (list .Values.storage)) -}} +{{- range $storage := $storageValues }} +--- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ .Values.storage.persistentVolumeClaimName | default (include "base.fullname" .) }} + name: {{ $storage.persistentVolumeClaimName | default (include "base.fullname" $) }} labels: - {{- include "base.labels" . | nindent 4 }} - {{- if .Values.storage.keepPvc }} + {{- include "base.labels" $ | nindent 4 }} + {{- if $storage.keepPvc }} annotations: - "helm.sh/resource-policy": keep + "helm.sh/resource-policy": "keep" {{- end }} spec: - {{- with .Values.storage }} 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 }} - {{- end }} - {{ if .Values.storage.enableDataSource}} + {{- if $storage.enableDataSource }} dataSource: kind: PersistentVolumeClaim - name: {{ .Values.storage.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: {}