aboutsummaryrefslogtreecommitdiff
path: root/helm
diff options
context:
space:
mode:
authorWrenIX <133280015+wrenix@users.noreply.github.com>2023-10-25 10:08:54 +0200
committerGitHub <noreply@github.com>2023-10-25 10:08:54 +0200
commite02a7948d8556398ceb345a241c175b5ca1d011f (patch)
tree4ab31148205494bbb16d4e322cd25b8126f84c77 /helm
parent4fa8512d576ca2a425e6cc546264934d959bced5 (diff)
fix(helm): empty storage class in pvcs (#3191)
fix #3103 --- not yet tested [skip ci]
Diffstat (limited to 'helm')
-rw-r--r--helm/dendrite/templates/pvc.yaml27
-rw-r--r--helm/dendrite/values.yaml32
2 files changed, 52 insertions, 7 deletions
diff --git a/helm/dendrite/templates/pvc.yaml b/helm/dendrite/templates/pvc.yaml
index 88eff3be..70b1ce56 100644
--- a/helm/dendrite/templates/pvc.yaml
+++ b/helm/dendrite/templates/pvc.yaml
@@ -12,7 +12,14 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.media.capacity }}
- storageClassName: {{ default .Values.persistence.storageClass .Values.persistence.media.storageClass }}
+ {{ $storageClass := .Values.persistence.media.storageClass | default .Values.persistence.storageClass }}
+ {{- if $storageClass }}
+ {{- if (eq "-" $storageClass) }}
+ storageClassName: ""
+ {{- else }}
+ storageClassName: "{{ $storageClass }}"
+ {{- end }}
+ {{- end }}
{{ end }}
{{ if not .Values.persistence.jetstream.existingClaim }}
---
@@ -28,7 +35,14 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.jetstream.capacity }}
- storageClassName: {{ default .Values.persistence.storageClass .Values.persistence.jetstream.storageClass }}
+ {{ $storageClass := .Values.persistence.jetstream.storageClass | default .Values.persistence.storageClass }}
+ {{- if $storageClass }}
+ {{- if (eq "-" $storageClass) }}
+ storageClassName: ""
+ {{- else }}
+ storageClassName: "{{ $storageClass }}"
+ {{- end }}
+ {{- end }}
{{ end }}
{{ if not .Values.persistence.search.existingClaim }}
---
@@ -44,5 +58,12 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.search.capacity }}
- storageClassName: {{ default .Values.persistence.storageClass .Values.persistence.search.storageClass }}
+ {{ $storageClass := .Values.persistence.search.storageClass | default .Values.persistence.storageClass }}
+ {{- if $storageClass }}
+ {{- if (eq "-" $storageClass) }}
+ storageClassName: ""
+ {{- else }}
+ storageClassName: "{{ $storageClass }}"
+ {{- end }}
+ {{- end }}
{{ end }}
diff --git a/helm/dendrite/values.yaml b/helm/dendrite/values.yaml
index 8a72f669..afce1d93 100644
--- a/helm/dendrite/values.yaml
+++ b/helm/dendrite/values.yaml
@@ -26,7 +26,13 @@ persistence:
# -- The storage class to use for volume claims.
# Used unless specified at the specific component.
# Defaults to the cluster default storage class.
- storageClass: ""
+ ## If defined, storageClassName: <storageClass>
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ # storageClass: ""
jetstream:
# -- Use an existing volume claim for jetstream
existingClaim: ""
@@ -34,7 +40,13 @@ persistence:
capacity: "1Gi"
# -- The storage class to use for volume claims.
# Defaults to persistence.storageClass
- storageClass: ""
+ ## If defined, storageClassName: <storageClass>
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ # storageClass: ""
media:
# -- Use an existing volume claim for media files
existingClaim: ""
@@ -42,7 +54,13 @@ persistence:
capacity: "1Gi"
# -- The storage class to use for volume claims.
# Defaults to persistence.storageClass
- storageClass: ""
+ ## If defined, storageClassName: <storageClass>
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ # storageClass: ""
search:
# -- Use an existing volume claim for the fulltext search index
existingClaim: ""
@@ -50,7 +68,13 @@ persistence:
capacity: "1Gi"
# -- The storage class to use for volume claims.
# Defaults to persistence.storageClass
- storageClass: ""
+ ## If defined, storageClassName: <storageClass>
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ # storageClass: ""
# -- Add additional volumes to the Dendrite Pod
extraVolumes: []