Skip to content

Commit bb2ee9b

Browse files
committed
feat(helm): add liveness probe to the controller, proxy and registry
1 parent 3879969 commit bb2ee9b

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

helm/kube-image-keeper/templates/controller-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ spec:
9191
readinessProbe:
9292
{{- toYaml . | nindent 12 }}
9393
{{- end }}
94+
{{- with .Values.controllers.livenessProbe }}
95+
livenessProbe:
96+
{{- toYaml . | nindent 12 }}
97+
{{- end }}
9498
{{- with .Values.controllers.resources }}
9599
resources:
96100
{{- toYaml . | nindent 12 }}

helm/kube-image-keeper/templates/proxy-daemonset.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ spec:
9595
readinessProbe:
9696
{{- $readinessProbe | toYaml | nindent 12 }}
9797
{{- end }}
98+
{{- $livenessProbe := deepCopy .Values.proxy.livenessProbe }}
99+
{{- if .Values.proxy.hostNetwork }}
100+
{{- $livenessProbe := merge $livenessProbe.httpGet (dict "host" "localhost") }}
101+
{{- end }}
102+
{{- with .Values.proxy.livenessProbe }}
103+
livenessProbe:
104+
{{- $livenessProbe | toYaml | nindent 12 }}
105+
{{- end }}
98106
{{- with .Values.proxy.resources }}
99107
resources:
100108
{{- toYaml . | nindent 12 }}

helm/kube-image-keeper/templates/registry-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ spec:
9494
readinessProbe:
9595
{{- toYaml . | nindent 12 }}
9696
{{- end }}
97+
{{- with .Values.registry.livenessProbe }}
98+
livenessProbe:
99+
{{- toYaml . | nindent 12 }}
100+
{{- end }}
97101
{{- with .Values.registry.nodeSelector }}
98102
nodeSelector:
99103
{{- toYaml . | nindent 8 }}

helm/kube-image-keeper/templates/registry-statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ spec:
9797
readinessProbe:
9898
{{- toYaml . | nindent 12 }}
9999
{{- end }}
100+
{{- with .Values.registry.livenessProbe }}
101+
livenessProbe:
102+
{{- toYaml . | nindent 12 }}
103+
{{- end }}
100104
{{- with .Values.registry.nodeSelector }}
101105
nodeSelector:
102106
{{- toYaml . | nindent 8 }}

helm/kube-image-keeper/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ controllers:
5757
httpGet:
5858
path: /readyz
5959
port: 8081
60+
# -- Liveness probe definition for the controllers pod
61+
livenessProbe:
62+
httpGet:
63+
path: /healthz
64+
port: 8081
6065
resources:
6166
requests:
6267
# -- Cpu requests for the controller pod
@@ -164,6 +169,11 @@ proxy:
164169
httpGet:
165170
path: /v2/
166171
port: 7439
172+
# -- Liveness probe definition for the proxy pod
173+
livenessProbe:
174+
httpGet:
175+
path: /v2/
176+
port: 7439
167177
resources:
168178
requests:
169179
# -- Cpu requests for the proxy pod
@@ -239,6 +249,11 @@ registry:
239249
httpGet:
240250
path: /v2/
241251
port: 5000
252+
# -- Liveness probe definition for the proxy pod
253+
livenessProbe:
254+
httpGet:
255+
path: /v2/
256+
port: 5000
242257
resources:
243258
requests:
244259
# -- Cpu requests for the registry pod

0 commit comments

Comments
 (0)