[Issue 5857][Helm Chart] - Support to existing Storage Class with StorageClassName (#5860)
Fixes #5857 ### Motivation With current aproach for specifying storage class in persistent volume claim it's not possible to customize the provisioner parameters. If the property 'storageClass' is declared the chart always create a new storage class with hardcoded parameters. ### Modifications A property 'storageClassName' was added to support an existent storage class. ### Verifying this change This change is a trivial rework / code cleanup without any test coverage.
This commit is contained in:
parent
1b680d3a54
commit
cea744e9a7
@ -143,7 +143,9 @@ spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.bookkeeper.volumes.journal.size }}
|
||||
{{- if .Values.bookkeeper.volumes.journal.storageClass }}
|
||||
{{- if .Values.bookkeeper.volumes.journal.storageClassName }}
|
||||
storageClassName: "{{ .Values.bookkeeper.volumes.journal.storageClassName }}"
|
||||
{{- else if .Values.bookkeeper.volumes.journal.storageClass }}
|
||||
storageClassName: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.journal.name }}"
|
||||
{{- end }}
|
||||
- metadata:
|
||||
@ -153,7 +155,9 @@ spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.bookkeeper.volumes.ledgers.size }}
|
||||
{{- if .Values.bookkeeper.volumes.ledgers.storageClass }}
|
||||
{{- if .Values.bookkeeper.volumes.ledgers.storageClassName }}
|
||||
storageClassName: "{{ .Values.bookkeeper.volumes.ledgers.storageClassName }}"
|
||||
{{- else if .Values.bookkeeper.volumes.ledgers.storageClass }}
|
||||
storageClassName: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@ -29,7 +29,9 @@ spec:
|
||||
requests:
|
||||
storage: {{ .Values.prometheus.volumes.data.size }}
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
{{- if .Values.prometheus.volumes.data.storageClass }}
|
||||
{{- if .Values.prometheus.volumes.data.storageClassName }}
|
||||
storageClassName: "{{ .Values.prometheus.volumes.data.storageClassName }}"
|
||||
{{- else if .Values.prometheus.volumes.data.storageClass }}
|
||||
storageClassName: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}-{{ .Values.prometheus.volumes.data.name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@ -136,7 +136,9 @@ spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.zookeeper.volumes.data.size }}
|
||||
{{- if .Values.zookeeper.volumes.data.storageClass }}
|
||||
{{- if .Values.zookeeper.volumes.data.storageClassName }}
|
||||
storageClassName: "{{ .Values.zookeeper.volumes.data.storageClassName }}"
|
||||
{{- else if .Values.zookeeper.volumes.data.storageClass }}
|
||||
storageClassName: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ .Values.zookeeper.volumes.data.name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@ -80,8 +80,12 @@ zookeeper:
|
||||
data:
|
||||
name: data
|
||||
size: 20Gi
|
||||
## If the storage class is left undefined when using persistence
|
||||
## the default storage class for the cluster will be used.
|
||||
## If you already have an existent storage class and want to reuse it, you can specify its name with the option below
|
||||
##
|
||||
# storageClassName: existent-storage-class
|
||||
#
|
||||
## Instead if you want to create a new storage class define it below
|
||||
## If left undefined no storage class will be defined along with PVC
|
||||
##
|
||||
# storageClass:
|
||||
# type: pd-ssd
|
||||
@ -146,8 +150,12 @@ bookkeeper:
|
||||
journal:
|
||||
name: journal
|
||||
size: 50Gi
|
||||
## If the storage class is left undefined when using persistence
|
||||
## the default storage class for the cluster will be used.
|
||||
## If you already have an existent storage class and want to reuse it, you can specify its name with the option below
|
||||
##
|
||||
# storageClassName: existent-storage-class
|
||||
#
|
||||
## Instead if you want to create a new storage class define it below
|
||||
## If left undefined no storage class will be defined along with PVC
|
||||
##
|
||||
# storageClass:
|
||||
# type: pd-ssd
|
||||
@ -156,8 +164,12 @@ bookkeeper:
|
||||
ledgers:
|
||||
name: ledgers
|
||||
size: 50Gi
|
||||
## If the storage class is left undefined when using persistence
|
||||
## the default storage class for the cluster will be used.
|
||||
## If you already have an existent storage class and want to reuse it, you can specify its name with the option below
|
||||
##
|
||||
# storageClassName: existent-storage-class
|
||||
#
|
||||
## Instead if you want to create a new storage class define it below
|
||||
## If left undefined no storage class will be defined along with PVC
|
||||
##
|
||||
# storageClass:
|
||||
# type: pd-ssd
|
||||
@ -387,8 +399,12 @@ prometheus:
|
||||
data:
|
||||
name: data
|
||||
size: 50Gi
|
||||
## If the storage class is left undefined when using persistence
|
||||
## the default storage class for the cluster will be used.
|
||||
## If you already have an existent storage class and want to reuse it, you can specify its name with the option below
|
||||
##
|
||||
# storageClassName: existent-storage-class
|
||||
#
|
||||
## Instead if you want to create a new storage class define it below
|
||||
## If left undefined no storage class will be defined along with PVC
|
||||
##
|
||||
# storageClass:
|
||||
# type: pd-standard
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user