Skip to content

Commit

Permalink
Use the webhook server started checker for /readyz
Browse files Browse the repository at this point in the history
And wait for the deployment to be ready in deploy-on-kind script

Issue: #861
  • Loading branch information
Kieron Browne authored and georgethebeatle committed Mar 25, 2022
1 parent 6511041 commit 9038de3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func main() {
os.Exit(1)
}

if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
if err := mgr.AddReadyzCheck("readyz", mgr.GetWebhookServer().StartedChecker()); err != nil {
setupLog.Error(err, "unable to set up ready check")
os.Exit(1)
}
Expand Down
4 changes: 3 additions & 1 deletion scripts/deploy-on-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ function deploy_cf_k8s_controllers() {
}
popd >/dev/null

kubectl rollout status deployment/cf-k8s-controllers-controller-manager -w -n cf-k8s-controllers-system

if [[ -n "${default_domain}" ]]; then
retry kubectl apply -f "${CONTROLLER_DIR}/config/samples/cfdomain.yaml"
kubectl apply -f "${CONTROLLER_DIR}/config/samples/cfdomain.yaml"
fi
}

Expand Down

0 comments on commit 9038de3

Please sign in to comment.