From 01713c7ce113b89f4373ba71037765eca978843c Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Thu, 27 May 2021 17:10:25 -0500 Subject: [PATCH] Don't reconcile Service ports in impersonatorconfig. These are tricky because a real load balancer controller (e.g., on GKE) will overwrite and set NodePort, so we can't blindly set the desired state of this fields. For now, we will just skip reconciling these. In the future, we could be more clever about merging them together with the current state. Signed-off-by: Margo Crawford --- internal/controller/impersonatorconfig/impersonator_config.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/controller/impersonatorconfig/impersonator_config.go b/internal/controller/impersonatorconfig/impersonator_config.go index 6dfc243c..29e7dfa7 100644 --- a/internal/controller/impersonatorconfig/impersonator_config.go +++ b/internal/controller/impersonatorconfig/impersonator_config.go @@ -538,7 +538,6 @@ func (c *impersonatorConfigController) createOrUpdateService(ctx context.Context updated.Spec.LoadBalancerIP = service.Spec.LoadBalancerIP updated.Spec.Type = service.Spec.Type updated.Spec.Selector = service.Spec.Selector - updated.Spec.Ports = service.Spec.Ports // If our updates didn't change anything, we're done. if equality.Semantic.DeepEqual(existing, updated) {