From a1e3b55597d3dc8a2af5de20548e725c7da0f281 Mon Sep 17 00:00:00 2001 From: Amit Sahastrabuddhe Date: Thu, 13 Jul 2023 10:24:04 +0530 Subject: [PATCH] PCP-1505: palette continuously updating EKS cluster endpoints --- pkg/cloud/services/eks/cluster.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/cloud/services/eks/cluster.go b/pkg/cloud/services/eks/cluster.go index a1f47c3f8e..11bb981d6b 100644 --- a/pkg/cloud/services/eks/cluster.go +++ b/pkg/cloud/services/eks/cluster.go @@ -509,6 +509,11 @@ func (s *Service) reconcileVpcConfig(vpcConfig *eks.VpcConfigResponse) (*eks.Vpc needsUpdate := !tristate.EqualWithDefault(false, vpcConfig.EndpointPrivateAccess, updatedVpcConfig.EndpointPrivateAccess) || !tristate.EqualWithDefault(true, vpcConfig.EndpointPublicAccess, updatedVpcConfig.EndpointPublicAccess) || !publicAccessCIDRsEqual(vpcConfig.PublicAccessCidrs, updatedVpcConfig.PublicAccessCidrs) + + if *updatedVpcConfig.EndpointPublicAccess == false && len(updatedVpcConfig.PublicAccessCidrs) == 0 { + updatedVpcConfig.PublicAccessCidrs = []*string{} + } + if needsUpdate { return &eks.VpcConfigRequest{ EndpointPublicAccess: updatedVpcConfig.EndpointPublicAccess,