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 <margaretc@vmware.com>
This commit is contained in:
Matt Moyer 2021-05-27 17:10:25 -05:00 committed by Margo Crawford
parent ab750f48aa
commit 01713c7ce1
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D
1 changed files with 0 additions and 1 deletions

View File

@ -538,7 +538,6 @@ func (c *impersonatorConfigController) createOrUpdateService(ctx context.Context
updated.Spec.LoadBalancerIP = service.Spec.LoadBalancerIP updated.Spec.LoadBalancerIP = service.Spec.LoadBalancerIP
updated.Spec.Type = service.Spec.Type updated.Spec.Type = service.Spec.Type
updated.Spec.Selector = service.Spec.Selector updated.Spec.Selector = service.Spec.Selector
updated.Spec.Ports = service.Spec.Ports
// If our updates didn't change anything, we're done. // If our updates didn't change anything, we're done.
if equality.Semantic.DeepEqual(existing, updated) { if equality.Semantic.DeepEqual(existing, updated) {