Skip to content

Commit b61490b

Browse files
authored
docs(values.yaml): add preStop lifecyle example usage (#258) (#468)
Signed-off-by: Kévin DELBEGUE <[email protected]>
1 parent c06ec7e commit b61490b

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

charts/atlantis/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
appVersion: v0.34.0
44
description: A Helm chart for Atlantis https://www.runatlantis.io
55
name: atlantis
6-
version: 5.17.1
6+
version: 5.17.2
77
keywords:
88
- terraform
99
home: https://www.runatlantis.io

charts/atlantis/tests/statefulset_test.yaml

+21-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ tests:
111111
- containerPort: 4141
112112
name: atlantis
113113
- notExists:
114-
path: spec.template.spec.containers[0].lifeCycle
114+
path: spec.template.spec.containers[0].lifecycle
115115
- notExists:
116116
path: spec.template.spec.containers[0].envFrom
117117
- equal:
@@ -1167,3 +1167,23 @@ tests:
11671167
value: "4141"
11681168
- name: ATLANTIS_ATLANTIS_URL
11691169
value: http://
1170+
- it: lifecycle
1171+
template: statefulset.yaml
1172+
set:
1173+
lifecycle:
1174+
preStop:
1175+
exec:
1176+
command:
1177+
- /bin/sh
1178+
- -c
1179+
- while pgrep -x "terraform|tofu|terragrunt" > /dev/null; do sleep 1; done
1180+
asserts:
1181+
- equal:
1182+
path: spec.template.spec.containers[0].lifecycle
1183+
value:
1184+
preStop:
1185+
exec:
1186+
command:
1187+
- /bin/sh
1188+
- -c
1189+
- while pgrep -x "terraform|tofu|terragrunt" > /dev/null; do sleep 1; done

charts/atlantis/values.yaml

+12-4
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,6 @@ statefulSet:
331331
# -- Option to share process namespace with atlantis container.
332332
shareProcessNamespace: false
333333

334-
# -- (int) Optionally customize the termination grace period in seconds.
335-
# @default -- default depends on the kubernetes version.
336-
terminationGracePeriodSeconds:
337-
338334
ingress:
339335
enabled: true
340336
ingressClassName:
@@ -756,6 +752,18 @@ redisSecretName: ""
756752
# -- Key within the existing Redis secret that contains the password value.
757753
redisSecretPasswordKey: password
758754

755+
# -- (int) Optionally customize the termination grace period in seconds.
756+
# @default -- default depends on the kubernetes version.
757+
terminationGracePeriodSeconds:
758+
# terminationGracePeriodSeconds: 300
759+
759760
# -- Set lifecycle hooks.
760761
# https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/.
761762
lifecycle: {}
763+
# lifecycle:
764+
# preStop:
765+
# exec:
766+
# command:
767+
# - /bin/sh
768+
# - -c
769+
# - while pgrep -x "terraform|tofu|terragrunt" > /dev/null; do sleep 1; done

0 commit comments

Comments
 (0)