Skip to content

Commit

Permalink
Merge pull request #59 from mcuadros/volume
Browse files Browse the repository at this point in the history
helm: stan, volumeClaim configuration
  • Loading branch information
wallyqs authored May 17, 2020
2 parents ba0c4ae + 3975f15 commit dad8b83
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
11 changes: 7 additions & 4 deletions helm/charts/stan/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ spec:
volumeMounts:
- name: config-volume
mountPath: /etc/stan-config
{{- if eq .Values.store.type "file"}}
{{- if .Values.store.volume.enabled }}
- name: {{ template "stan.name" . }}-pvc
mountPath: {{ .Values.store.file.path }}
mountPath: {{ .Values.store.volume.mount }}
{{- end }}
{{ if .Values.exporter.enabled }}
- name: metrics
Expand All @@ -108,14 +108,17 @@ spec:
- containerPort: 7777
name: metrics
{{ end }}
{{- if eq .Values.store.type "file"}}
{{- if .Values.store.volume.enabled }}
volumeClaimTemplates:
- metadata:
name: {{ template "stan.name" . }}-pvc
spec:
{{- with .Values.store.volume.storageClass }}
storageClassName: {{ . }}
{{- end }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.store.file.storageSize }}
storage: {{ .Values.store.volume.storageSize }}
{{- end }}
11 changes: 10 additions & 1 deletion helm/charts/stan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,21 @@ store:
#
limits: {}

#
# Volume claim configuration. Required if the store type is `file` or if
# cluster it's enabled.
#
volume:
enabled: true
mount: /data/stan
storageSize: 100Gi
storageClass:

#
# File storage settings.
#
file:
path: /data/stan/store
storageSize: 1Gi

# In case of using file or sql storage, sets up a 3 node cluster.
cluster:
Expand Down

0 comments on commit dad8b83

Please sign in to comment.