Skip to content

Commit f15dee0

Browse files
authored
chore(release): 2.37.1 (#21547)
See CHANGELOG
2 parents aba5ef6 + a82d760 commit f15dee0

File tree

11 files changed

+17
-223
lines changed

11 files changed

+17
-223
lines changed

CHANGELOG.v2.alpha.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.37.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.37.0-alpha.0...v2.37.1-alpha.0) (2022-08-10)
6+
57
## [2.37.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.36.0-alpha.0...v2.37.0-alpha.0) (2022-08-09)
68

79

CHANGELOG.v2.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.37.1](https://github.com/aws/aws-cdk/compare/v2.37.0...v2.37.1) (2022-08-10)
6+
7+
### Bug Fixes
8+
9+
* **eks:** revert "fix(eks): cannot disable cluster logging once it has been enabled" ([#21545](https://github.com/aws/aws-cdk/pull/21545)) ([5515ce4](https://github.com/aws/aws-cdk/commit/5515ce4b439d7917bbba662d852acc29fea9d8a4))
10+
511
## [2.37.0](https://github.com/aws/aws-cdk/compare/v2.36.0...v2.37.0) (2022-08-09)
612

713

packages/@aws-cdk/aws-eks/lib/cluster-resource-handler/cluster.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,10 @@ function parseProps(props: any): aws.EKS.CreateClusterRequest {
286286
parsed.resourcesVpcConfig.endpointPublicAccess = parsed.resourcesVpcConfig.endpointPublicAccess === 'true';
287287
}
288288

289-
if (typeof (parsed.logging?.clusterLogging[0]?.enabled) === 'string') {
289+
if (typeof (parsed.logging?.clusterLogging[0].enabled) === 'string') {
290290
parsed.logging.clusterLogging[0].enabled = parsed.logging.clusterLogging[0].enabled === 'true';
291291
}
292292

293-
if (typeof (parsed.logging?.clusterLogging[1]?.enabled) === 'string') {
294-
parsed.logging.clusterLogging[1].enabled = parsed.logging.clusterLogging[1].enabled === 'false';
295-
}
296-
297293
return parsed;
298294

299295
}

packages/@aws-cdk/aws-eks/lib/cluster-resource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface ClusterResourceProps {
2525
readonly onEventLayer?: lambda.ILayerVersion;
2626
readonly clusterHandlerSecurityGroup?: ec2.ISecurityGroup;
2727
readonly tags?: { [key: string]: string };
28-
readonly logging?: { [key: string]: [ { [key: string]: any }, { [key: string]: any } ] };
28+
readonly logging?: { [key: string]: [ { [key: string]: any } ] };
2929
}
3030

3131
/**

packages/@aws-cdk/aws-eks/lib/cluster.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ export class Cluster extends ClusterBase {
12851285

12861286
private readonly version: KubernetesVersion;
12871287

1288-
private readonly logging?: { [key: string]: [ { [key: string]: any }, { [key: string]: any } ] };
1288+
private readonly logging?: { [key: string]: [ { [key: string]: any } ] };
12891289

12901290
/**
12911291
* A dummy CloudFormation resource that is used as a wait barrier which
@@ -1347,28 +1347,12 @@ export class Cluster extends ClusterBase {
13471347
// Get subnetIds for all selected subnets
13481348
const subnetIds = Array.from(new Set(flatten(selectedSubnetIdsPerGroup)));
13491349

1350-
// The value of clusterLoggingTypeDisabled should be invert of props.clusterLogging.
1351-
let clusterLoggingTypeDisabled: ClusterLoggingTypes[] = [];
1352-
1353-
// Find out type(s) to disable.
1354-
Object.values(ClusterLoggingTypes).forEach(function (key) {
1355-
let clusterLoggingTypeEnabled = Object.values(props.clusterLogging ? Object.values(props.clusterLogging) : []);
1356-
if (!Object.values(clusterLoggingTypeEnabled).includes(key)) {
1357-
clusterLoggingTypeDisabled.push(key);
1358-
};
1359-
});
1360-
1361-
// Leave it untouched as undefined if (props.clusterLogging === undefined).
13621350
this.logging = props.clusterLogging ? {
13631351
clusterLogging: [
13641352
{
13651353
enabled: true,
13661354
types: Object.values(props.clusterLogging),
13671355
},
1368-
{
1369-
enabled: false,
1370-
types: Object.values(clusterLoggingTypeDisabled),
1371-
},
13721356
],
13731357
} : undefined;
13741358

packages/@aws-cdk/aws-eks/test/cluster-resource-provider.test.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,6 @@ describe('cluster resource provider', () => {
566566
types: ['api'],
567567
enabled: true,
568568
},
569-
{
570-
types: ['audit', 'authenticator', 'controllerManager', 'scheduler'],
571-
enabled: false,
572-
},
573569
],
574570
},
575571
}, {
@@ -585,10 +581,6 @@ describe('cluster resource provider', () => {
585581
types: ['api'],
586582
enabled: true,
587583
},
588-
{
589-
types: ['audit', 'authenticator', 'controllerManager', 'scheduler'],
590-
enabled: false,
591-
},
592584
],
593585
},
594586
});
@@ -630,10 +622,6 @@ describe('cluster resource provider', () => {
630622
types: ['api', 'audit', 'authenticator', 'controllerManager', 'scheduler'],
631623
enabled: true,
632624
},
633-
{
634-
types: [],
635-
enabled: false,
636-
},
637625
],
638626
},
639627
resourcesVpcConfig: {
@@ -656,10 +644,6 @@ describe('cluster resource provider', () => {
656644
types: ['api', 'audit', 'authenticator', 'controllerManager', 'scheduler'],
657645
enabled: true,
658646
},
659-
{
660-
types: [],
661-
enabled: false,
662-
},
663647
],
664648
},
665649
resourcesVpcConfig: {

packages/@aws-cdk/aws-eks/test/cluster.test.ts

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,98 +3156,4 @@ describe('cluster', () => {
31563156
},
31573157
});
31583158
});
3159-
3160-
test('create a cluster without logging configure', () => {
3161-
// GIVEN
3162-
const { stack } = testFixture();
3163-
3164-
// WHEN
3165-
new eks.Cluster(stack, 'Cluster', {
3166-
version: CLUSTER_VERSION,
3167-
});
3168-
3169-
// THEN
3170-
Template.fromStack(stack).resourceCountIs('Custom::AWSCDK-EKS-Cluster::Config::logging', 0);
3171-
});
3172-
3173-
test('create a cluster with partial logging configure', () => {
3174-
// GIVEN
3175-
const { stack } = testFixture();
3176-
3177-
// WHEN
3178-
new eks.Cluster(stack, 'Cluster', {
3179-
version: CLUSTER_VERSION,
3180-
clusterLogging: [
3181-
eks.ClusterLoggingTypes.API,
3182-
eks.ClusterLoggingTypes.AUTHENTICATOR,
3183-
eks.ClusterLoggingTypes.SCHEDULER,
3184-
],
3185-
});
3186-
3187-
// THEN
3188-
Template.fromStack(stack).hasResourceProperties('Custom::AWSCDK-EKS-Cluster', {
3189-
Config: {
3190-
logging: {
3191-
clusterLogging: [
3192-
{
3193-
enabled: true,
3194-
types: [
3195-
'api',
3196-
'authenticator',
3197-
'scheduler',
3198-
],
3199-
},
3200-
{
3201-
enabled: false,
3202-
types: [
3203-
'audit',
3204-
'controllerManager',
3205-
],
3206-
},
3207-
],
3208-
},
3209-
},
3210-
});
3211-
});
3212-
3213-
test('create a cluster with all logging configure', () => {
3214-
// GIVEN
3215-
const { stack } = testFixture();
3216-
3217-
// WHEN
3218-
new eks.Cluster(stack, 'Cluster', {
3219-
version: CLUSTER_VERSION,
3220-
clusterLogging: [
3221-
eks.ClusterLoggingTypes.API,
3222-
eks.ClusterLoggingTypes.AUDIT,
3223-
eks.ClusterLoggingTypes.AUTHENTICATOR,
3224-
eks.ClusterLoggingTypes.CONTROLLER_MANAGER,
3225-
eks.ClusterLoggingTypes.SCHEDULER,
3226-
],
3227-
});
3228-
3229-
// THEN
3230-
Template.fromStack(stack).hasResourceProperties('Custom::AWSCDK-EKS-Cluster', {
3231-
Config: {
3232-
logging: {
3233-
clusterLogging: [
3234-
{
3235-
enabled: true,
3236-
types: [
3237-
'api',
3238-
'audit',
3239-
'authenticator',
3240-
'controllerManager',
3241-
'scheduler',
3242-
],
3243-
},
3244-
{
3245-
enabled: false,
3246-
types: [],
3247-
},
3248-
],
3249-
},
3250-
},
3251-
});
3252-
});
32533159
});

packages/@aws-cdk/aws-eks/test/eks-cluster.integ.snapshot/aws-cdk-eks-cluster-test.template.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -825,13 +825,6 @@
825825
"authenticator",
826826
"scheduler"
827827
]
828-
},
829-
{
830-
"enabled": false,
831-
"types": [
832-
"audit",
833-
"controllerManager"
834-
]
835828
}
836829
]
837830
}
@@ -4039,4 +4032,4 @@
40394032
"Default": "/aws/service/bottlerocket/aws-k8s-1.21/x86_64/latest/image_id"
40404033
}
40414034
}
4042-
}
4035+
}

packages/@aws-cdk/aws-eks/test/eks-helm-asset.integ.snapshot/aws-cdk-eks-helm-test.template.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -668,13 +668,6 @@
668668
"authenticator",
669669
"scheduler"
670670
]
671-
},
672-
{
673-
"enabled": false,
674-
"types": [
675-
"audit",
676-
"controllerManager"
677-
]
678671
}
679672
]
680673
}
@@ -1323,4 +1316,4 @@
13231316
"Description": "Artifact hash for asset \"3d78a5cdc39276c4ee8503417d4363951a0693b01cfd99ec9786feed456d012f\""
13241317
}
13251318
}
1326-
}
1319+
}

packages/@aws-cdk/aws-eks/test/fargate.test.ts

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -459,62 +459,7 @@ describe('fargate', () => {
459459

460460
});
461461

462-
test('supports cluster logging without FargateCluster', () => {
463-
// GIVEN
464-
const stack = new Stack();
465-
466-
// WHEN
467-
468-
new eks.FargateCluster(stack, 'FargateCluster', {
469-
version: CLUSTER_VERSION,
470-
});
471-
472-
//THEN
473-
Template.fromStack(stack).resourceCountIs('Custom::AWSCDK-EKS-Cluster::Config::logging', 0);
474-
});
475-
476-
test('supports cluster partial logging enabled with FargateCluster', () => {
477-
// GIVEN
478-
const stack = new Stack();
479-
480-
// WHEN
481-
482-
new eks.FargateCluster(stack, 'FargateCluster', {
483-
version: CLUSTER_VERSION,
484-
clusterLogging: [
485-
eks.ClusterLoggingTypes.API,
486-
eks.ClusterLoggingTypes.AUTHENTICATOR,
487-
eks.ClusterLoggingTypes.SCHEDULER,
488-
],
489-
});
490-
491-
//THEN
492-
Template.fromStack(stack).hasResourceProperties('Custom::AWSCDK-EKS-Cluster', {
493-
Config: {
494-
logging: {
495-
clusterLogging: [
496-
{
497-
enabled: true,
498-
types: [
499-
'api',
500-
'authenticator',
501-
'scheduler',
502-
],
503-
},
504-
{
505-
enabled: false,
506-
types: [
507-
'audit',
508-
'controllerManager',
509-
],
510-
},
511-
],
512-
},
513-
},
514-
});
515-
});
516-
517-
test('supports cluster all logging enabled with FargateCluster', () => {
462+
test('supports cluster logging with FargateCluster', () => {
518463
// GIVEN
519464
const stack = new Stack();
520465

@@ -524,9 +469,7 @@ describe('fargate', () => {
524469
version: CLUSTER_VERSION,
525470
clusterLogging: [
526471
eks.ClusterLoggingTypes.API,
527-
eks.ClusterLoggingTypes.AUDIT,
528472
eks.ClusterLoggingTypes.AUTHENTICATOR,
529-
eks.ClusterLoggingTypes.CONTROLLER_MANAGER,
530473
eks.ClusterLoggingTypes.SCHEDULER,
531474
],
532475
});
@@ -536,20 +479,7 @@ describe('fargate', () => {
536479
Config: {
537480
logging: {
538481
clusterLogging: [
539-
{
540-
enabled: true,
541-
types: [
542-
'api',
543-
'audit',
544-
'authenticator',
545-
'controllerManager',
546-
'scheduler',
547-
],
548-
},
549-
{
550-
enabled: false,
551-
types: [],
552-
},
482+
{ enabled: true, types: ['api', 'authenticator', 'scheduler'] },
553483
],
554484
},
555485
},

0 commit comments

Comments
 (0)