-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
112 additions
and
4 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.alb-controller-authapi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// ALB controller with EKS cluster that supports API mode only | ||
import { | ||
App, Stack, StackProps, | ||
aws_ec2 as ec2, | ||
} from 'aws-cdk-lib'; | ||
import * as eks from 'aws-cdk-lib/aws-eks'; | ||
import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; | ||
import { IntegTest } from '@aws-cdk/integ-tests-alpha' | ||
|
||
class EksClusterStack extends Stack { | ||
constructor(scope: App, id: string, props?: StackProps) { | ||
super(scope, id, props); | ||
|
||
const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 2, natGateways: 1, restrictDefaultSecurityGroup: false }); | ||
|
||
const cluster = new eks.Cluster(this, 'Cluster', { | ||
vpc, | ||
...getClusterVersionConfig(this, eks.KubernetesVersion.V1_30), | ||
defaultCapacity: 2, | ||
authenticationMode: eks.AuthenticationMode.API, | ||
}); | ||
|
||
// create the controller | ||
eks.AlbController.create(this, { | ||
cluster, | ||
version: eks.AlbControllerVersion.V2_6_2, | ||
}); | ||
} | ||
} | ||
|
||
const app = new App(); | ||
|
||
const stack = new EksClusterStack(app, 'integ-eks-stack'); | ||
|
||
new IntegTest(app, 'integtest', { | ||
testCases: [stack], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters