diff --git a/pkg/controlplane/controller.go b/pkg/controlplane/controller.go index faa11983e10..ccdf12cd9f4 100644 --- a/pkg/controlplane/controller.go +++ b/pkg/controlplane/controller.go @@ -52,7 +52,7 @@ type Controller struct { ServiceClient corev1client.ServicesGetter NamespaceClient corev1client.NamespacesGetter EventClient corev1client.EventsGetter - healthClient rest.Interface + readyzClient rest.Interface ServiceClusterIPRegistry rangeallocation.RangeRegistry ServiceClusterIPRange net.IPNet @@ -85,7 +85,7 @@ type Controller struct { } // NewBootstrapController returns a controller for watching the core capabilities of the master -func (c *completedConfig) NewBootstrapController(legacyRESTStorage corerest.LegacyRESTStorage, serviceClient corev1client.ServicesGetter, nsClient corev1client.NamespacesGetter, eventClient corev1client.EventsGetter, healthClient rest.Interface) *Controller { +func (c *completedConfig) NewBootstrapController(legacyRESTStorage corerest.LegacyRESTStorage, serviceClient corev1client.ServicesGetter, nsClient corev1client.NamespacesGetter, eventClient corev1client.EventsGetter, readyzClient rest.Interface) *Controller { _, publicServicePort, err := c.GenericConfig.SecureServing.HostPort() if err != nil { klog.Fatalf("failed to get listener address: %v", err) @@ -97,7 +97,7 @@ func (c *completedConfig) NewBootstrapController(legacyRESTStorage corerest.Lega ServiceClient: serviceClient, NamespaceClient: nsClient, EventClient: eventClient, - healthClient: healthClient, + readyzClient: readyzClient, EndpointReconciler: c.ExtraConfig.EndpointReconcilerConfig.Reconciler, EndpointInterval: c.ExtraConfig.EndpointReconcilerConfig.Interval, @@ -211,7 +211,7 @@ func (c *Controller) RunKubernetesService(ch chan struct{}) { // wait until process is ready wait.PollImmediateUntil(100*time.Millisecond, func() (bool, error) { var code int - c.healthClient.Get().AbsPath("/healthz").Do(context.TODO()).StatusCode(&code) + c.readyzClient.Get().AbsPath("/readyz").Do(context.TODO()).StatusCode(&code) return code == http.StatusOK, nil }, ch)