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:
|
Features:
|
||||||
* Added configurable podDisruptionBudget for injector [GH-653](https://github.com/hashicorp/vault-helm/pull/653)
|
* 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)
|
## 0.18.0 (November 17th, 2021)
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ spec:
|
||||||
{{- if .Values.server.priorityClassName }}
|
{{- if .Values.server.priorityClassName }}
|
||||||
priorityClassName: {{ .Values.server.priorityClassName }}
|
priorityClassName: {{ .Values.server.priorityClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }}
|
||||||
serviceAccountName: {{ template "vault.serviceAccount.name" . }}
|
serviceAccountName: {{ template "vault.serviceAccount.name" . }}
|
||||||
{{ if .Values.server.shareProcessNamespace }}
|
{{ if .Values.server.shareProcessNamespace }}
|
||||||
shareProcessNamespace: true
|
shareProcessNamespace: true
|
||||||
|
|
|
@ -1385,6 +1385,27 @@ load _helpers
|
||||||
[[ "${actual}" = *"foobar"* ]]
|
[[ "${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
|
# preStop
|
||||||
@test "server/standalone-StatefulSet: preStop sleep duration default" {
|
@test "server/standalone-StatefulSet: preStop sleep duration default" {
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
"string"
|
"string"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"kubeletRootDir": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"providersDir": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"updateStrategy": {
|
"updateStrategy": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -24,12 +30,6 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"providersDir": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"kubeletRootDir": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -603,6 +603,9 @@
|
||||||
"labels": {
|
"labels": {
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"pathType": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tls": {
|
"tls": {
|
||||||
"type": "array"
|
"type": "array"
|
||||||
}
|
}
|
||||||
|
@ -728,6 +731,9 @@
|
||||||
"enabled": {
|
"enabled": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"externalTrafficPolicy": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"port": {
|
"port": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
@ -781,6 +787,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"terminationGracePeriodSeconds": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
"tolerations": {
|
"tolerations": {
|
||||||
"type": [
|
"type": [
|
||||||
"null",
|
"null",
|
||||||
|
@ -823,6 +832,9 @@
|
||||||
"externalPort": {
|
"externalPort": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"externalTrafficPolicy": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"publishNotReadyAddresses": {
|
"publishNotReadyAddresses": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|
|
@ -374,6 +374,10 @@ server:
|
||||||
# Number of seconds after which the probe times out.
|
# Number of seconds after which the probe times out.
|
||||||
timeoutSeconds: 3
|
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
|
# Used to set the sleep time during the preStop step
|
||||||
preStopSleepSeconds: 5
|
preStopSleepSeconds: 5
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue