File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
helm/node-feature-discovery/templates Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 20
20
image : gcr.io/k8s-staging-nfd/node-feature-discovery:master
21
21
imagePullPolicy : Always
22
22
livenessProbe :
23
+ httpGet :
24
+ path : /healthz
25
+ port : http
23
26
initialDelaySeconds : 10
24
27
periodSeconds : 10
25
28
readinessProbe :
29
+ httpGet :
30
+ path : /healthz
31
+ port : http
26
32
initialDelaySeconds : 5
27
33
periodSeconds : 10
28
34
failureThreshold : 10
Original file line number Diff line number Diff line change 47
47
image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
48
48
imagePullPolicy : {{ .Values.image.pullPolicy }}
49
49
livenessProbe :
50
+ httpGet :
51
+ path : /healthz
52
+ port : http
50
53
{{- with .Values.worker.livenessProbe.initialDelaySeconds }}
51
54
initialDelaySeconds : {{ . }}
52
55
{{- end }}
60
63
timeoutSeconds : {{ . }}
61
64
{{- end }}
62
65
readinessProbe :
66
+ httpGet :
67
+ path : /healthz
68
+ port : http
63
69
{{- with .Values.worker.readinessProbe.initialDelaySeconds }}
64
70
initialDelaySeconds : {{ . }}
65
71
{{- end }}
Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ func newDefaultConfig() *NFDConfig {
203
203
}
204
204
}
205
205
206
+ func (w * nfdWorker ) Healthz (writer http.ResponseWriter , _ * http.Request ) {
207
+ writer .WriteHeader (http .StatusOK )
208
+ }
209
+
206
210
func (i * infiniteTicker ) Reset (d time.Duration ) {
207
211
switch {
208
212
case d > 0 :
@@ -316,7 +320,8 @@ func (w *nfdWorker) Run() error {
316
320
return nil
317
321
}
318
322
319
- // Start readiness probe (at this point we're "ready and live")
323
+ // Register health endpoint (at this point we're "ready and live")
324
+ httpMux .HandleFunc ("/healthz" , w .Healthz )
320
325
321
326
// Start HTTP server
322
327
httpServer := http.Server {Addr : fmt .Sprintf (":%d" , w .args .Port ), Handler : httpMux }
You can’t perform that action at this time.
0 commit comments