Skip to content

Commit

Permalink
chore(eks-v2): remove awsAuth (#32961)
Browse files Browse the repository at this point in the history
### Reason for this change

For `eks-v2` module, it uses `API` as authentication mode which means access entries will be used to replace aws-auth ConfigMap. `awsAuth` construct is not used anymore.

### Description of changes

- `authenticationMode` is removed from L2 because the only authentication mode allowed is `API`. The value is hardcode when creating the L1 resource.
- Remove `awsAuth` and its usage in the new module

### Description of how you validated changes
unit tests

### Checklist
- [ ] 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
xazhao authored Jan 21, 2025
1 parent 5410e10 commit 6d834c0
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 1,004 deletions.
6 changes: 1 addition & 5 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/alb-controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from 'fs';
import * as path from 'path';
import { Construct } from 'constructs';
import { Cluster, AuthenticationMode } from './cluster';
import { Cluster } from './cluster';
import { HelmChart } from './helm-chart';
import { ServiceAccount } from './service-account';
import * as iam from 'aws-cdk-lib/aws-iam';
Expand Down Expand Up @@ -359,10 +359,6 @@ export class AlbController extends Construct {
// the controller relies on permissions deployed using these resources.
chart.node.addDependency(serviceAccount);
chart.node.addDependency(props.cluster.openIdConnectProvider);
if (props.cluster.authenticationMode != AuthenticationMode.API) {
// ensure the dependency only when ConfigMap is supported
chart.node.addDependency(props.cluster.awsAuth);
}
}

private rewritePolicyResources(resources: string | string[] | undefined): string | string[] | undefined {
Expand Down
18 changes: 0 additions & 18 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/aws-auth-mapping.ts

This file was deleted.

156 changes: 0 additions & 156 deletions packages/@aws-cdk/aws-eks-v2-alpha/lib/aws-auth.ts

This file was deleted.

Loading

0 comments on commit 6d834c0

Please sign in to comment.