From 5bb327db6c72ae037c94c7f776da830914bf06c1 Mon Sep 17 00:00:00 2001 From: Amit Sahastrabuddhe Date: Wed, 27 Mar 2024 10:34:40 +0530 Subject: [PATCH 1/2] eks oidc arn deletion error --- pkg/cloud/services/eks/oidc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/cloud/services/eks/oidc.go b/pkg/cloud/services/eks/oidc.go index 2585237f84..03320ac3e2 100644 --- a/pkg/cloud/services/eks/oidc.go +++ b/pkg/cloud/services/eks/oidc.go @@ -161,6 +161,9 @@ func (s *Service) deleteOIDCProvider() error { return errors.Wrap(err, "failed to update control plane with OIDC provider ARN") } + anno["aws.spectrocloud.com/oidcProviderArn"] = "" + s.scope.ControlPlane.SetAnnotations(anno) + return nil } From d4b897c06c50e1d1db97d08fd203ab9c570042f4 Mon Sep 17 00:00:00 2001 From: Amit Sahastrabuddhe Date: Wed, 27 Mar 2024 10:39:18 +0530 Subject: [PATCH 2/2] eks oidc arn deletion error --- pkg/cloud/services/eks/oidc.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cloud/services/eks/oidc.go b/pkg/cloud/services/eks/oidc.go index 03320ac3e2..74037b1239 100644 --- a/pkg/cloud/services/eks/oidc.go +++ b/pkg/cloud/services/eks/oidc.go @@ -140,8 +140,8 @@ func (s *Service) reconcileTrustPolicy() error { } func (s *Service) deleteOIDCProvider() error { - anno := s.scope.ControlPlane.GetAnnotations() - arn := anno["aws.spectrocloud.com/oidcProviderArn"] + annotations := s.scope.ControlPlane.GetAnnotations() + arn := annotations["aws.spectrocloud.com/oidcProviderArn"] if arn == "" { arn = s.scope.ControlPlane.Status.OIDCProvider.ARN @@ -161,8 +161,8 @@ func (s *Service) deleteOIDCProvider() error { return errors.Wrap(err, "failed to update control plane with OIDC provider ARN") } - anno["aws.spectrocloud.com/oidcProviderArn"] = "" - s.scope.ControlPlane.SetAnnotations(anno) + annotations["aws.spectrocloud.com/oidcProviderArn"] = "" + s.scope.ControlPlane.SetAnnotations(annotations) return nil }