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 2020 image : gcr.io/k8s-staging-nfd/node-feature-discovery:master
2121 imagePullPolicy : Always
2222 livenessProbe :
23+ httpGet :
24+ path : /healthz
25+ port : http
2326 initialDelaySeconds : 10
2427 periodSeconds : 10
2528 readinessProbe :
29+ httpGet :
30+ path : /healthz
31+ port : http
2632 initialDelaySeconds : 5
2733 periodSeconds : 10
2834 failureThreshold : 10
Original file line number Diff line number Diff line change 4747 image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4848 imagePullPolicy : {{ .Values.image.pullPolicy }}
4949 livenessProbe :
50+ httpGet :
51+ path : /healthz
52+ port : http
5053 {{- with .Values.worker.livenessProbe.initialDelaySeconds }}
5154 initialDelaySeconds : {{ . }}
5255 {{- end }}
6063 timeoutSeconds : {{ . }}
6164 {{- end }}
6265 readinessProbe :
66+ httpGet :
67+ path : /healthz
68+ port : http
6369 {{- with .Values.worker.readinessProbe.initialDelaySeconds }}
6470 initialDelaySeconds : {{ . }}
6571 {{- end }}
Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ func newDefaultConfig() *NFDConfig {
203203 }
204204}
205205
206+ func (w * nfdWorker ) Healthz (writer http.ResponseWriter , _ * http.Request ) {
207+ writer .WriteHeader (http .StatusOK )
208+ }
209+
206210func (i * infiniteTicker ) Reset (d time.Duration ) {
207211 switch {
208212 case d > 0 :
@@ -316,7 +320,8 @@ func (w *nfdWorker) Run() error {
316320 return nil
317321 }
318322
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 )
320325
321326 // Start HTTP server
322327 httpServer := http.Server {Addr : fmt .Sprintf (":%d" , w .args .Port ), Handler : httpMux }
You can’t perform that action at this time.
0 commit comments