Skip to content

Commit

Permalink
fix(eks): fargateCluster compatibility with AuthenticationMode.API (#…
Browse files Browse the repository at this point in the history
…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*
  • Loading branch information
pahud authored Sep 11, 2024
1 parent 3724931 commit 4d12833
Show file tree
Hide file tree
Showing 22 changed files with 6,314 additions and 1,458 deletions.

This file was deleted.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4d12833

Please sign in to comment.