Unverified Commit 6174f1fe authored by Darren Shepherd's avatar Darren Shepherd Committed by GitHub

Merge pull request #564 from erikwilson/update-kubernetes-service-port

Update kubernetes service on start for port changes
parents 7a8ccac0 ab7f726e
...@@ -142,6 +142,10 @@ func (c *Controller) Start() { ...@@ -142,6 +142,10 @@ func (c *Controller) Start() {
return 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. // Reconcile during first run removing itself until server is ready.
endpointPorts := createEndpointPortSpec(c.PublicServicePort, "https", c.ExtraEndpointPorts) endpointPorts := createEndpointPortSpec(c.PublicServicePort, "https", c.ExtraEndpointPorts)
if err := c.EndpointReconciler.RemoveEndpoints(kubernetesServiceName, c.PublicIP, endpointPorts); err != nil { if err := c.EndpointReconciler.RemoveEndpoints(kubernetesServiceName, c.PublicIP, endpointPorts); err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment