Unit tests for storageClass
This commit is contained in:
parent
febaab96fa
commit
85538787e7
2 changed files with 30 additions and 1 deletions
|
|
@ -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" ]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +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: default # <= name of the storage class to use
|
||||
storageClass: null
|
||||
|
||||
# connect will enable Connect on all the servers, initializing a CA
|
||||
# for Connect-related connections. Other customizations can be done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue