Skip to content

Commit 4d12833

Browse files
authored
fix(eks): fargateCluster compatibility with AuthenticationMode.API (#31267)
### Issue # (if applicable) This PR ensures the eks fargateCluster compatibility with `AuthenticationMode.API` Closes #30888 ### Reason for this change The FargateCluster assumes the authentication mode is always config map and create the podExectionRole mapping using `props.cluster.awsAuth.addRoleMapping()`. This won't work when authenticationMode is `API` because in this mode, config map is not supported and this statement would just fail. We need to add an conditional check, only when the cluster supports configmap will it run the addRoleMapping() statement. At this moment, the following authenticationMode would support configmap: 1. `undefined` 2. `CONFIG_MAP` 3. `API_AND_CONFIG_MAP` ### Description of changes ### Description of how you validated changes - [x] update the integ test - [x] manual deployments ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 3724931 commit 4d12833

22 files changed

+6314
-1458
lines changed

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/framework.js

-184
This file was deleted.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/framework.js

+185
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+18-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)