Skip to content

Commit b612613

Browse files
author
awstools
committed
feat(client-eks): EKS Add-ons Custom Namespace Support
1 parent e39ef0e commit b612613

File tree

7 files changed

+117
-0
lines changed

7 files changed

+117
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export interface CreateAddonCommandOutput extends CreateAddonResponse, __Metadat
5555
* roleArn: "STRING_VALUE", // required
5656
* },
5757
* ],
58+
* namespaceConfig: { // AddonNamespaceConfigRequest
59+
* namespace: "STRING_VALUE",
60+
* },
5861
* };
5962
* const command = new CreateAddonCommand(input);
6063
* const response = await client.send(command);
@@ -92,6 +95,9 @@ export interface CreateAddonCommandOutput extends CreateAddonResponse, __Metadat
9295
* // podIdentityAssociations: [
9396
* // "STRING_VALUE",
9497
* // ],
98+
* // namespaceConfig: { // AddonNamespaceConfigResponse
99+
* // namespace: "STRING_VALUE",
100+
* // },
95101
* // },
96102
* // };
97103
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export interface DeleteAddonCommandOutput extends DeleteAddonResponse, __Metadat
7878
* // podIdentityAssociations: [
7979
* // "STRING_VALUE",
8080
* // ],
81+
* // namespaceConfig: { // AddonNamespaceConfigResponse
82+
* // namespace: "STRING_VALUE",
83+
* // },
8184
* // },
8285
* // };
8386
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ export interface DescribeAddonCommandOutput extends DescribeAddonResponse, __Met
7575
* // podIdentityAssociations: [
7676
* // "STRING_VALUE",
7777
* // ],
78+
* // namespaceConfig: { // AddonNamespaceConfigResponse
79+
* // namespace: "STRING_VALUE",
80+
* // },
7881
* // },
7982
* // };
8083
*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export interface DescribeAddonVersionsCommandOutput extends DescribeAddonVersion
8888
* // productId: "STRING_VALUE",
8989
* // productUrl: "STRING_VALUE",
9090
* // },
91+
* // defaultNamespace: "STRING_VALUE",
9192
* // },
9293
* // ],
9394
* // nextToken: "STRING_VALUE",

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,18 @@ export interface MarketplaceInformation {
274274
productUrl?: string | undefined;
275275
}
276276

277+
/**
278+
* <p>The namespace configuration response object containing information about the namespace where an addon is installed.</p>
279+
* @public
280+
*/
281+
export interface AddonNamespaceConfigResponse {
282+
/**
283+
* <p>The name of the Kubernetes namespace where the addon is installed.</p>
284+
* @public
285+
*/
286+
namespace?: string | undefined;
287+
}
288+
277289
/**
278290
* @public
279291
* @enum
@@ -395,6 +407,12 @@ export interface Addon {
395407
* @public
396408
*/
397409
podIdentityAssociations?: string[] | undefined;
410+
411+
/**
412+
* <p>The namespace configuration for the addon. This specifies the Kubernetes namespace where the addon is installed.</p>
413+
* @public
414+
*/
415+
namespaceConfig?: AddonNamespaceConfigResponse | undefined;
398416
}
399417

400418
/**
@@ -524,6 +542,24 @@ export interface AddonInfo {
524542
* @public
525543
*/
526544
marketplaceInformation?: MarketplaceInformation | undefined;
545+
546+
/**
547+
* <p>The default Kubernetes namespace where this addon is typically installed if no custom namespace is specified.</p>
548+
* @public
549+
*/
550+
defaultNamespace?: string | undefined;
551+
}
552+
553+
/**
554+
* <p>The namespace configuration request object for specifying a custom namespace when creating an addon.</p>
555+
* @public
556+
*/
557+
export interface AddonNamespaceConfigRequest {
558+
/**
559+
* <p>The name of the Kubernetes namespace to install the addon in. Must be a valid RFC 1123 DNS label.</p>
560+
* @public
561+
*/
562+
namespace?: string | undefined;
527563
}
528564

529565
/**
@@ -1746,6 +1782,12 @@ export interface CreateAddonRequest {
17461782
* @public
17471783
*/
17481784
podIdentityAssociations?: AddonPodIdentityAssociations[] | undefined;
1785+
1786+
/**
1787+
* <p>The namespace configuration for the addon. If specified, this will override the default namespace for the addon.</p>
1788+
* @public
1789+
*/
1790+
namespaceConfig?: AddonNamespaceConfigRequest | undefined;
17491791
}
17501792

17511793
/**

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ import {
182182
AccessEntry,
183183
AccessScope,
184184
Addon,
185+
AddonNamespaceConfigRequest,
185186
AddonPodIdentityAssociations,
186187
AssociatedAccessPolicy,
187188
BadRequestException,
@@ -371,6 +372,7 @@ export const se_CreateAddonCommand = async (
371372
addonVersion: [],
372373
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
373374
configurationValues: [],
375+
namespaceConfig: (_) => _json(_),
374376
podIdentityAssociations: (_) => _json(_),
375377
resolveConflicts: [],
376378
serviceAccountRoleArn: [],
@@ -3112,6 +3114,8 @@ const de_UnsupportedAvailabilityZoneExceptionRes = async (
31123114

31133115
// se_AccessScope omitted.
31143116

3117+
// se_AddonNamespaceConfigRequest omitted.
3118+
31153119
// se_AddonPodIdentityAssociations omitted.
31163120

31173121
// se_AddonPodIdentityAssociationsList omitted.
@@ -3253,6 +3257,7 @@ const de_Addon = (output: any, context: __SerdeContext): Addon => {
32533257
health: _json,
32543258
marketplaceInformation: _json,
32553259
modifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3260+
namespaceConfig: _json,
32563261
owner: __expectString,
32573262
podIdentityAssociations: _json,
32583263
publisher: __expectString,
@@ -3274,6 +3279,8 @@ const de_Addon = (output: any, context: __SerdeContext): Addon => {
32743279

32753280
// de_AddonIssueList omitted.
32763281

3282+
// de_AddonNamespaceConfigResponse omitted.
3283+
32773284
// de_AddonPodIdentityConfiguration omitted.
32783285

32793286
// de_AddonPodIdentityConfigurationList omitted.

codegen/sdk-codegen/aws-models/eks.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,6 +1631,12 @@
16311631
"traits": {
16321632
"smithy.api#documentation": "<p>An array of EKS Pod Identity associations owned by the add-on. Each association maps a role to a service\n account in a namespace in the cluster.</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html\">Attach an IAM Role to an Amazon EKS add-on\n using EKS Pod Identity</a> in the <i>Amazon EKS User Guide</i>.</p>"
16331633
}
1634+
},
1635+
"namespaceConfig": {
1636+
"target": "com.amazonaws.eks#AddonNamespaceConfigResponse",
1637+
"traits": {
1638+
"smithy.api#documentation": "<p>The namespace configuration for the addon. This specifies the Kubernetes namespace where the addon is installed.</p>"
1639+
}
16341640
}
16351641
},
16361642
"traits": {
@@ -1715,6 +1721,12 @@
17151721
"traits": {
17161722
"smithy.api#documentation": "<p>Information about the add-on from the Amazon Web Services Marketplace.</p>"
17171723
}
1724+
},
1725+
"defaultNamespace": {
1726+
"target": "com.amazonaws.eks#String",
1727+
"traits": {
1728+
"smithy.api#documentation": "<p>The default Kubernetes namespace where this addon is typically installed if no custom namespace is specified.</p>"
1729+
}
17181730
}
17191731
},
17201732
"traits": {
@@ -1818,6 +1830,34 @@
18181830
"target": "com.amazonaws.eks#AddonIssue"
18191831
}
18201832
},
1833+
"com.amazonaws.eks#AddonNamespaceConfigRequest": {
1834+
"type": "structure",
1835+
"members": {
1836+
"namespace": {
1837+
"target": "com.amazonaws.eks#namespace",
1838+
"traits": {
1839+
"smithy.api#documentation": "<p>The name of the Kubernetes namespace to install the addon in. Must be a valid RFC 1123 DNS label.</p>"
1840+
}
1841+
}
1842+
},
1843+
"traits": {
1844+
"smithy.api#documentation": "<p>The namespace configuration request object for specifying a custom namespace when creating an addon.</p>"
1845+
}
1846+
},
1847+
"com.amazonaws.eks#AddonNamespaceConfigResponse": {
1848+
"type": "structure",
1849+
"members": {
1850+
"namespace": {
1851+
"target": "com.amazonaws.eks#namespace",
1852+
"traits": {
1853+
"smithy.api#documentation": "<p>The name of the Kubernetes namespace where the addon is installed.</p>"
1854+
}
1855+
}
1856+
},
1857+
"traits": {
1858+
"smithy.api#documentation": "<p>The namespace configuration response object containing information about the namespace where an addon is installed.</p>"
1859+
}
1860+
},
18211861
"com.amazonaws.eks#AddonPodIdentityAssociations": {
18221862
"type": "structure",
18231863
"members": {
@@ -3451,6 +3491,12 @@
34513491
"traits": {
34523492
"smithy.api#documentation": "<p>An array of EKS Pod Identity associations to be created. Each association maps a Kubernetes service account to\n an IAM role.</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html\">Attach an IAM Role to an Amazon EKS add-on\n using EKS Pod Identity</a> in the <i>Amazon EKS User Guide</i>.</p>"
34533493
}
3494+
},
3495+
"namespaceConfig": {
3496+
"target": "com.amazonaws.eks#AddonNamespaceConfigRequest",
3497+
"traits": {
3498+
"smithy.api#documentation": "<p>The namespace configuration for the addon. If specified, this will override the default namespace for the addon.</p>"
3499+
}
34543500
}
34553501
},
34563502
"traits": {
@@ -11944,6 +11990,15 @@
1194411990
"target": "com.amazonaws.eks#labelValue"
1194511991
}
1194611992
},
11993+
"com.amazonaws.eks#namespace": {
11994+
"type": "string",
11995+
"traits": {
11996+
"smithy.api#length": {
11997+
"min": 1,
11998+
"max": 63
11999+
}
12000+
}
12001+
},
1194712002
"com.amazonaws.eks#requiredClaimsKey": {
1194812003
"type": "string",
1194912004
"traits": {

0 commit comments

Comments
 (0)