diff --git a/charts/eks/templates/etcd-statefulset.yaml b/charts/eks/templates/etcd-statefulset.yaml index f7eff5c54..4a03eb205 100644 --- a/charts/eks/templates/etcd-statefulset.yaml +++ b/charts/eks/templates/etcd-statefulset.yaml @@ -33,7 +33,9 @@ spec: name: data spec: accessModes: [ "ReadWriteOnce" ] + {{- if .Values.etcd.storage.className }} storageClassName: {{ .Values.etcd.storage.className }} + {{- end }} resources: requests: storage: {{ .Values.etcd.storage.size }} diff --git a/charts/k0s/templates/statefulset.yaml b/charts/k0s/templates/statefulset.yaml index d1233a1fa..a926cf3b0 100644 --- a/charts/k0s/templates/statefulset.yaml +++ b/charts/k0s/templates/statefulset.yaml @@ -31,7 +31,9 @@ spec: name: data spec: accessModes: [ "ReadWriteOnce" ] + {{- if .Values.storage.className }} storageClassName: {{ .Values.storage.className }} + {{- end }} resources: requests: storage: {{ .Values.storage.size }} diff --git a/charts/k3s/templates/statefulset.yaml b/charts/k3s/templates/statefulset.yaml index e907054e6..054e5fd3f 100644 --- a/charts/k3s/templates/statefulset.yaml +++ b/charts/k3s/templates/statefulset.yaml @@ -47,7 +47,9 @@ spec: name: data spec: accessModes: [ "ReadWriteOnce" ] + {{- if .Values.storage.className }} storageClassName: {{ .Values.storage.className }} + {{- end }} resources: requests: storage: {{ .Values.storage.size }} diff --git a/charts/k8s/templates/etcd-statefulset.yaml b/charts/k8s/templates/etcd-statefulset.yaml index b4709389a..4c83de5d6 100644 --- a/charts/k8s/templates/etcd-statefulset.yaml +++ b/charts/k8s/templates/etcd-statefulset.yaml @@ -33,7 +33,9 @@ spec: name: data spec: accessModes: [ "ReadWriteOnce" ] + {{- if .Values.etcd.storage.className}} storageClassName: {{ .Values.etcd.storage.className }} + {{- end }} resources: requests: storage: {{ .Values.etcd.storage.size }}