From b025b16e3ad1f4a52a00fca384085468d5b2d0c3 Mon Sep 17 00:00:00 2001 From: Marco Dinis Date: Fri, 1 Nov 2024 14:27:50 +0000 Subject: [PATCH] use vars coming from ekstypes --- lib/integrations/awsoidc/eks_enroll_clusters.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/integrations/awsoidc/eks_enroll_clusters.go b/lib/integrations/awsoidc/eks_enroll_clusters.go index 9bcb3ad7a159c..e3cc9e355ab73 100644 --- a/lib/integrations/awsoidc/eks_enroll_clusters.go +++ b/lib/integrations/awsoidc/eks_enroll_clusters.go @@ -378,7 +378,10 @@ func enrollEKSCluster(ctx context.Context, log *slog.Logger, clock clockwork.Clo // When clusters are using CONFIG_MAP, API is not acessible and thus Teleport can't install the Teleport's Helm chart. // You can read more about the Authentication Modes here: https://aws.amazon.com/blogs/containers/a-deep-dive-into-simplified-amazon-eks-access-management-controls/ - allowedAuthModes := []eksTypes.AuthenticationMode{"API", "API_AND_CONFIG_MAP"} + allowedAuthModes := []eksTypes.AuthenticationMode{ + eksTypes.AuthenticationModeApi, + eksTypes.AuthenticationModeApiAndConfigMap, + } if !slices.Contains(allowedAuthModes, eksCluster.AccessConfig.AuthenticationMode) { return "", trace.BadParameter("can't enroll %q because its access config's authentication mode is %q, only %v are supported", clusterName, eksCluster.AccessConfig.AuthenticationMode, allowedAuthModes) }