Skip to content

Commit 4c8f3dc

Browse files
author
awstools
committed
feat(client-eks): Adds support for customer-provided placement groups for Kubernetes control plane instances when creating local EKS clusters on Outposts
1 parent 05089b4 commit 4c8f3dc

File tree

4 files changed

+150
-81
lines changed

4 files changed

+150
-81
lines changed

clients/client-eks/src/EKS.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,8 @@ export class EKS extends EKSClient {
239239
/**
240240
* <p>Creates an Amazon EKS add-on.</p>
241241
* <p>Amazon EKS add-ons help to automate the provisioning and lifecycle management
242-
* of common operational software for Amazon EKS clusters. Amazon EKS
243-
* add-ons require clusters running version 1.18 or later because Amazon EKS
244-
* add-ons rely on the Server-side Apply Kubernetes feature, which is only available in
245-
* Kubernetes 1.18 and later. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html">Amazon EKS add-ons</a> in
246-
* the <i>Amazon EKS User Guide</i>.</p>
242+
* of common operational software for Amazon EKS clusters. For more information,
243+
* see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html">Amazon EKS add-ons</a> in the <i>Amazon EKS User Guide</i>.</p>
247244
*/
248245
public createAddon(args: CreateAddonCommandInput, options?: __HttpHandlerOptions): Promise<CreateAddonCommandOutput>;
249246
public createAddon(args: CreateAddonCommandInput, cb: (err: any, data?: CreateAddonCommandOutput) => void): void;

clients/client-eks/src/commands/CreateAddonCommand.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ export interface CreateAddonCommandOutput extends CreateAddonResponse, __Metadat
3131
/**
3232
* <p>Creates an Amazon EKS add-on.</p>
3333
* <p>Amazon EKS add-ons help to automate the provisioning and lifecycle management
34-
* of common operational software for Amazon EKS clusters. Amazon EKS
35-
* add-ons require clusters running version 1.18 or later because Amazon EKS
36-
* add-ons rely on the Server-side Apply Kubernetes feature, which is only available in
37-
* Kubernetes 1.18 and later. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html">Amazon EKS add-ons</a> in
38-
* the <i>Amazon EKS User Guide</i>.</p>
34+
* of common operational software for Amazon EKS clusters. For more information,
35+
* see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html">Amazon EKS add-ons</a> in the <i>Amazon EKS User Guide</i>.</p>
3936
* @example
4037
* Use a bare-bones client and the command you need to make an API call.
4138
* ```javascript

clients/client-eks/src/models/models_0.ts

Lines changed: 119 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,16 @@ export interface AddonHealth {
6666
issues?: AddonIssue[];
6767
}
6868

69-
export type AddonStatus =
70-
| "ACTIVE"
71-
| "CREATE_FAILED"
72-
| "CREATING"
73-
| "DEGRADED"
74-
| "DELETE_FAILED"
75-
| "DELETING"
76-
| "UPDATE_FAILED"
77-
| "UPDATING";
69+
export enum AddonStatus {
70+
ACTIVE = "ACTIVE",
71+
CREATE_FAILED = "CREATE_FAILED",
72+
CREATING = "CREATING",
73+
DEGRADED = "DEGRADED",
74+
DELETE_FAILED = "DELETE_FAILED",
75+
DELETING = "DELETING",
76+
UPDATE_FAILED = "UPDATE_FAILED",
77+
UPDATING = "UPDATING",
78+
}
7879

7980
/**
8081
* <p>An Amazon EKS add-on. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html">Amazon EKS add-ons</a> in
@@ -196,15 +197,16 @@ export interface AddonInfo {
196197
addonVersions?: AddonVersionInfo[];
197198
}
198199

199-
export type AMITypes =
200-
| "AL2_ARM_64"
201-
| "AL2_x86_64"
202-
| "AL2_x86_64_GPU"
203-
| "BOTTLEROCKET_ARM_64"
204-
| "BOTTLEROCKET_ARM_64_NVIDIA"
205-
| "BOTTLEROCKET_x86_64"
206-
| "BOTTLEROCKET_x86_64_NVIDIA"
207-
| "CUSTOM";
200+
export enum AMITypes {
201+
AL2_ARM_64 = "AL2_ARM_64",
202+
AL2_x86_64 = "AL2_x86_64",
203+
AL2_x86_64_GPU = "AL2_x86_64_GPU",
204+
BOTTLEROCKET_ARM_64 = "BOTTLEROCKET_ARM_64",
205+
BOTTLEROCKET_ARM_64_NVIDIA = "BOTTLEROCKET_ARM_64_NVIDIA",
206+
BOTTLEROCKET_x86_64 = "BOTTLEROCKET_x86_64",
207+
BOTTLEROCKET_x86_64_NVIDIA = "BOTTLEROCKET_x86_64_NVIDIA",
208+
CUSTOM = "CUSTOM",
209+
}
208210

209211
/**
210212
* <p>Identifies the Key Management Service (KMS) key used to encrypt the
@@ -767,7 +769,11 @@ export interface AutoScalingGroup {
767769
name?: string;
768770
}
769771

770-
export type ResolveConflicts = "NONE" | "OVERWRITE" | "PRESERVE";
772+
export enum ResolveConflicts {
773+
NONE = "NONE",
774+
OVERWRITE = "OVERWRITE",
775+
PRESERVE = "PRESERVE",
776+
}
771777

772778
export interface CreateAddonRequest {
773779
/**
@@ -939,9 +945,23 @@ export interface Logging {
939945
clusterLogging?: LogSetup[];
940946
}
941947

948+
/**
949+
* <p>The placement configuration for all the control plane instance of your local Amazon EKS cluster on an Amazon Web Services Outpost. For more information, see
950+
* <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html">Capacity
951+
* considerations</a> in the <i>Amazon EKS User Guide</i>
952+
* </p>
953+
*/
954+
export interface ControlPlanePlacementRequest {
955+
/**
956+
* <p>The name of the placement group for the Kubernetes control plane instances. This
957+
* setting can't be changed after cluster creation. </p>
958+
*/
959+
groupName?: string;
960+
}
961+
942962
/**
943963
* <p>The configuration of your local Amazon EKS cluster on an Amazon Web Services
944-
* Outpost. Before creating a cluster on an Outpost, review <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-cluster-outpost.html">Creating a local Amazon EKS cluster on an Amazon Web Services Outpost</a> in the
964+
* Outpost. Before creating a cluster on an Outpost, review <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-create.html">Creating a local cluster on an Outpost</a> in the
945965
* <i>Amazon EKS User Guide</i>. This API isn't available for Amazon EKS clusters on the
946966
* Amazon Web Services cloud.</p>
947967
*/
@@ -954,30 +974,22 @@ export interface OutpostConfigRequest {
954974
outpostArns: string[] | undefined;
955975

956976
/**
957-
* <p>The Amazon EC2 instance type that you want to use for your local Amazon EKS cluster on Outposts. The instance type that you specify is used for all
958-
* Kubernetes control plane instances. The instance type can't be changed after cluster
959-
* creation.</p>
960-
* <p>Choose an instance type based on the number of nodes that your cluster will have. If
961-
* your cluster will have:</p>
962-
* <ul>
963-
* <li>
964-
* <p>1–20 nodes, then we recommend specifying a <code>large</code> instance
965-
* type.</p>
966-
* </li>
967-
* <li>
968-
* <p>21–100 nodes, then we recommend specifying an <code>xlarge</code>
969-
* instance type.</p>
970-
* </li>
971-
* <li>
972-
* <p>101–250 nodes, then we recommend specifying a <code>2xlarge</code>
973-
* instance type.</p>
974-
* </li>
975-
* </ul>
976-
* <p>For a list of the available Amazon EC2 instance types, see Compute and storage
977-
* in <a href="http://aws.amazon.com/outposts/rack/features/">Outposts rack
978-
* features</a>. The control plane is not automatically scaled by Amazon EKS.</p>
977+
* <p>The Amazon EC2 instance type that you want to use for your local Amazon EKS cluster on Outposts. Choose an instance type based on the number of nodes
978+
* that your cluster will have. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html">Capacity
979+
* considerations</a> in the <i>Amazon EKS User Guide</i>.</p>
980+
* <p>The instance type that you specify is used for all Kubernetes control plane instances. The
981+
* instance type can't be changed after cluster creation. The control plane is not
982+
* automatically scaled by Amazon EKS.</p>
983+
* <p> </p>
979984
*/
980985
controlPlaneInstanceType: string | undefined;
986+
987+
/**
988+
* <p>An object representing the placement configuration for all the control plane instance
989+
* of your local Amazon EKS cluster on an Amazon Web Services Outpost. For more
990+
* information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html">Capacity considerations</a> in the <i>Amazon EKS User Guide</i>.</p>
991+
*/
992+
controlPlanePlacement?: ControlPlanePlacementRequest;
981993
}
982994

983995
/**
@@ -997,16 +1009,7 @@ export interface VpcConfigRequest {
9971009
* that Amazon EKS creates to use that allow communication between your nodes and
9981010
* the Kubernetes control plane. If you don't specify any security groups, then familiarize
9991011
* yourself with the difference between Amazon EKS defaults for clusters deployed
1000-
* with Kubernetes:</p>
1001-
* <ul>
1002-
* <li>
1003-
* <p>1.14 Amazon EKS platform version <code>eks.2</code> and earlier</p>
1004-
* </li>
1005-
* <li>
1006-
* <p>1.14 Amazon EKS platform version <code>eks.3</code> and later </p>
1007-
* </li>
1008-
* </ul>
1009-
* <p>For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html">Amazon EKS security group
1012+
* with Kubernetes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html">Amazon EKS security group
10101013
* considerations</a> in the <i>
10111014
* <i>Amazon EKS User Guide</i>
10121015
* </i>.</p>
@@ -1128,7 +1131,7 @@ export interface CreateClusterRequest {
11281131
/**
11291132
* <p>An object representing the configuration of your local Amazon EKS cluster on
11301133
* an Amazon Web Services Outpost. Before creating a local cluster on an Outpost, review
1131-
* <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-cluster-outpost.html">Creating an Amazon EKS cluster on an Amazon Web Services Outpost</a> in
1134+
* <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html">Local clusters for Amazon EKS on Amazon Web Services Outposts</a> in
11321135
* the <i>Amazon EKS User Guide</i>. This object isn't available for creating Amazon EKS
11331136
* clusters on the Amazon Web Services
11341137
* cloud.</p>
@@ -1283,6 +1286,17 @@ export interface KubernetesNetworkConfigResponse {
12831286
ipFamily?: IpFamily | string;
12841287
}
12851288

1289+
/**
1290+
* <p>The placement configuration for all the control plane instance of your local Amazon EKS cluster on an Amazon Web Services Outpost. For more information, see
1291+
* <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html">Capacity considerations</a> in the <i>Amazon EKS User Guide</i>.</p>
1292+
*/
1293+
export interface ControlPlanePlacementResponse {
1294+
/**
1295+
* <p>The name of the placement group for the Kubernetes control plane instances.</p>
1296+
*/
1297+
groupName?: string;
1298+
}
1299+
12861300
/**
12871301
* <p>An object representing the configuration of your local Amazon EKS cluster on
12881302
* an Amazon Web Services Outpost. This API isn't available for Amazon EKS clusters
@@ -1301,6 +1315,14 @@ export interface OutpostConfigResponse {
13011315
* instances.</p>
13021316
*/
13031317
controlPlaneInstanceType: string | undefined;
1318+
1319+
/**
1320+
* <p>An object representing the placement configuration for all the control plane instance
1321+
* of your local Amazon EKS cluster on an Amazon Web Services Outpost. For more
1322+
* information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html">Capacity
1323+
* considerations</a> in the <i>Amazon EKS User Guide</i>.</p>
1324+
*/
1325+
controlPlanePlacement?: ControlPlanePlacementResponse;
13041326
}
13051327

13061328
/**
@@ -1367,7 +1389,14 @@ export interface VpcConfigResponse {
13671389
publicAccessCidrs?: string[];
13681390
}
13691391

1370-
export type ClusterStatus = "ACTIVE" | "CREATING" | "DELETING" | "FAILED" | "PENDING" | "UPDATING";
1392+
export enum ClusterStatus {
1393+
ACTIVE = "ACTIVE",
1394+
CREATING = "CREATING",
1395+
DELETING = "DELETING",
1396+
FAILED = "FAILED",
1397+
PENDING = "PENDING",
1398+
UPDATING = "UPDATING",
1399+
}
13711400

13721401
/**
13731402
* <p>An object representing an Amazon EKS cluster.</p>
@@ -1654,7 +1683,13 @@ export interface CreateFargateProfileRequest {
16541683
tags?: Record<string, string>;
16551684
}
16561685

1657-
export type FargateProfileStatus = "ACTIVE" | "CREATE_FAILED" | "CREATING" | "DELETE_FAILED" | "DELETING";
1686+
export enum FargateProfileStatus {
1687+
ACTIVE = "ACTIVE",
1688+
CREATE_FAILED = "CREATE_FAILED",
1689+
CREATING = "CREATING",
1690+
DELETE_FAILED = "DELETE_FAILED",
1691+
DELETING = "DELETING",
1692+
}
16581693

16591694
/**
16601695
* <p>An object representing an Fargate profile.</p>
@@ -1721,7 +1756,10 @@ export interface CreateFargateProfileResponse {
17211756
fargateProfile?: FargateProfile;
17221757
}
17231758

1724-
export type CapacityTypes = "ON_DEMAND" | "SPOT";
1759+
export enum CapacityTypes {
1760+
ON_DEMAND = "ON_DEMAND",
1761+
SPOT = "SPOT",
1762+
}
17251763

17261764
/**
17271765
* <p>An object representing a node group launch template specification. The launch template
@@ -1752,13 +1790,8 @@ export interface LaunchTemplateSpecification {
17521790
name?: string;
17531791

17541792
/**
1755-
* <p>The launch template version number, <code>$Latest</code>, or
1756-
* <code>$Default</code>.</p>
1757-
* <p>If the value is <code>$Latest</code>, Amazon EKS uses the latest version of
1758-
* the launch template.</p>
1759-
* <p>If the value is <code>$Default</code>, Amazon EKS uses the default version of
1760-
* the launch template.</p>
1761-
* <p>Default: The default version of the launch template.</p>
1793+
* <p>The version number of the launch template to use. If no version is specified, then the
1794+
* template's default version is used.</p>
17621795
*/
17631796
version?: string;
17641797

@@ -2192,14 +2225,15 @@ export interface NodegroupResources {
21922225
remoteAccessSecurityGroup?: string;
21932226
}
21942227

2195-
export type NodegroupStatus =
2196-
| "ACTIVE"
2197-
| "CREATE_FAILED"
2198-
| "CREATING"
2199-
| "DEGRADED"
2200-
| "DELETE_FAILED"
2201-
| "DELETING"
2202-
| "UPDATING";
2228+
export enum NodegroupStatus {
2229+
ACTIVE = "ACTIVE",
2230+
CREATE_FAILED = "CREATE_FAILED",
2231+
CREATING = "CREATING",
2232+
DEGRADED = "DEGRADED",
2233+
DELETE_FAILED = "DELETE_FAILED",
2234+
DELETING = "DELETING",
2235+
UPDATING = "UPDATING",
2236+
}
22032237

22042238
/**
22052239
* <p>An object representing an Amazon EKS managed node group.</p>
@@ -3655,6 +3689,13 @@ export const LoggingFilterSensitiveLog = (obj: Logging): any => ({
36553689
...obj,
36563690
});
36573691

3692+
/**
3693+
* @internal
3694+
*/
3695+
export const ControlPlanePlacementRequestFilterSensitiveLog = (obj: ControlPlanePlacementRequest): any => ({
3696+
...obj,
3697+
});
3698+
36583699
/**
36593700
* @internal
36603701
*/
@@ -3725,6 +3766,13 @@ export const KubernetesNetworkConfigResponseFilterSensitiveLog = (obj: Kubernete
37253766
...obj,
37263767
});
37273768

3769+
/**
3770+
* @internal
3771+
*/
3772+
export const ControlPlanePlacementResponseFilterSensitiveLog = (obj: ControlPlanePlacementResponse): any => ({
3773+
...obj,
3774+
});
3775+
37283776
/**
37293777
* @internal
37303778
*/

clients/client-eks/src/protocols/Aws_restJson1.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ import {
118118
Compatibility,
119119
ConnectorConfigRequest,
120120
ConnectorConfigResponse,
121+
ControlPlanePlacementRequest,
122+
ControlPlanePlacementResponse,
121123
EncryptionConfig,
122124
ErrorDetail,
123125
FargateProfile,
@@ -3272,6 +3274,15 @@ const serializeAws_restJson1ConnectorConfigRequest = (input: ConnectorConfigRequ
32723274
};
32733275
};
32743276

3277+
const serializeAws_restJson1ControlPlanePlacementRequest = (
3278+
input: ControlPlanePlacementRequest,
3279+
context: __SerdeContext
3280+
): any => {
3281+
return {
3282+
...(input.groupName != null && { groupName: input.groupName }),
3283+
};
3284+
};
3285+
32753286
const serializeAws_restJson1EncryptionConfig = (input: EncryptionConfig, context: __SerdeContext): any => {
32763287
return {
32773288
...(input.provider != null && { provider: serializeAws_restJson1Provider(input.provider, context) }),
@@ -3428,6 +3439,9 @@ const serializeAws_restJson1OidcIdentityProviderConfigRequest = (
34283439
const serializeAws_restJson1OutpostConfigRequest = (input: OutpostConfigRequest, context: __SerdeContext): any => {
34293440
return {
34303441
...(input.controlPlaneInstanceType != null && { controlPlaneInstanceType: input.controlPlaneInstanceType }),
3442+
...(input.controlPlanePlacement != null && {
3443+
controlPlanePlacement: serializeAws_restJson1ControlPlanePlacementRequest(input.controlPlanePlacement, context),
3444+
}),
34313445
...(input.outpostArns != null && { outpostArns: serializeAws_restJson1StringList(input.outpostArns, context) }),
34323446
};
34333447
};
@@ -3750,6 +3764,15 @@ const deserializeAws_restJson1ConnectorConfigResponse = (
37503764
} as any;
37513765
};
37523766

3767+
const deserializeAws_restJson1ControlPlanePlacementResponse = (
3768+
output: any,
3769+
context: __SerdeContext
3770+
): ControlPlanePlacementResponse => {
3771+
return {
3772+
groupName: __expectString(output.groupName),
3773+
} as any;
3774+
};
3775+
37533776
const deserializeAws_restJson1EncryptionConfig = (output: any, context: __SerdeContext): EncryptionConfig => {
37543777
return {
37553778
provider: output.provider != null ? deserializeAws_restJson1Provider(output.provider, context) : undefined,
@@ -4082,6 +4105,10 @@ const deserializeAws_restJson1OidcIdentityProviderConfig = (
40824105
const deserializeAws_restJson1OutpostConfigResponse = (output: any, context: __SerdeContext): OutpostConfigResponse => {
40834106
return {
40844107
controlPlaneInstanceType: __expectString(output.controlPlaneInstanceType),
4108+
controlPlanePlacement:
4109+
output.controlPlanePlacement != null
4110+
? deserializeAws_restJson1ControlPlanePlacementResponse(output.controlPlanePlacement, context)
4111+
: undefined,
40854112
outpostArns:
40864113
output.outpostArns != null ? deserializeAws_restJson1StringList(output.outpostArns, context) : undefined,
40874114
} as any;

0 commit comments

Comments
 (0)