Make terminationGracePeriodSeconds configurable (#659)
Make terminationGracePeriodSeconds configurable for server pod
This commit is contained in:
parent
b4a92492d0
commit
248397f663
5 changed files with 45 additions and 7 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
Features:
|
||||
* Added configurable podDisruptionBudget for injector [GH-653](https://github.com/hashicorp/vault-helm/pull/653)
|
||||
* Make terminationGracePeriodSeconds configurable for server [GH-659](https://github.com/hashicorp/vault-helm/pull/659)
|
||||
|
||||
## 0.18.0 (November 17th, 2021)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ spec:
|
|||
{{- if .Values.server.priorityClassName }}
|
||||
priorityClassName: {{ .Values.server.priorityClassName }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }}
|
||||
serviceAccountName: {{ template "vault.serviceAccount.name" . }}
|
||||
{{ if .Values.server.shareProcessNamespace }}
|
||||
shareProcessNamespace: true
|
||||
|
|
|
@ -1385,6 +1385,27 @@ load _helpers
|
|||
[[ "${actual}" = *"foobar"* ]]
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# terminationGracePeriodSeconds
|
||||
@test "server/standalone-StatefulSet: terminationGracePeriodSeconds default" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
--show-only templates/server-statefulset.yaml \
|
||||
. | tee /dev/stderr |
|
||||
yq -r '.spec.template.spec.terminationGracePeriodSeconds' | tee /dev/stderr)
|
||||
[[ "${actual}" = "10" ]]
|
||||
}
|
||||
|
||||
@test "server/standalone-StatefulSet: terminationGracePeriodSeconds 30" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
--show-only templates/server-statefulset.yaml \
|
||||
--set 'server.terminationGracePeriodSeconds=30' \
|
||||
. | tee /dev/stderr |
|
||||
yq -r '.spec.template.spec.terminationGracePeriodSeconds' | tee /dev/stderr)
|
||||
[[ "${actual}" = "30" ]]
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# preStop
|
||||
@test "server/standalone-StatefulSet: preStop sleep duration default" {
|
||||
|
|
|
@ -14,6 +14,12 @@
|
|||
"string"
|
||||
]
|
||||
},
|
||||
"kubeletRootDir": {
|
||||
"type": "string"
|
||||
},
|
||||
"providersDir": {
|
||||
"type": "string"
|
||||
},
|
||||
"updateStrategy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -24,12 +30,6 @@
|
|||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providersDir": {
|
||||
"type": "string"
|
||||
},
|
||||
"kubeletRootDir": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -603,6 +603,9 @@
|
|||
"labels": {
|
||||
"type": "object"
|
||||
},
|
||||
"pathType": {
|
||||
"type": "string"
|
||||
},
|
||||
"tls": {
|
||||
"type": "array"
|
||||
}
|
||||
|
@ -728,6 +731,9 @@
|
|||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"externalTrafficPolicy": {
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
@ -781,6 +787,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"terminationGracePeriodSeconds": {
|
||||
"type": "integer"
|
||||
},
|
||||
"tolerations": {
|
||||
"type": [
|
||||
"null",
|
||||
|
@ -823,6 +832,9 @@
|
|||
"externalPort": {
|
||||
"type": "integer"
|
||||
},
|
||||
"externalTrafficPolicy": {
|
||||
"type": "string"
|
||||
},
|
||||
"publishNotReadyAddresses": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
@ -374,6 +374,10 @@ server:
|
|||
# Number of seconds after which the probe times out.
|
||||
timeoutSeconds: 3
|
||||
|
||||
# Optional duration in seconds the pod needs to terminate gracefully.
|
||||
# See: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
|
||||
terminationGracePeriodSeconds: 10
|
||||
|
||||
# Used to set the sleep time during the preStop step
|
||||
preStopSleepSeconds: 5
|
||||
|
||||
|
|
Loading…
Reference in a new issue