Skip to content

Commit

Permalink
StartupProbe based on webhook started checker
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Feb 15, 2022
1 parent 340b9e9 commit b6c52fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ func createManager() ctrl.Manager {
setupLog.Error(err, "unable to set up health check")
os.Exit(1)
}
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
readyChecker := mgr.GetWebhookServer().StartedChecker()
if err := mgr.AddReadyzCheck("readyz", readyChecker); err != nil {
setupLog.Error(err, "unable to set up ready check")
os.Exit(1)
}
Expand Down
10 changes: 5 additions & 5 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ spec:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
failureThreshold: 1
periodSeconds: 10
startupProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 100
periodSeconds: 5
resources:
limits:
cpu: 100m
Expand Down

0 comments on commit b6c52fe

Please sign in to comment.