Merge branch 'mmisztal1980-feature/7'

This commit is contained in:
Mitchell Hashimoto 2018-09-22 09:57:55 -07:00
commit 100d14e955
No known key found for this signature in database
GPG key ID: 744E147AA52F5B0A
3 changed files with 33 additions and 0 deletions

View file

@ -160,4 +160,7 @@ spec:
resources:
requests:
storage: {{ .Values.server.storage }}
{{- if .Values.server.storageClass }}
storageClassName: {{ .Values.server.storageClass }}
{{- end }}
{{- end }}

View file

@ -196,3 +196,27 @@ load _helpers
yq -r '.spec.template.spec.containers[0].command | map(select(test("/consul/userconfig/foo"))) | length' | tee /dev/stderr)
[ "${actual}" = "1" ]
}
#--------------------------------------------------------------------
# updateStrategy
@test "server/StatefulSet: no storageClass on claim by default" {
cd `chart_dir`
local actual=$(helm template \
-x templates/server-statefulset.yaml \
. | tee /dev/stderr |
yq -r '.spec.volumeClaimTemplates[0].spec.storageClassName' | tee /dev/stderr)
[ "${actual}" = "null" ]
}
@test "server/StatefulSet: can set storageClass" {
cd `chart_dir`
local actual=$(helm template \
-x templates/server-statefulset.yaml \
--set 'server.storageClass=foo' \
. | tee /dev/stderr |
yq -r '.spec.volumeClaimTemplates[0].spec.storageClassName' | tee /dev/stderr)
[ "${actual}" = "foo" ]
}

View file

@ -29,7 +29,13 @@ server:
image: null
replicas: 3
bootstrapExpect: 3 # Should <= replicas count
# storage and storageClass are the settings for configuring stateful
# storage for the server pods. storage should be set to the disk size of
# the attached volume. storageClass is the class of storage which defaults
# to null (the Kube cluster will pick the default).
storage: 10Gi
storageClass: null
# connect will enable Connect on all the servers, initializing a CA
# for Connect-related connections. Other customizations can be done