mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Update kubernetes service on start for port changes
This commit is contained in:
parent
820493d82a
commit
c774e60758
@ -89,6 +89,11 @@ func (c *Controller) Start(stopCh <-chan struct{}) {
|
||||
runtime.HandleError(fmt.Errorf("timed out waiting for caches to sync"))
|
||||
return
|
||||
}
|
||||
|
||||
// Service definition is reconciled during first run to correct port and type per expectations.
|
||||
if err := c.UpdateKubernetesService(true); err != nil {
|
||||
klog.Errorf("Unable to perform initial Kubernetes service initialization: %v", err)
|
||||
}
|
||||
// Reconcile during first run removing itself until server is ready.
|
||||
endpointPorts := createEndpointPortSpec(c.PublicServicePort, "https")
|
||||
if err := c.EndpointReconciler.RemoveEndpoints(kubernetesServiceName, c.PublicIP, endpointPorts); err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user