kubernetes-csi/node-driver-registrar

Healthz endpoint returns 404

mauriciopoppe opened this issue · 1 comments

/kind bug

I tried setting this in a manifest:

          image: <registry>/csi-node-driver-registrar:v2.5.0
          imagePullPolicy: IfNotPresent
          args:
            - "--csi-address=$(CSI_ENDPOINT)"
            - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
            - "--v=5"
            - "--http-endpoint=:9809"
          livenessProbe:
            httpGet:
              path: /healthz
              port: 9809
            initialDelaySeconds: 5
            timeoutSeconds: 5

The logs show:

I0310 07:28:29.658403    5752 node_register.go:95] Starting HTTP server at endpoint: :9809

Once started, the livenessProbe fails with 404, I did a port-forward to debug it locally

k -n kube-system port-forward pods/azuredisk-csi-driver-node-windows-rwwjd 9809:9809
Forwarding from 127.0.0.1:9809 -> 9809

# other terminal
curl localhost:9809/healthz
404 page not found

The path is set at this location

mux.HandleFunc("/healthz", func(w http.ResponseWriter, req *http.Request) {
, what's strange is that the pprof paths work e.g. if I also set --enable-pprof I can do:

curl localhost:9809/debug/pprof/
<html>
<head>
<title>/debug/pprof/</title>
...