Skip to content

Commit

Permalink
feat(helm): add liveness probe to the controller, proxy and registry
Browse files Browse the repository at this point in the history
  • Loading branch information
paullaffitte committed May 24, 2024
1 parent 3879969 commit bb2ee9b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helm/kube-image-keeper/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ spec:
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.controllers.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.controllers.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
8 changes: 8 additions & 0 deletions helm/kube-image-keeper/templates/proxy-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ spec:
readinessProbe:
{{- $readinessProbe | toYaml | nindent 12 }}
{{- end }}
{{- $livenessProbe := deepCopy .Values.proxy.livenessProbe }}
{{- if .Values.proxy.hostNetwork }}
{{- $livenessProbe := merge $livenessProbe.httpGet (dict "host" "localhost") }}
{{- end }}
{{- with .Values.proxy.livenessProbe }}
livenessProbe:
{{- $livenessProbe | toYaml | nindent 12 }}
{{- end }}
{{- with .Values.proxy.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/kube-image-keeper/templates/registry-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ spec:
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.registry.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.registry.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/kube-image-keeper/templates/registry-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ spec:
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.registry.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.registry.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
15 changes: 15 additions & 0 deletions helm/kube-image-keeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ controllers:
httpGet:
path: /readyz
port: 8081
# -- Liveness probe definition for the controllers pod
livenessProbe:
httpGet:
path: /healthz
port: 8081
resources:
requests:
# -- Cpu requests for the controller pod
Expand Down Expand Up @@ -164,6 +169,11 @@ proxy:
httpGet:
path: /v2/
port: 7439
# -- Liveness probe definition for the proxy pod
livenessProbe:
httpGet:
path: /v2/
port: 7439
resources:
requests:
# -- Cpu requests for the proxy pod
Expand Down Expand Up @@ -239,6 +249,11 @@ registry:
httpGet:
path: /v2/
port: 5000
# -- Liveness probe definition for the proxy pod
livenessProbe:
httpGet:
path: /v2/
port: 5000
resources:
requests:
# -- Cpu requests for the registry pod
Expand Down

0 comments on commit bb2ee9b

Please sign in to comment.