File tree Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -1092,6 +1092,19 @@ properties:
1092
1092
description : |
1093
1093
A k8s native specification of resources, see [the
1094
1094
documentation](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#resourcerequirements-v1-core).
1095
+ lifecycle : &lifecycle-spec
1096
+ type : object
1097
+ additionalProperties : false
1098
+ description : |
1099
+ A k8s native specification of lifecycle hooks on the container, see [the
1100
+ documentation](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#lifecycle-v1-core).
1101
+ properties :
1102
+ postStart :
1103
+ type : object
1104
+ additionalProperties : true
1105
+ preStop :
1106
+ type : object
1107
+ additionalProperties : true
1095
1108
services :
1096
1109
type : object
1097
1110
additionalProperties : true
Original file line number Diff line number Diff line change @@ -179,6 +179,10 @@ spec:
179
179
securityContext :
180
180
{{- $securityContext | toYaml | trimSuffix "\n" | nindent 12 }}
181
181
{{- end }}
182
+ {{- with .Values.hub.lifecycle }}
183
+ lifecycle :
184
+ {{- . | toYaml | trimSuffix "\n" | nindent 12 }}
185
+ {{- end }}
182
186
env :
183
187
- name : PYTHONUNBUFFERED
184
188
value : " 1"
Original file line number Diff line number Diff line change 88
88
runAsUser : 1000
89
89
runAsGroup : 1000
90
90
allowPrivilegeEscalation : false
91
+ lifecycle : {}
91
92
services : {}
92
93
pdb :
93
94
enabled : false
Original file line number Diff line number Diff line change @@ -124,6 +124,19 @@ hub:
124
124
requests :
125
125
cpu : 100m
126
126
memory : 512Mi
127
+ lifecycle : &lifecycle
128
+ postStart :
129
+ exec :
130
+ command :
131
+ - " /bin/sh"
132
+ - " -c"
133
+ - " echo Hello from the postStart handler >> /usr/share/message"
134
+ preStop :
135
+ exec :
136
+ command :
137
+ - " /bin/sh"
138
+ - " -c"
139
+ - " echo Hello from the preStart handler >> /usr/share/message"
127
140
services :
128
141
tests :
129
142
apiToken : mocked-api-token
@@ -336,7 +349,7 @@ singleuser:
336
349
events : true
337
350
extraLabels : {}
338
351
extraEnv : {}
339
- lifecycleHooks : {}
352
+ lifecycleHooks : *lifecycle
340
353
initContainers :
341
354
- name : mock-init-container-name
342
355
image : mock-init-container-image
You can’t perform that action at this time.
0 commit comments