Skip to content

Commit

Permalink
update[storage-charts-repackage]: add storage-charts-repackage storag…
Browse files Browse the repository at this point in the history
…eclass.yaml replicaNumber update

Signed-off-by: jie.li <jie.li@daocloud.io>
  • Loading branch information
angel0507 committed Jan 10, 2023
1 parent 0c09958 commit 5f7479c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions charts/hwameistor/hwameistor/templates/storageclass.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{{- define "replicaNumber" -}}
{{- if .Values.storageClass.enableHA -}}
{{- print 2 -}}
{{- else -}}
{{- print 1 -}}
{{- end -}}
{{- end -}}

{{- range $storageclass := .Values.storageClass -}}
---

Expand All @@ -21,7 +13,11 @@ volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: {{ $storageclass.allowVolumeExpansion }}
reclaimPolicy: {{ $storageclass.reclaimPolicy }}
parameters:
replicaNumber: {{ include "replicaNumber" . | quote}}
{{- if eq $storageclass.enableHA "true" }}
replicaNumber: "2"
{{- else }}
replicaNumber: "1"
{{- end }}
poolClass: {{ $storageclass.diskType | quote}}
poolType: "REGULAR"
volumeKind: "LVM"
Expand Down

0 comments on commit 5f7479c

Please sign in to comment.