fix: set default storageClass on demand only

This commit is contained in:
Stefan Reimer 2021-08-02 09:52:07 +00:00
parent 2cf5d62ecc
commit b17a9a6949
4 changed files with 12 additions and 1 deletions

View File

@ -118,7 +118,7 @@ kube-prometheus-stack:
storageSpec: storageSpec:
volumeClaimTemplate: volumeClaimTemplate:
spec: spec:
storageClassName: ebs-sc-gp3-xfs # storageClassName: ebs-sc-gp3-xfs
accessModes: ["ReadWriteOnce"] accessModes: ["ReadWriteOnce"]
resources: resources:
requests: requests:

View File

@ -2,6 +2,10 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass kind: StorageClass
metadata: metadata:
name: openebs-lvm name: openebs-lvm
{{- if .Values.storageClass.default }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
volumeBindingMode: WaitForFirstConsumer volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete reclaimPolicy: Delete
parameters: parameters:

View File

@ -41,3 +41,4 @@ openebs:
storageClass: storageClass:
vgpattern: "" vgpattern: ""
default: true

View File

@ -1,4 +1,10 @@
{{- define "storage-values" }} {{- define "storage-values" }}
{{- with index .Values "cert-manager" "storageClass" }}
storageClass:
{{- . | toYaml | nindent 2 }}
{{- end }}
{{- end }} {{- end }}
{{- define "storage-argo" }} {{- define "storage-argo" }}