Skip to content

Commit ab20145

Browse files
authored
chore: updarte liveness and readiness probes to improve startup times (#35)
Signed-off-by: Artur Shad Nik <[email protected]>
1 parent cc61b56 commit ab20145

File tree

2 files changed

+14
-24
lines changed

2 files changed

+14
-24
lines changed

fleetconfig-controller/charts/fleetconfig-controller/templates/deployment.yaml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,35 +46,19 @@ spec:
4646
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
4747
name: manager
4848
resources:
49-
{{- toYaml .Values.resources | nindent 12 }}
49+
{{- toYaml .Values.resources | nindent 10 }}
5050
securityContext:
51-
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
52-
{{ if .Values.admissionWebhooks.enabled }}
51+
{{- toYaml .Values.containerSecurityContext | nindent 10 }}
52+
{{- if .Values.admissionWebhooks.enabled }}
5353
ports:
5454
- containerPort: {{ .Values.webhookService.port }}
5555
name: webhook-server
5656
protocol: TCP
5757
- containerPort: {{ .Values.healthCheck.port }}
5858
name: healthz
5959
protocol: TCP
60-
livenessProbe:
61-
httpGet:
62-
path: /healthz
63-
port: healthz
64-
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
65-
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
66-
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
67-
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
68-
successThreshold: {{ .Values.livenessProbe.successThreshold }}
69-
readinessProbe:
70-
httpGet:
71-
path: /readyz
72-
port: healthz
73-
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
74-
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
75-
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
76-
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
77-
successThreshold: {{ .Values.readinessProbe.successThreshold }}
60+
livenessProbe: {{- toYaml .Values.livenessProbe | nindent 10 }}
61+
readinessProbe: {{- toYaml .Values.readinessProbe | nindent 10 }}
7862
volumeMounts:
7963
- mountPath: {{ .Values.admissionWebhooks.certificate.mountPath }}
8064
name: tls-cert-vol

fleetconfig-controller/charts/fleetconfig-controller/values.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,17 +321,23 @@ healthCheck:
321321

322322
## @skip readinessProbe
323323
readinessProbe:
324+
httpGet:
325+
path: /readyz
326+
port: healthz
324327
failureThreshold: 3
325-
initialDelaySeconds: 30
328+
initialDelaySeconds: 3
326329
periodSeconds: 5
327330
successThreshold: 1
328331
timeoutSeconds: 1
329332

330333
## @skip livenessProbe
331334
livenessProbe:
335+
httpGet:
336+
path: /healthz
337+
port: healthz
332338
failureThreshold: 3
333-
initialDelaySeconds: 90
334-
periodSeconds: 5
339+
initialDelaySeconds: 15
340+
periodSeconds: 20
335341
successThreshold: 1
336342
timeoutSeconds: 1
337343

0 commit comments

Comments
 (0)