diff --git a/cmd/main.go b/cmd/main.go index 5f8f91e..5f98103 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -224,6 +224,7 @@ func main() { os.Exit(1) } } + if len(netbirdAPIKey) > 0 { if err = (&controller.NBRoutingPeerReconciler{ Client: mgr.GetClient(), @@ -314,7 +315,7 @@ func main() { setupLog.Error(err, "unable to set up health check") 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) } diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 9c40486..e1b4783 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -155,12 +155,13 @@ var _ = Describe("Manager", Ordered, func() { // Validate the pod's status cmd = exec.Command("kubectl", "get", - "pods", controllerPodName, "-o", "jsonpath={.status.phase}", + "pods", controllerPodName, + "-o", "jsonpath={.status.conditions[?(@.type=='Ready')].status}", "-n", namespace, ) output, err := utils.Run(cmd) g.Expect(err).NotTo(HaveOccurred()) - g.Expect(output).To(Equal("Running"), "Incorrect kubernetes-operator pod status") + g.Expect(output).To(Equal("True"), "Incorrect kubernetes-operator pod status") } Eventually(verifyControllerUp).Should(Succeed()) })