Skip to content

Commit 0cbdf58

Browse files
authored
chore(eks): remove whitespace and stylistic updates (#22674)
Somehow eks (and maybe more modules) was immune to my prior attack on unnecessary whitespace. Also some stylistic changes to readmes and some commas here and there. No actual code changes. ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 4e858f2 commit 0cbdf58

15 files changed

+67
-236
lines changed

packages/@aws-cdk/aws-eks/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,11 @@ The kubectl handler uses `kubectl`, `helm` and the `aws` CLI in order to
676676
interact with the cluster. These are bundled into AWS Lambda layers included in
677677
the `@aws-cdk/lambda-layer-awscli` and `@aws-cdk/lambda-layer-kubectl` modules.
678678

679-
The version of kubectl used must be compatible wtih the Kubernetes version of the cluster. kubectl is supported within one minor version (older or newer) of Kubernetes (see [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/#kubectl)). Only version 1.20 of kubectl is available in `aws-cdk-lib`. If you need a different version, you will need to use one of the `@aws-cdk/lambda-layer-kubectlvXY` packages.
679+
The version of kubectl used must be compatible with the Kubernetes version of the
680+
cluster. kubectl is supported within one minor version (older or newer) of Kubernetes
681+
(see [Kubernetes version skew policy](https://kubernetes.io/releases/version-skew-policy/#kubectl)).
682+
Only version 1.20 of kubectl is available in `aws-cdk-lib`. If you need a different
683+
version, you will need to use one of the `@aws-cdk/lambda-layer-kubectlvXY` packages.
680684

681685
```ts
682686
import { KubectlV22Layer } from '@aws-cdk/lambda-layer-kubectl-v22';
@@ -685,7 +689,6 @@ const cluster = new eks.Cluster(this, 'hello-eks', {
685689
version: eks.KubernetesVersion.V1_22,
686690
kubectlLayer: new KubectlV22Layer(this, 'kubectl'),
687691
});
688-
689692
```
690693

691694
You can also specify a custom `lambda.LayerVersion` if you wish to use a

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,7 @@ export enum CoreDnsComputeType {
23112311
/**
23122312
* Deploy CoreDNS on Fargate-managed instances.
23132313
*/
2314-
FARGATE = 'fargate'
2314+
FARGATE = 'fargate',
23152315
}
23162316

23172317
/**
@@ -2325,7 +2325,7 @@ export enum DefaultCapacityType {
23252325
/**
23262326
* EC2 autoscaling group
23272327
*/
2328-
EC2
2328+
EC2,
23292329
}
23302330

23312331
/**
@@ -2339,7 +2339,7 @@ export enum MachineImageType {
23392339
/**
23402340
* Bottlerocket AMI
23412341
*/
2342-
BOTTLEROCKET
2342+
BOTTLEROCKET,
23432343
}
23442344

23452345
function nodeTypeForInstanceType(instanceType: ec2.InstanceType) {

packages/@aws-cdk/aws-eks/test/alb-controller.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Cluster, KubernetesVersion, AlbController, AlbControllerVersion, HelmCh
66
import { testFixture } from './util';
77

88
test('all vended policies are valid', () => {
9-
109
const addOnsDir = path.join(__dirname, '..', 'lib', 'addons');
1110

1211
for (const addOn of fs.readdirSync(addOnsDir)) {
@@ -23,11 +22,9 @@ test('all vended policies are valid', () => {
2322
}
2423
}
2524
}
26-
2725
});
2826

2927
test('can configure a custom repository', () => {
30-
3128
const { stack } = testFixture();
3229

3330
const cluster = new Cluster(stack, 'Cluster', {
@@ -58,11 +55,9 @@ test('can configure a custom repository', () => {
5855
],
5956
},
6057
});
61-
6258
});
6359

6460
test('throws when a policy is not defined for a custom version', () => {
65-
6661
const { stack } = testFixture();
6762

6863
const cluster = new Cluster(stack, 'Cluster', {
@@ -73,5 +68,4 @@ test('throws when a policy is not defined for a custom version', () => {
7368
cluster,
7469
version: AlbControllerVersion.of('custom'),
7570
})).toThrowError("'albControllerOptions.policy' is required when using a custom controller version");
76-
7771
});

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import { testFixtureNoVpc } from './util';
1010
const CLUSTER_VERSION = KubernetesVersion.V1_16;
1111

1212
describe('aws auth', () => {
13-
1413
test('throws when adding a role from a different stack', () => {
15-
1614
const app = new cdk.App();
1715
const clusterStack = new cdk.Stack(app, 'ClusterStack');
1816
const roleStack = new cdk.Stack(app, 'RoleStack');
@@ -26,12 +24,9 @@ describe('aws auth', () => {
2624
}).toThrow(
2725
'RoleStack/Role should be defined in the scope of the ClusterStack stack to prevent circular dependencies',
2826
);
29-
30-
3127
});
3228

3329
test('throws when adding a user from a different stack', () => {
34-
3530
const app = new cdk.App();
3631
const clusterStack = new cdk.Stack(app, 'ClusterStack');
3732
const userStack = new cdk.Stack(app, 'UserStack');
@@ -45,8 +40,6 @@ describe('aws auth', () => {
4540
}).toThrow(
4641
'UserStack/User should be defined in the scope of the ClusterStack stack to prevent circular dependencies',
4742
);
48-
49-
5043
});
5144

5245
test('empty aws-auth', () => {
@@ -66,7 +59,6 @@ describe('aws auth', () => {
6659
data: { mapRoles: '[]', mapUsers: '[]', mapAccounts: '[]' },
6760
}]),
6861
});
69-
7062
});
7163

7264
test('addRoleMapping and addUserMapping can be used to define the aws-auth ConfigMap', () => {
@@ -159,8 +151,6 @@ describe('aws auth', () => {
159151
],
160152
},
161153
});
162-
163-
164154
});
165155

166156
test('imported users and roles can be also be used', () => {
@@ -222,9 +212,8 @@ describe('aws auth', () => {
222212
],
223213
},
224214
});
225-
226-
227215
});
216+
228217
test('addMastersRole after addNodegroup correctly', () => {
229218
// GIVEN
230219
const { stack } = testFixtureNoVpc();
@@ -283,7 +272,5 @@ describe('aws auth', () => {
283272
],
284273
},
285274
});
286-
287-
288275
});
289276
});

0 commit comments

Comments
 (0)