Allow configure StatefulSet updateStrategy (#172)
This commit is contained in:
parent
0099ea8a94
commit
eccd71bfe2
3 changed files with 24 additions and 9 deletions
|
@ -15,7 +15,7 @@ spec:
|
||||||
podManagementPolicy: Parallel
|
podManagementPolicy: Parallel
|
||||||
replicas: {{ template "vault.replicas" . }}
|
replicas: {{ template "vault.replicas" . }}
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: OnDelete
|
type: {{ .Values.server.updateStrategyType }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: {{ template "vault.name" . }}
|
app.kubernetes.io/name: {{ template "vault.name" . }}
|
||||||
|
|
|
@ -97,6 +97,17 @@ load _helpers
|
||||||
[ "${actual}" = "OnDelete" ]
|
[ "${actual}" = "OnDelete" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "server/ha-StatefulSet: RollingUpdate updateStrategy" {
|
||||||
|
cd `chart_dir`
|
||||||
|
local actual=$(helm template \
|
||||||
|
-x templates/server-statefulset.yaml \
|
||||||
|
--set 'server.ha.enabled=true' \
|
||||||
|
--set 'server.updateStrategyType="RollingUpdate"' \
|
||||||
|
. | tee /dev/stderr |
|
||||||
|
yq -r '.spec.updateStrategy.type' | tee /dev/stderr)
|
||||||
|
[ "${actual}" = "RollingUpdate" ]
|
||||||
|
}
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# affinity
|
# affinity
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,10 @@ server:
|
||||||
# Overrides the default Image Pull Policy
|
# Overrides the default Image Pull Policy
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# Configure the Update Strategy Type for the StatefulSet
|
||||||
|
# See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||||
|
updateStrategyType: "OnDelete"
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
# resources:
|
# resources:
|
||||||
# requests:
|
# requests:
|
||||||
|
|
Loading…
Reference in a new issue