Skip to content

Commit

Permalink
feat: auto detect storage volumeMount while setting it in volumeMounts
Browse files Browse the repository at this point in the history
  • Loading branch information
huangweixiao committed Nov 9, 2023
1 parent ccaddfc commit 8b0d963
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions charts/dragonfly/templates/seed-peer/seed-peer-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,19 @@ spec:
items:
- key: dfget.yaml
path: dfget.yaml
{{- if not (.Values.seedPeer.persistence.enable) }}
- name: storage
emptyDir: {}
{{- end }}
{{- $needStorage := true }}
{{- if .Values.seedPeer.extraVolumes }}
{{- range .Values.seedPeer.extraVolumes }}
{{- if eq .name "storage" }}
{{- $needStorage = false }}
{{- end }}
{{- end }}
{{- toYaml .Values.seedPeer.extraVolumes | nindent 6 }}
{{- end }}
{{- if and (not (.Values.seedPeer.persistence.enable)) $needStorage }}
- name: storage
emptyDir: { }
{{- end }}
{{- if .Values.seedPeer.persistence.enable }}
volumeClaimTemplates:
- metadata:
Expand Down

0 comments on commit 8b0d963

Please sign in to comment.