Skip to content

Commit f59bf73

Browse files
authored
feat: Add ability to configure coder container lifecycle hooks in helm chart (#6432)
1 parent 1c05b46 commit f59bf73

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

helm/templates/coder.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ spec:
5555
imagePullPolicy: {{ .Values.coder.image.pullPolicy }}
5656
resources:
5757
{{- toYaml .Values.coder.resources | nindent 12 }}
58+
lifecycle:
59+
{{- toYaml .Values.coder.lifecycle | nindent 12 }}
5860
env:
5961
- name: CODER_HTTP_ADDRESS
6062
value: "0.0.0.0:8080"

helm/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ coder:
120120
# "CODER_TLS_*" environment variables will be set for you.
121121
secretNames: []
122122

123+
# coder.lifecycle -- container lifecycle handlers for the Coder container, allowing
124+
# for lifecycle events such as postStart and preStop events
125+
# See: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
126+
lifecycle:
127+
{}
128+
# postStart:
129+
# exec:
130+
# command: ["/bin/sh", "-c", "echo postStart"]
131+
# preStop:
132+
# exec:
133+
# command: ["/bin/sh","-c","echo preStart"]
134+
123135
# coder.resources -- The resources to request for Coder. These are optional
124136
# and are not set by default.
125137
resources:

0 commit comments

Comments
 (0)