Skip to content

Commit

Permalink
Merge pull request #30 from gardener/liveness-probe-http-port
Browse files Browse the repository at this point in the history
Liveness probe for HTTP port
  • Loading branch information
MartinWeindel committed Jan 3, 2023
2 parents 57c4baf + 59b418a commit 0646436
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ func (s *server) run() {
http.Handle(twirpServer.PathPrefix(), twirpServer)

go func() {
http.ListenAndServe(fmt.Sprintf(":%d", port), nil)
err := http.ListenAndServe(fmt.Sprintf(":%d", port), nil)
s.log.Warnf(err.Error())
}()
}
if s.writer != nil {
Expand Down
7 changes: 7 additions & 0 deletions pkg/deploy/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ func (ac *AgentDeployConfig) buildDaemonSet(serviceAccountName string, hostNetwo
},
},
},
LivenessProbe: &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
TCPSocket: &corev1.TCPSocketAction{
Port: intstr.FromInt(int(portHttp)),
},
},
},
Ports: []corev1.ContainerPort{
{
Name: "metrics",
Expand Down

0 comments on commit 0646436

Please sign in to comment.