Skip to content

Commit

Permalink
use vars coming from ekstypes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis authored and github-actions committed Nov 1, 2024
1 parent 985bc87 commit fe6fd54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/integrations/awsoidc/eks_enroll_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit fe6fd54

Please sign in to comment.