Skip to content

Commit b19eb69

Browse files
authored
fix(eks): integ test faild with InvalidParameterException (#33767)
### Issue Part of #33673 (comment) ### Reason for this change `yarn integ aws-eks/test/integ.eks-hybrid-nodes.js` is failed to complete. Error1: ```zsh ❌ aws-cdk-eks-cluster-hybrid-nodes failed: _ToolkitError: The stack named aws-cdk-eks-cluster-hybrid-nodes failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: AccessConfig AuthMode must be API_AND_CONFIG_MAP or API when remoteNetworkConfig is specified ``` Error2: ```zsh ❌ aws-cdk-eks-cluster-hybrid-nodes failed: _ToolkitError: The stack named aws-cdk-eks-cluster-hybrid-nodes failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Invalid remote node network: CIDR 10.0.0.0/16 overlaps with VPC CIDR 10.0.0.0/16 ``` ### Description of changes - Setting `accessConfig` to resolve Error1 - Changing CIDR to resolve Error2 ### Describe any new or updated permissions being added NONE ### Description of how you validated changes - Pass integration test ### 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 615f626 commit b19eb69

8 files changed

+24
-15
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-hybrid-nodes.js.snapshot/aws-cdk-eks-cluster-hybrid-nodes.assets.json

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

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-hybrid-nodes.js.snapshot/aws-cdk-eks-cluster-hybrid-nodes.template.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -759,12 +759,14 @@
759759
"endpointPublicAccess": true,
760760
"endpointPrivateAccess": true
761761
},
762-
"accessConfig": {},
762+
"accessConfig": {
763+
"authenticationMode": "API"
764+
},
763765
"remoteNetworkConfig": {
764766
"remoteNodeNetworks": [
765767
{
766768
"cidrs": [
767-
"10.0.0.0/16"
769+
"172.16.0.0/16"
768770
]
769771
}
770772
],

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-hybrid-nodes.js.snapshot/manifest.json

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

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-hybrid-nodes.js.snapshot/tree.json

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

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-hybrid-nodes.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,27 @@ class EksHybridNodesStack extends Stack {
1010
super(scope, id);
1111

1212
// just need one nat gateway to simplify the test
13-
const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 2, natGateways: 1, restrictDefaultSecurityGroup: false });
13+
const vpc = new ec2.Vpc(this, 'Vpc', {
14+
maxAzs: 2,
15+
natGateways: 1,
16+
restrictDefaultSecurityGroup: false,
17+
cidr: '10.0.0.0/16',
18+
});
1419
new eks.Cluster(this, 'Cluster', {
1520
vpc,
1621
...getClusterVersionConfig(this, eks.KubernetesVersion.V1_30),
1722
defaultCapacity: 0,
1823
remoteNodeNetworks: [
1924
{
20-
cidrs: ['10.0.0.0/16'],
25+
cidrs: ['172.16.0.0/16'],
2126
},
2227
],
2328
remotePodNetworks: [
2429
{
2530
cidrs: ['192.168.0.0/16'],
2631
},
2732
],
33+
authenticationMode: eks.AuthenticationMode.API,
2834
});
2935
}
3036
}

0 commit comments

Comments
 (0)