Skip to content

Commit 52c2fc6

Browse files
committed
Add separate helm values for the liveness and readiness probes
Signed-off-by: Tobias Giese <[email protected]>
1 parent 901fbe2 commit 52c2fc6

File tree

5 files changed

+226
-109
lines changed

5 files changed

+226
-109
lines changed

deployment/helm/node-feature-discovery/templates/master.yaml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,44 @@ spec:
4848
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4949
imagePullPolicy: {{ .Values.image.pullPolicy }}
5050
livenessProbe:
51-
{{- toYaml .Values.master.livenessProbe | nindent 12 }}
51+
grpc:
52+
port: {{ .Values.master.healthPort | default "8082" }}
53+
{{- with .Values.master.livenessProbe.initialDelaySeconds }}
54+
initialDelaySeconds: {{ . }}
55+
{{- end }}
56+
{{- with .Values.master.livenessProbe.failureThreshold }}
57+
failureThreshold: {{ . }}
58+
{{- end }}
59+
{{- with .Values.master.livenessProbe.periodSeconds }}
60+
periodSeconds: {{ . }}
61+
{{- end }}
62+
{{- with .Values.master.livenessProbe.timeoutSeconds }}
63+
timeoutSeconds: {{ . }}
64+
{{- end }}
5265
readinessProbe:
53-
{{- toYaml .Values.master.readinessProbe | nindent 12 }}
66+
grpc:
67+
port: {{ .Values.master.healthPort | default "8082" }}
68+
{{- with .Values.master.readinessProbe.initialDelaySeconds }}
69+
initialDelaySeconds: {{ . }}
70+
{{- end }}
71+
{{- with .Values.master.readinessProbe.failureThreshold }}
72+
failureThreshold: {{ . }}
73+
{{- end }}
74+
{{- with .Values.master.readinessProbe.periodSeconds }}
75+
periodSeconds: {{ . }}
76+
{{- end }}
77+
{{- with .Values.master.readinessProbe.timeoutSeconds }}
78+
timeoutSeconds: {{ . }}
79+
{{- end }}
80+
{{- with .Values.master.readinessProbe.successThreshold }}
81+
successThreshold: {{ . }}
82+
{{- end }}
5483
ports:
5584
- containerPort: {{ .Values.master.port | default "8080" }}
5685
name: grpc
5786
- containerPort: {{ .Values.master.metricsPort | default "8081" }}
5887
name: metrics
59-
- containerPort: {{ .Values.master.healthPort | default "8082" }}
88+
- containerPort: {{ .Values.master.healthPort | default "8082" }}
6089
name: health
6190
env:
6291
- name: NODE_NAME
@@ -116,7 +145,7 @@ spec:
116145
- "-feature-gates={{ $key }}={{ $value }}"
117146
{{- end }}
118147
- "-metrics={{ .Values.master.metricsPort | default "8081" }}"
119-
- "-grpc-health={{ .Values.master.healthPort | default "8082" }}"
148+
- "-grpc-health={{ .Values.master.healthPort | default "8082" }}"
120149
{{- with .Values.master.extraArgs }}
121150
{{- toYaml . | nindent 12 }}
122151
{{- end }}

deployment/helm/node-feature-discovery/templates/topologyupdater.yaml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,38 @@ spec:
4545
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4646
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
4747
livenessProbe:
48-
{{- toYaml .Values.topologyUpdater.livenessProbe | nindent 10 }}
48+
grpc:
49+
port: {{ .Values.topologyUpdater.healthPort | default "8082" }}
50+
{{- with .Values.topologyUpdater.livenessProbe.initialDelaySeconds }}
51+
initialDelaySeconds: {{ . }}
52+
{{- end }}
53+
{{- with .Values.topologyUpdater.livenessProbe.failureThreshold }}
54+
failureThreshold: {{ . }}
55+
{{- end }}
56+
{{- with .Values.topologyUpdater.livenessProbe.periodSeconds }}
57+
periodSeconds: {{ . }}
58+
{{- end }}
59+
{{- with .Values.topologyUpdater.livenessProbe.timeoutSeconds }}
60+
timeoutSeconds: {{ . }}
61+
{{- end }}
4962
readinessProbe:
50-
{{- toYaml .Values.topologyUpdater.readinessProbe | nindent 10 }}
63+
grpc:
64+
port: {{ .Values.topologyUpdater.healthPort | default "8082" }}
65+
{{- with .Values.topologyUpdater.readinessProbe.initialDelaySeconds }}
66+
initialDelaySeconds: {{ . }}
67+
{{- end }}
68+
{{- with .Values.topologyUpdater.readinessProbe.failureThreshold }}
69+
failureThreshold: {{ . }}
70+
{{- end }}
71+
{{- with .Values.topologyUpdater.readinessProbe.periodSeconds }}
72+
periodSeconds: {{ . }}
73+
{{- end }}
74+
{{- with .Values.topologyUpdater.readinessProbe.timeoutSeconds }}
75+
timeoutSeconds: {{ . }}
76+
{{- end }}
77+
{{- with .Values.topologyUpdater.readinessProbe.successThreshold }}
78+
successThreshold: {{ . }}
79+
{{- end }}
5180
env:
5281
- name: NODE_NAME
5382
valueFrom:
@@ -90,14 +119,14 @@ spec:
90119
- "-kubelet-state-dir="
91120
{{- end }}
92121
- "-metrics={{ .Values.topologyUpdater.metricsPort | default "8081"}}"
93-
- "-grpc-health={{ .Values.topologyUpdater.healthPort | default "8082" }}"
122+
- "-grpc-health={{ .Values.topologyUpdater.healthPort | default "8082" }}"
94123
{{- with .Values.topologyUpdater.extraArgs }}
95124
{{- toYaml . | nindent 10 }}
96125
{{- end }}
97126
ports:
98127
- containerPort: {{ .Values.topologyUpdater.metricsPort | default "8081"}}
99128
name: metrics
100-
- containerPort: {{ .Values.topologyUpdater.healthPort | default "8082" }}
129+
- containerPort: {{ .Values.topologyUpdater.healthPort | default "8082" }}
101130
name: health
102131
volumeMounts:
103132
{{- if .Values.topologyUpdater.kubeletConfigPath | empty | not }}

deployment/helm/node-feature-discovery/templates/worker.yaml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,38 @@ spec:
4747
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4848
imagePullPolicy: {{ .Values.image.pullPolicy }}
4949
livenessProbe:
50-
{{- toYaml .Values.worker.livenessProbe | nindent 12 }}
50+
grpc:
51+
port: {{ .Values.worker.healthPort | default "8082" }}
52+
{{- with .Values.worker.livenessProbe.initialDelaySeconds }}
53+
initialDelaySeconds: {{ . }}
54+
{{- end }}
55+
{{- with .Values.worker.livenessProbe.failureThreshold }}
56+
failureThreshold: {{ . }}
57+
{{- end }}
58+
{{- with .Values.worker.livenessProbe.periodSeconds }}
59+
periodSeconds: {{ . }}
60+
{{- end }}
61+
{{- with .Values.worker.livenessProbe.timeoutSeconds }}
62+
timeoutSeconds: {{ . }}
63+
{{- end }}
5164
readinessProbe:
52-
{{- toYaml .Values.worker.readinessProbe | nindent 12 }}
65+
grpc:
66+
port: {{ .Values.worker.healthPort | default "8082" }}
67+
{{- with .Values.worker.readinessProbe.initialDelaySeconds }}
68+
initialDelaySeconds: {{ . }}
69+
{{- end }}
70+
{{- with .Values.worker.readinessProbe.failureThreshold }}
71+
failureThreshold: {{ . }}
72+
{{- end }}
73+
{{- with .Values.worker.readinessProbe.periodSeconds }}
74+
periodSeconds: {{ . }}
75+
{{- end }}
76+
{{- with .Values.worker.readinessProbe.timeoutSeconds }}
77+
timeoutSeconds: {{ . }}
78+
{{- end }}
79+
{{- with .Values.worker.readinessProbe.successThreshold }}
80+
successThreshold: {{ . }}
81+
{{- end }}
5382
env:
5483
- name: NODE_NAME
5584
valueFrom:
@@ -84,14 +113,14 @@ spec:
84113
- "-feature-gates={{ $key }}={{ $value }}"
85114
{{- end }}
86115
- "-metrics={{ .Values.worker.metricsPort | default "8081"}}"
87-
- "-grpc-health={{ .Values.worker.healthPort | default "8082" }}"
116+
- "-grpc-health={{ .Values.worker.healthPort | default "8082" }}"
88117
{{- with .Values.gc.extraArgs }}
89118
{{- toYaml . | nindent 8 }}
90119
{{- end }}
91120
ports:
92121
- containerPort: {{ .Values.worker.metricsPort | default "8081"}}
93122
name: metrics
94-
- containerPort: {{ .Values.worker.healthPort | default "8082" }}
123+
- containerPort: {{ .Values.worker.healthPort | default "8082" }}
95124
name: health
96125
volumeMounts:
97126
- name: host-boot

deployment/helm/node-feature-discovery/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,15 @@ master:
150150
initialDelaySeconds: 10
151151
# failureThreshold: 3
152152
# periodSeconds: 10
153+
# timeoutSeconds: 1
153154
readinessProbe:
154155
grpc:
155156
port: 8082
156157
initialDelaySeconds: 5
157158
failureThreshold: 10
158159
# periodSeconds: 10
160+
# timeoutSeconds: 1
161+
# successThreshold: 1
159162

160163
worker:
161164
enable: true
@@ -426,12 +429,15 @@ worker:
426429
initialDelaySeconds: 10
427430
# failureThreshold: 3
428431
# periodSeconds: 10
432+
# timeoutSeconds: 1
429433
readinessProbe:
430434
grpc:
431435
port: 8082
432436
initialDelaySeconds: 5
433437
failureThreshold: 10
434438
# periodSeconds: 10
439+
# timeoutSeconds: 1
440+
# successThreshold: 1
435441

436442
serviceAccount:
437443
# Specifies whether a service account should be created.
@@ -520,12 +526,15 @@ topologyUpdater:
520526
initialDelaySeconds: 10
521527
# failureThreshold: 3
522528
# periodSeconds: 10
529+
# timeoutSeconds: 1
523530
readinessProbe:
524531
grpc:
525532
port: 8082
526533
initialDelaySeconds: 5
527534
failureThreshold: 10
528535
# periodSeconds: 10
536+
# timeoutSeconds: 1
537+
# successThreshold: 1
529538

530539
resources:
531540
limits:

0 commit comments

Comments
 (0)