diff --git a/daemon/cmd/agenthealth.go b/daemon/cmd/agenthealth.go index 0792141344f9..23e0429469d1 100644 --- a/daemon/cmd/agenthealth.go +++ b/daemon/cmd/agenthealth.go @@ -52,7 +52,7 @@ func (d *Daemon) startAgentHealthHTTPService(addr string) { lc := net.ListenConfig{Control: setsockoptReuseAddrAndPort} ln, err := lc.Listen(context.Background(), "tcp", addr) if err != nil { - log.Fatal(err) + log.WithError(err).Fatalf("Unable to listen on %s for healthz status API server", addr) } mux := http.NewServeMux() @@ -82,7 +82,7 @@ func (d *Daemon) startAgentHealthHTTPService(addr string) { if err == http.ErrServerClosed { log.Info("healthz status API server shutdown") } else if err != nil { - log.WithError(err).Fatal("Unable to start status healthz status API server") + log.WithError(err).Fatal("Unable to start healthz status API server") } }() log.Infof("Started healthz status API server on address %s", addr) diff --git a/install/kubernetes/cilium/charts/agent/templates/daemonset.yaml b/install/kubernetes/cilium/charts/agent/templates/daemonset.yaml index 493b8abf6918..b178682b0061 100644 --- a/install/kubernetes/cilium/charts/agent/templates/daemonset.yaml +++ b/install/kubernetes/cilium/charts/agent/templates/daemonset.yaml @@ -55,11 +55,11 @@ spec: command: - cilium-agent livenessProbe: - exec: - command: - - cilium - - status - - --brief + httpGet: + host: '127.0.0.1' + path: /healthz + port: {{ .Values.global.agent.healthPort }} + scheme: HTTP failureThreshold: 10 # The initial delay for the liveness probe is intentionally large to # avoid an endless kill & restart cycle if in the event that the initial @@ -69,11 +69,11 @@ spec: successThreshold: 1 timeoutSeconds: 5 readinessProbe: - exec: - command: - - cilium - - status - - --brief + httpGet: + host: '127.0.0.1' + path: /healthz + port: {{ .Values.global.agent.healthPort }} + scheme: HTTP failureThreshold: 3 initialDelaySeconds: 5 periodSeconds: 30 diff --git a/install/kubernetes/quick-install.yaml b/install/kubernetes/quick-install.yaml index 63dddc9c9405..fd84925175d2 100644 --- a/install/kubernetes/quick-install.yaml +++ b/install/kubernetes/quick-install.yaml @@ -364,11 +364,11 @@ spec: command: - cilium-agent livenessProbe: - exec: - command: - - cilium - - status - - --brief + httpGet: + host: '127.0.0.1' + path: /healthz + port: 9876 + scheme: HTTP failureThreshold: 10 # The initial delay for the liveness probe is intentionally large to # avoid an endless kill & restart cycle if in the event that the initial @@ -378,11 +378,11 @@ spec: successThreshold: 1 timeoutSeconds: 5 readinessProbe: - exec: - command: - - cilium - - status - - --brief + httpGet: + host: '127.0.0.1' + path: /healthz + port: 9876 + scheme: HTTP failureThreshold: 3 initialDelaySeconds: 5 periodSeconds: 30