Healthz endpoint returns 404
mauriciopoppe opened this issue · 1 comments
mauriciopoppe commented
/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
, 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>
...
cnmcavoy commented
Pretty sure https://github.com/kubernetes-csi/node-driver-registrar/blob/master/cmd/csi-node-driver-registrar/node_register.go#L126 is wrong, and the second argument, nil
, should be mux
instead.