diff --git a/API.md b/API.md index a45a0d4..3aed592 100644 --- a/API.md +++ b/API.md @@ -2,172 +2,37 @@ ## Constructs -### CommonHelmCharts - -#### Initializers - -```typescript -import { CommonHelmCharts } from '@smallcase/cdk-eks-cluster-module' - -new CommonHelmCharts(scope: Construct, id: string, props: CommonHelmChartsProps) -``` - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | CommonHelmChartsProps | *No description.* | - ---- - -##### `scope`Required - -- *Type:* constructs.Construct - ---- - -##### `id`Required - -- *Type:* string - ---- - -##### `props`Required - -- *Type:* CommonHelmChartsProps - ---- - -#### Methods - -| **Name** | **Description** | -| --- | --- | -| toString | Returns a string representation of this construct. | -| with | Applies one or more mixins to this construct. | - ---- - -##### `toString` - -```typescript -public toString(): string -``` - -Returns a string representation of this construct. - -##### `with` - -```typescript -public with(mixins: ...IMixin[]): IConstruct -``` - -Applies one or more mixins to this construct. - -Mixins are applied in order. The list of constructs is captured at the -start of the call, so constructs added by a mixin will not be visited. -Use multiple `with()` calls if subsequent mixins should apply to added -constructs. - -###### `mixins`Required - -- *Type:* ...constructs.IMixin[] - -The mixins to apply. - ---- - -#### Static Functions - -| **Name** | **Description** | -| --- | --- | -| isConstruct | Checks if `x` is a construct. | - ---- - -##### `isConstruct` - -```typescript -import { CommonHelmCharts } from '@smallcase/cdk-eks-cluster-module' - -CommonHelmCharts.isConstruct(x: any) -``` - -Checks if `x` is a construct. - -Use this method instead of `instanceof` to properly detect `Construct` -instances, even when the construct library is symlinked. - -Explanation: in JavaScript, multiple copies of the `constructs` library on -disk are seen as independent, completely different libraries. As a -consequence, the class `Construct` in each copy of the `constructs` library -is seen as a different class, and an instance of one class will not test as -`instanceof` the other class. `npm install` will not create installations -like this, but users may manually symlink construct libraries together or -use a monorepo tool: in those cases, multiple copies of the `constructs` -library can be accidentally installed, and `instanceof` will behave -unpredictably. It is safest to avoid using `instanceof`, and using -this type-testing method instead. - -###### `x`Required - -- *Type:* any - -Any object. - ---- - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| node | constructs.Node | The tree node. | - ---- - -##### `node`Required - -```typescript -public readonly node: Node; -``` - -- *Type:* constructs.Node - -The tree node. - ---- - - -### CoreDnsAddon +### AwsEfsCsiAddon -#### Initializers +#### Initializers ```typescript -import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' +import { AwsEfsCsiAddon } from '@smallcase/cdk-eks-cluster-module' -new CoreDnsAddon(scope: Construct, id: string, props: CoreAddonProps) +new AwsEfsCsiAddon(scope: Construct, id: string, props: CoreAddonProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | CoreAddonProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | CoreAddonProps | *No description.* | --- -##### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -##### `id`Required +##### `id`Required - *Type:* string --- -##### `props`Required +##### `props`Required - *Type:* CoreAddonProps @@ -177,28 +42,28 @@ new CoreDnsAddon(scope: Construct, id: string, props: CoreAddonProps) | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | -| with | Applies one or more mixins to this construct. | -| overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. | -| addDeletionOverride | Syntactic sugar for `addOverride(path, undefined)`. | -| addDependency | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | -| addDependsOn | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | -| addMetadata | Add a value to the CloudFormation Resource Metadata. | -| addOverride | Adds an override to the synthesized CloudFormation resource. | -| addPropertyDeletionOverride | Adds an override that deletes the value of a property from the resource definition. | -| addPropertyOverride | Adds an override to a resource property. | -| applyRemovalPolicy | Sets the deletion policy of the resource based on the removal policy specified. | -| getAtt | Returns a token for an runtime attribute of this resource. | -| getMetadata | Retrieve a value value from the CloudFormation Resource Metadata. | -| obtainDependencies | Retrieves an array of resources this resource depends on. | -| obtainResourceDependencies | Get a shallow copy of dependencies between this resource and other resources in the same stack. | -| removeDependency | Indicates that this resource no longer depends on another resource. | -| replaceDependency | Replaces one dependency with another. | -| inspect | Examines the CloudFormation resource and discloses attributes. | - ---- - -##### `toString` +| toString | Returns a string representation of this construct. | +| with | Applies one or more mixins to this construct. | +| overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. | +| addDeletionOverride | Syntactic sugar for `addOverride(path, undefined)`. | +| addDependency | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addDependsOn | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addMetadata | Add a value to the CloudFormation Resource Metadata. | +| addOverride | Adds an override to the synthesized CloudFormation resource. | +| addPropertyDeletionOverride | Adds an override that deletes the value of a property from the resource definition. | +| addPropertyOverride | Adds an override to a resource property. | +| applyRemovalPolicy | Sets the deletion policy of the resource based on the removal policy specified. | +| getAtt | Returns a token for an runtime attribute of this resource. | +| getMetadata | Retrieve a value value from the CloudFormation Resource Metadata. | +| obtainDependencies | Retrieves an array of resources this resource depends on. | +| obtainResourceDependencies | Get a shallow copy of dependencies between this resource and other resources in the same stack. | +| removeDependency | Indicates that this resource no longer depends on another resource. | +| replaceDependency | Replaces one dependency with another. | +| inspect | Examines the CloudFormation resource and discloses attributes. | + +--- + +##### `toString` ```typescript public toString(): string @@ -206,7 +71,7 @@ public toString(): string Returns a string representation of this construct. -##### `with` +##### `with` ```typescript public with(mixins: ...IMixin[]): IConstruct @@ -219,7 +84,7 @@ start of the call, so constructs added by a mixin will not be visited. Use multiple `with()` calls if subsequent mixins should apply to added constructs. -###### `mixins`Required +###### `mixins`Required - *Type:* ...constructs.IMixin[] @@ -227,7 +92,7 @@ The mixins to apply. --- -##### `overrideLogicalId` +##### `overrideLogicalId` ```typescript public overrideLogicalId(newLogicalId: string): void @@ -235,7 +100,7 @@ public overrideLogicalId(newLogicalId: string): void Overrides the auto-generated logical ID with a specific ID. -###### `newLogicalId`Required +###### `newLogicalId`Required - *Type:* string @@ -243,7 +108,7 @@ The new logical ID to use for this stack element. --- -##### `addDeletionOverride` +##### `addDeletionOverride` ```typescript public addDeletionOverride(path: string): void @@ -251,7 +116,7 @@ public addDeletionOverride(path: string): void Syntactic sugar for `addOverride(path, undefined)`. -###### `path`Required +###### `path`Required - *Type:* string @@ -259,7 +124,7 @@ The path of the value to delete. --- -##### `addDependency` +##### `addDependency` ```typescript public addDependency(target: CfnResource): void @@ -270,13 +135,13 @@ Indicates that this resource depends on another resource and cannot be provision This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource --- -##### ~~`addDependsOn`~~ +##### ~~`addDependsOn`~~ ```typescript public addDependsOn(target: CfnResource): void @@ -284,13 +149,13 @@ public addDependsOn(target: CfnResource): void Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource --- -##### `addMetadata` +##### `addMetadata` ```typescript public addMetadata(key: string, value: any): void @@ -308,19 +173,19 @@ Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.) -###### `key`Required +###### `key`Required - *Type:* string --- -###### `value`Required +###### `value`Required - *Type:* any --- -##### `addOverride` +##### `addOverride` ```typescript public addOverride(path: string, value: any): void @@ -370,7 +235,7 @@ for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template. -###### `path`Required +###### `path`Required - *Type:* string @@ -381,7 +246,7 @@ will be created as needed. --- -###### `value`Required +###### `value`Required - *Type:* any @@ -391,7 +256,7 @@ Could be primitive or complex. --- -##### `addPropertyDeletionOverride` +##### `addPropertyDeletionOverride` ```typescript public addPropertyDeletionOverride(propertyPath: string): void @@ -399,7 +264,7 @@ public addPropertyDeletionOverride(propertyPath: string): void Adds an override that deletes the value of a property from the resource definition. -###### `propertyPath`Required +###### `propertyPath`Required - *Type:* string @@ -407,7 +272,7 @@ The path to the property. --- -##### `addPropertyOverride` +##### `addPropertyOverride` ```typescript public addPropertyOverride(propertyPath: string, value: any): void @@ -417,7 +282,7 @@ Adds an override to a resource property. Syntactic sugar for `addOverride("Properties.<...>", value)`. -###### `propertyPath`Required +###### `propertyPath`Required - *Type:* string @@ -425,7 +290,7 @@ The path of the property. --- -###### `value`Required +###### `value`Required - *Type:* any @@ -433,7 +298,7 @@ The value. --- -##### `applyRemovalPolicy` +##### `applyRemovalPolicy` ```typescript public applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void @@ -454,19 +319,19 @@ can be found in the following link: > [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options) -###### `policy`Optional +###### `policy`Optional - *Type:* aws-cdk-lib.RemovalPolicy --- -###### `options`Optional +###### `options`Optional - *Type:* aws-cdk-lib.RemovalPolicyOptions --- -##### `getAtt` +##### `getAtt` ```typescript public getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference @@ -477,7 +342,7 @@ Returns a token for an runtime attribute of this resource. Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility in case there is no generated attribute. -###### `attributeName`Required +###### `attributeName`Required - *Type:* string @@ -485,13 +350,13 @@ The name of the attribute. --- -###### `typeHint`Optional +###### `typeHint`Optional - *Type:* aws-cdk-lib.ResolutionTypeHint --- -##### `getMetadata` +##### `getMetadata` ```typescript public getMetadata(key: string): any @@ -509,13 +374,13 @@ Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.) -###### `key`Required +###### `key`Required - *Type:* string --- -##### `obtainDependencies` +##### `obtainDependencies` ```typescript public obtainDependencies(): (Stack | CfnResource)[] @@ -526,7 +391,7 @@ Retrieves an array of resources this resource depends on. This assembles dependencies on resources across stacks (including nested stacks) automatically. -##### `obtainResourceDependencies` +##### `obtainResourceDependencies` ```typescript public obtainResourceDependencies(): CfnResource[] @@ -534,7 +399,7 @@ public obtainResourceDependencies(): CfnResource[] Get a shallow copy of dependencies between this resource and other resources in the same stack. -##### `removeDependency` +##### `removeDependency` ```typescript public removeDependency(target: CfnResource): void @@ -545,13 +410,13 @@ Indicates that this resource no longer depends on another resource. This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource --- -##### `replaceDependency` +##### `replaceDependency` ```typescript public replaceDependency(target: CfnResource, newTarget: CfnResource): void @@ -559,7 +424,7 @@ public replaceDependency(target: CfnResource, newTarget: CfnResource): void Replaces one dependency with another. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource @@ -567,7 +432,7 @@ The dependency to replace. --- -###### `newTarget`Required +###### `newTarget`Required - *Type:* aws-cdk-lib.CfnResource @@ -575,7 +440,7 @@ The new dependency to add. --- -##### `inspect` +##### `inspect` ```typescript public inspect(inspector: TreeInspector): void @@ -583,7 +448,7 @@ public inspect(inspector: TreeInspector): void Examines the CloudFormation resource and discloses attributes. -###### `inspector`Required +###### `inspector`Required - *Type:* aws-cdk-lib.TreeInspector @@ -595,18 +460,18 @@ tree inspector to collect and process attributes. | **Name** | **Description** | | --- | --- | -| isConstruct | Checks if `x` is a construct. | -| isCfnElement | Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). | -| isCfnResource | Check whether the given object is a CfnResource. | +| isConstruct | Checks if `x` is a construct. | +| isCfnElement | Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). | +| isCfnResource | Check whether the given object is a CfnResource. | --- -##### `isConstruct` +##### `isConstruct` ```typescript -import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' +import { AwsEfsCsiAddon } from '@smallcase/cdk-eks-cluster-module' -CoreDnsAddon.isConstruct(x: any) +AwsEfsCsiAddon.isConstruct(x: any) ``` Checks if `x` is a construct. @@ -625,7 +490,7 @@ library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead. -###### `x`Required +###### `x`Required - *Type:* any @@ -633,12 +498,12 @@ Any object. --- -##### `isCfnElement` +##### `isCfnElement` ```typescript -import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' +import { AwsEfsCsiAddon } from '@smallcase/cdk-eks-cluster-module' -CoreDnsAddon.isCfnElement(x: any) +AwsEfsCsiAddon.isCfnElement(x: any) ``` Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). @@ -646,23 +511,23 @@ Returns `true` if a construct is a stack element (i.e. part of the synthesized c Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack. -###### `x`Required +###### `x`Required - *Type:* any --- -##### `isCfnResource` +##### `isCfnResource` ```typescript -import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' +import { AwsEfsCsiAddon } from '@smallcase/cdk-eks-cluster-module' -CoreDnsAddon.isCfnResource(x: any) +AwsEfsCsiAddon.isCfnResource(x: any) ``` Check whether the given object is a CfnResource. -###### `x`Required +###### `x`Required - *Type:* any @@ -672,28 +537,28 @@ Check whether the given object is a CfnResource. | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | constructs.Node | The tree node. | -| creationStack | string[] | *No description.* | -| logicalId | string | The logical ID for this CloudFormation stack element. | -| stack | aws-cdk-lib.Stack | The stack in which this element is defined. | -| ref | string | Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. | -| cfnOptions | aws-cdk-lib.ICfnResourceOptions | Options for this resource, such as condition, update policy etc. | -| cfnResourceType | string | AWS resource type. | -| attrArn | string | The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . | -| tags | aws-cdk-lib.TagManager | Tag Manager which manages the tags for this resource. | -| addonName | string | The name of the add-on. | -| clusterName | string | The name of your cluster. | -| addonVersion | string | The version of the add-on. | -| configurationValues | string | The configuration values that you provided. | -| podIdentityAssociations | aws-cdk-lib.IResolvable \| aws-cdk-lib.IResolvable \| aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] | An array of Pod Identity Assocations owned by the Addon. | -| preserveOnDelete | boolean \| aws-cdk-lib.IResolvable | Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. | -| resolveConflicts | string | How to resolve field value conflicts for an Amazon EKS add-on. | -| serviceAccountRoleArn | string | The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. | -| tagsRaw | aws-cdk-lib.CfnTag[] | The metadata that you apply to the add-on to assist with categorization and organization. | - ---- - -##### `node`Required +| node | constructs.Node | The tree node. | +| creationStack | string[] | *No description.* | +| logicalId | string | The logical ID for this CloudFormation stack element. | +| stack | aws-cdk-lib.Stack | The stack in which this element is defined. | +| ref | string | Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. | +| cfnOptions | aws-cdk-lib.ICfnResourceOptions | Options for this resource, such as condition, update policy etc. | +| cfnResourceType | string | AWS resource type. | +| attrArn | string | The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . | +| tags | aws-cdk-lib.TagManager | Tag Manager which manages the tags for this resource. | +| addonName | string | The name of the add-on. | +| clusterName | string | The name of your cluster. | +| addonVersion | string | The version of the add-on. | +| configurationValues | string | The configuration values that you provided. | +| podIdentityAssociations | aws-cdk-lib.IResolvable \| aws-cdk-lib.IResolvable \| aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] | An array of Pod Identity Assocations owned by the Addon. | +| preserveOnDelete | boolean \| aws-cdk-lib.IResolvable | Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. | +| resolveConflicts | string | How to resolve field value conflicts for an Amazon EKS add-on. | +| serviceAccountRoleArn | string | The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. | +| tagsRaw | aws-cdk-lib.CfnTag[] | The metadata that you apply to the add-on to assist with categorization and organization. | + +--- + +##### `node`Required ```typescript public readonly node: Node; @@ -705,7 +570,7 @@ The tree node. --- -##### `creationStack`Required +##### `creationStack`Required ```typescript public readonly creationStack: string[]; @@ -715,7 +580,7 @@ public readonly creationStack: string[]; --- -##### `logicalId`Required +##### `logicalId`Required ```typescript public readonly logicalId: string; @@ -732,7 +597,7 @@ To override this value, use `overrideLogicalId(newLogicalId)`. --- -##### `stack`Required +##### `stack`Required ```typescript public readonly stack: Stack; @@ -746,7 +611,7 @@ CfnElements must be defined within a stack scope (directly or indirectly). --- -##### `ref`Required +##### `ref`Required ```typescript public readonly ref: string; @@ -761,7 +626,7 @@ coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. --- -##### `cfnOptions`Required +##### `cfnOptions`Required ```typescript public readonly cfnOptions: ICfnResourceOptions; @@ -773,7 +638,7 @@ Options for this resource, such as condition, update policy etc. --- -##### `cfnResourceType`Required +##### `cfnResourceType`Required ```typescript public readonly cfnResourceType: string; @@ -785,7 +650,7 @@ AWS resource type. --- -##### `attrArn`Required +##### `attrArn`Required ```typescript public readonly attrArn: string; @@ -797,7 +662,7 @@ The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vp --- -##### `tags`Required +##### `tags`Required ```typescript public readonly tags: TagManager; @@ -809,7 +674,7 @@ Tag Manager which manages the tags for this resource. --- -##### `addonName`Required +##### `addonName`Required ```typescript public readonly addonName: string; @@ -821,7 +686,7 @@ The name of the add-on. --- -##### `clusterName`Required +##### `clusterName`Required ```typescript public readonly clusterName: string; @@ -833,7 +698,7 @@ The name of your cluster. --- -##### `addonVersion`Optional +##### `addonVersion`Optional ```typescript public readonly addonVersion: string; @@ -845,7 +710,7 @@ The version of the add-on. --- -##### `configurationValues`Optional +##### `configurationValues`Optional ```typescript public readonly configurationValues: string; @@ -857,7 +722,7 @@ The configuration values that you provided. --- -##### `podIdentityAssociations`Optional +##### `podIdentityAssociations`Optional ```typescript public readonly podIdentityAssociations: IResolvable | (IResolvable | PodIdentityAssociationProperty)[]; @@ -869,7 +734,7 @@ An array of Pod Identity Assocations owned by the Addon. --- -##### `preserveOnDelete`Optional +##### `preserveOnDelete`Optional ```typescript public readonly preserveOnDelete: boolean | IResolvable; @@ -881,7 +746,7 @@ Specifying this option preserves the add-on software on your cluster but Amazon --- -##### `resolveConflicts`Optional +##### `resolveConflicts`Optional ```typescript public readonly resolveConflicts: string; @@ -893,7 +758,7 @@ How to resolve field value conflicts for an Amazon EKS add-on. --- -##### `serviceAccountRoleArn`Optional +##### `serviceAccountRoleArn`Optional ```typescript public readonly serviceAccountRoleArn: string; @@ -905,7 +770,7 @@ The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's s --- -##### `tagsRaw`Optional +##### `tagsRaw`Optional ```typescript public readonly tagsRaw: CfnTag[]; @@ -921,11 +786,11 @@ The metadata that you apply to the add-on to assist with categorization and orga | **Name** | **Type** | **Description** | | --- | --- | --- | -| CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. | +| CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. | --- -##### `CFN_RESOURCE_TYPE_NAME`Required +##### `CFN_RESOURCE_TYPE_NAME`Required ```typescript public readonly CFN_RESOURCE_TYPE_NAME: string; @@ -937,39 +802,39 @@ The CloudFormation resource type name for this resource class. --- -### EKSCluster +### CommonHelmCharts -#### Initializers +#### Initializers ```typescript -import { EKSCluster } from '@smallcase/cdk-eks-cluster-module' +import { CommonHelmCharts } from '@smallcase/cdk-eks-cluster-module' -new EKSCluster(scope: Construct, id: string, props: EKSClusterProps) +new CommonHelmCharts(scope: Construct, id: string, props: CommonHelmChartsProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | EKSClusterProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | CommonHelmChartsProps | *No description.* | --- -##### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -##### `id`Required +##### `id`Required - *Type:* string --- -##### `props`Required +##### `props`Required -- *Type:* EKSClusterProps +- *Type:* CommonHelmChartsProps --- @@ -977,13 +842,12 @@ new EKSCluster(scope: Construct, id: string, props: EKSClusterProps) | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | -| with | Applies one or more mixins to this construct. | -| addServiceAccountWithIamRole | *No description.* | +| toString | Returns a string representation of this construct. | +| with | Applies one or more mixins to this construct. | --- -##### `toString` +##### `toString` ```typescript public toString(): string @@ -991,7 +855,7 @@ public toString(): string Returns a string representation of this construct. -##### `with` +##### `with` ```typescript public with(mixins: ...IMixin[]): IConstruct @@ -1004,7 +868,7 @@ start of the call, so constructs added by a mixin will not be visited. Use multiple `with()` calls if subsequent mixins should apply to added constructs. -###### `mixins`Required +###### `mixins`Required - *Type:* ...constructs.IMixin[] @@ -1012,166 +876,1902 @@ The mixins to apply. --- -##### `addServiceAccountWithIamRole` +#### Static Functions + +| **Name** | **Description** | +| --- | --- | +| isConstruct | Checks if `x` is a construct. | + +--- + +##### `isConstruct` ```typescript -public addServiceAccountWithIamRole(serviceAccountName: string, serviceAccountNamespace: string, policy: any): void +import { CommonHelmCharts } from '@smallcase/cdk-eks-cluster-module' + +CommonHelmCharts.isConstruct(x: any) ``` -###### `serviceAccountName`Required +Checks if `x` is a construct. + +Use this method instead of `instanceof` to properly detect `Construct` +instances, even when the construct library is symlinked. + +Explanation: in JavaScript, multiple copies of the `constructs` library on +disk are seen as independent, completely different libraries. As a +consequence, the class `Construct` in each copy of the `constructs` library +is seen as a different class, and an instance of one class will not test as +`instanceof` the other class. `npm install` will not create installations +like this, but users may manually symlink construct libraries together or +use a monorepo tool: in those cases, multiple copies of the `constructs` +library can be accidentally installed, and `instanceof` will behave +unpredictably. It is safest to avoid using `instanceof`, and using +this type-testing method instead. + +###### `x`Required + +- *Type:* any + +Any object. + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| node | constructs.Node | The tree node. | + +--- + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* constructs.Node + +The tree node. + +--- + + +### CoreDnsAddon + +#### Initializers + +```typescript +import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' + +new CoreDnsAddon(scope: Construct, id: string, props: CoreAddonProps) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | CoreAddonProps | *No description.* | + +--- + +##### `scope`Required + +- *Type:* constructs.Construct + +--- + +##### `id`Required - *Type:* string --- -###### `serviceAccountNamespace`Required +##### `props`Required + +- *Type:* CoreAddonProps + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| toString | Returns a string representation of this construct. | +| with | Applies one or more mixins to this construct. | +| overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. | +| addDeletionOverride | Syntactic sugar for `addOverride(path, undefined)`. | +| addDependency | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addDependsOn | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addMetadata | Add a value to the CloudFormation Resource Metadata. | +| addOverride | Adds an override to the synthesized CloudFormation resource. | +| addPropertyDeletionOverride | Adds an override that deletes the value of a property from the resource definition. | +| addPropertyOverride | Adds an override to a resource property. | +| applyRemovalPolicy | Sets the deletion policy of the resource based on the removal policy specified. | +| getAtt | Returns a token for an runtime attribute of this resource. | +| getMetadata | Retrieve a value value from the CloudFormation Resource Metadata. | +| obtainDependencies | Retrieves an array of resources this resource depends on. | +| obtainResourceDependencies | Get a shallow copy of dependencies between this resource and other resources in the same stack. | +| removeDependency | Indicates that this resource no longer depends on another resource. | +| replaceDependency | Replaces one dependency with another. | +| inspect | Examines the CloudFormation resource and discloses attributes. | + +--- + +##### `toString` + +```typescript +public toString(): string +``` + +Returns a string representation of this construct. + +##### `with` + +```typescript +public with(mixins: ...IMixin[]): IConstruct +``` + +Applies one or more mixins to this construct. + +Mixins are applied in order. The list of constructs is captured at the +start of the call, so constructs added by a mixin will not be visited. +Use multiple `with()` calls if subsequent mixins should apply to added +constructs. + +###### `mixins`Required + +- *Type:* ...constructs.IMixin[] + +The mixins to apply. + +--- + +##### `overrideLogicalId` + +```typescript +public overrideLogicalId(newLogicalId: string): void +``` + +Overrides the auto-generated logical ID with a specific ID. + +###### `newLogicalId`Required + +- *Type:* string + +The new logical ID to use for this stack element. + +--- + +##### `addDeletionOverride` + +```typescript +public addDeletionOverride(path: string): void +``` + +Syntactic sugar for `addOverride(path, undefined)`. + +###### `path`Required - *Type:* string +The path of the value to delete. + +--- + +##### `addDependency` + +```typescript +public addDependency(target: CfnResource): void +``` + +Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. + +This can be used for resources across stacks (or nested stack) boundaries +and the dependency will automatically be transferred to the relevant scope. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +--- + +##### ~~`addDependsOn`~~ + +```typescript +public addDependsOn(target: CfnResource): void +``` + +Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +--- + +##### `addMetadata` + +```typescript +public addMetadata(key: string, value: any): void +``` + +Add a value to the CloudFormation Resource Metadata. + +> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.) + +###### `key`Required + +- *Type:* string + +--- + +###### `value`Required + +- *Type:* any + +--- + +##### `addOverride` + +```typescript +public addOverride(path: string, value: any): void +``` + +Adds an override to the synthesized CloudFormation resource. + +To add a +property override, either use `addPropertyOverride` or prefix `path` with +"Properties." (i.e. `Properties.TopicName`). + +If the override is nested, separate each nested level using a dot (.) in the path parameter. +If there is an array as part of the nesting, specify the index in the path. + +To include a literal `.` in the property name, prefix with a `\`. In most +programming languages you will need to write this as `"\\."` because the +`\` itself will need to be escaped. + +For example, +```typescript +cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); +cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); +``` +would add the overrides +```json +"Properties": { + "GlobalSecondaryIndexes": [ + { + "Projection": { + "NonKeyAttributes": [ "myattribute" ] + ... + } + ... + }, + { + "ProjectionType": "INCLUDE" + ... + }, + ] + ... +} +``` + +The `value` argument to `addOverride` will not be processed or translated +in any way. Pass raw JSON values in here with the correct capitalization +for CloudFormation. If you pass CDK classes or structs, they will be +rendered with lowercased key names, and CloudFormation will reject the +template. + +###### `path`Required + +- *Type:* string + +The path of the property, you can use dot notation to override values in complex types. + +Any intermediate keys +will be created as needed. + +--- + +###### `value`Required + +- *Type:* any + +The value. + +Could be primitive or complex. + +--- + +##### `addPropertyDeletionOverride` + +```typescript +public addPropertyDeletionOverride(propertyPath: string): void +``` + +Adds an override that deletes the value of a property from the resource definition. + +###### `propertyPath`Required + +- *Type:* string + +The path to the property. + +--- + +##### `addPropertyOverride` + +```typescript +public addPropertyOverride(propertyPath: string, value: any): void +``` + +Adds an override to a resource property. + +Syntactic sugar for `addOverride("Properties.<...>", value)`. + +###### `propertyPath`Required + +- *Type:* string + +The path of the property. + +--- + +###### `value`Required + +- *Type:* any + +The value. + +--- + +##### `applyRemovalPolicy` + +```typescript +public applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void +``` + +Sets the deletion policy of the resource based on the removal policy specified. + +The Removal Policy controls what happens to this resource when it stops +being managed by CloudFormation, either because you've removed it from the +CDK application or because you've made a change that requires the resource +to be replaced. + +The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS +account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some +cases, a snapshot can be taken of the resource prior to deletion +(`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy +can be found in the following link: + +> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options) + +###### `policy`Optional + +- *Type:* aws-cdk-lib.RemovalPolicy + +--- + +###### `options`Optional + +- *Type:* aws-cdk-lib.RemovalPolicyOptions + +--- + +##### `getAtt` + +```typescript +public getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference +``` + +Returns a token for an runtime attribute of this resource. + +Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility +in case there is no generated attribute. + +###### `attributeName`Required + +- *Type:* string + +The name of the attribute. + +--- + +###### `typeHint`Optional + +- *Type:* aws-cdk-lib.ResolutionTypeHint + +--- + +##### `getMetadata` + +```typescript +public getMetadata(key: string): any +``` + +Retrieve a value value from the CloudFormation Resource Metadata. + +> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.) + +###### `key`Required + +- *Type:* string + +--- + +##### `obtainDependencies` + +```typescript +public obtainDependencies(): (Stack | CfnResource)[] +``` + +Retrieves an array of resources this resource depends on. + +This assembles dependencies on resources across stacks (including nested stacks) +automatically. + +##### `obtainResourceDependencies` + +```typescript +public obtainResourceDependencies(): CfnResource[] +``` + +Get a shallow copy of dependencies between this resource and other resources in the same stack. + +##### `removeDependency` + +```typescript +public removeDependency(target: CfnResource): void +``` + +Indicates that this resource no longer depends on another resource. + +This can be used for resources across stacks (including nested stacks) +and the dependency will automatically be removed from the relevant scope. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +--- + +##### `replaceDependency` + +```typescript +public replaceDependency(target: CfnResource, newTarget: CfnResource): void +``` + +Replaces one dependency with another. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +The dependency to replace. + +--- + +###### `newTarget`Required + +- *Type:* aws-cdk-lib.CfnResource + +The new dependency to add. + +--- + +##### `inspect` + +```typescript +public inspect(inspector: TreeInspector): void +``` + +Examines the CloudFormation resource and discloses attributes. + +###### `inspector`Required + +- *Type:* aws-cdk-lib.TreeInspector + +tree inspector to collect and process attributes. + +--- + +#### Static Functions + +| **Name** | **Description** | +| --- | --- | +| isConstruct | Checks if `x` is a construct. | +| isCfnElement | Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). | +| isCfnResource | Check whether the given object is a CfnResource. | + +--- + +##### `isConstruct` + +```typescript +import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' + +CoreDnsAddon.isConstruct(x: any) +``` + +Checks if `x` is a construct. + +Use this method instead of `instanceof` to properly detect `Construct` +instances, even when the construct library is symlinked. + +Explanation: in JavaScript, multiple copies of the `constructs` library on +disk are seen as independent, completely different libraries. As a +consequence, the class `Construct` in each copy of the `constructs` library +is seen as a different class, and an instance of one class will not test as +`instanceof` the other class. `npm install` will not create installations +like this, but users may manually symlink construct libraries together or +use a monorepo tool: in those cases, multiple copies of the `constructs` +library can be accidentally installed, and `instanceof` will behave +unpredictably. It is safest to avoid using `instanceof`, and using +this type-testing method instead. + +###### `x`Required + +- *Type:* any + +Any object. + +--- + +##### `isCfnElement` + +```typescript +import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' + +CoreDnsAddon.isCfnElement(x: any) +``` + +Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). + +Uses duck-typing instead of `instanceof` to allow stack elements from different +versions of this library to be included in the same stack. + +###### `x`Required + +- *Type:* any + +--- + +##### `isCfnResource` + +```typescript +import { CoreDnsAddon } from '@smallcase/cdk-eks-cluster-module' + +CoreDnsAddon.isCfnResource(x: any) +``` + +Check whether the given object is a CfnResource. + +###### `x`Required + +- *Type:* any + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| node | constructs.Node | The tree node. | +| creationStack | string[] | *No description.* | +| logicalId | string | The logical ID for this CloudFormation stack element. | +| stack | aws-cdk-lib.Stack | The stack in which this element is defined. | +| ref | string | Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. | +| cfnOptions | aws-cdk-lib.ICfnResourceOptions | Options for this resource, such as condition, update policy etc. | +| cfnResourceType | string | AWS resource type. | +| attrArn | string | The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . | +| tags | aws-cdk-lib.TagManager | Tag Manager which manages the tags for this resource. | +| addonName | string | The name of the add-on. | +| clusterName | string | The name of your cluster. | +| addonVersion | string | The version of the add-on. | +| configurationValues | string | The configuration values that you provided. | +| podIdentityAssociations | aws-cdk-lib.IResolvable \| aws-cdk-lib.IResolvable \| aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] | An array of Pod Identity Assocations owned by the Addon. | +| preserveOnDelete | boolean \| aws-cdk-lib.IResolvable | Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. | +| resolveConflicts | string | How to resolve field value conflicts for an Amazon EKS add-on. | +| serviceAccountRoleArn | string | The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. | +| tagsRaw | aws-cdk-lib.CfnTag[] | The metadata that you apply to the add-on to assist with categorization and organization. | + +--- + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* constructs.Node + +The tree node. + +--- + +##### `creationStack`Required + +```typescript +public readonly creationStack: string[]; +``` + +- *Type:* string[] + +--- + +##### `logicalId`Required + +```typescript +public readonly logicalId: string; +``` + +- *Type:* string + +The logical ID for this CloudFormation stack element. + +The logical ID of the element +is calculated from the path of the resource node in the construct tree. + +To override this value, use `overrideLogicalId(newLogicalId)`. + +--- + +##### `stack`Required + +```typescript +public readonly stack: Stack; +``` + +- *Type:* aws-cdk-lib.Stack + +The stack in which this element is defined. + +CfnElements must be defined within a stack scope (directly or indirectly). + +--- + +##### `ref`Required + +```typescript +public readonly ref: string; +``` + +- *Type:* string + +Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. + +If, by any chance, the intrinsic reference of a resource is not a string, you could +coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. + +--- + +##### `cfnOptions`Required + +```typescript +public readonly cfnOptions: ICfnResourceOptions; +``` + +- *Type:* aws-cdk-lib.ICfnResourceOptions + +Options for this resource, such as condition, update policy etc. + +--- + +##### `cfnResourceType`Required + +```typescript +public readonly cfnResourceType: string; +``` + +- *Type:* string + +AWS resource type. + +--- + +##### `attrArn`Required + +```typescript +public readonly attrArn: string; +``` + +- *Type:* string + +The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . + +--- + +##### `tags`Required + +```typescript +public readonly tags: TagManager; +``` + +- *Type:* aws-cdk-lib.TagManager + +Tag Manager which manages the tags for this resource. + +--- + +##### `addonName`Required + +```typescript +public readonly addonName: string; +``` + +- *Type:* string + +The name of the add-on. + +--- + +##### `clusterName`Required + +```typescript +public readonly clusterName: string; +``` + +- *Type:* string + +The name of your cluster. + +--- + +##### `addonVersion`Optional + +```typescript +public readonly addonVersion: string; +``` + +- *Type:* string + +The version of the add-on. + +--- + +##### `configurationValues`Optional + +```typescript +public readonly configurationValues: string; +``` + +- *Type:* string + +The configuration values that you provided. + +--- + +##### `podIdentityAssociations`Optional + +```typescript +public readonly podIdentityAssociations: IResolvable | (IResolvable | PodIdentityAssociationProperty)[]; +``` + +- *Type:* aws-cdk-lib.IResolvable | aws-cdk-lib.IResolvable | aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] + +An array of Pod Identity Assocations owned by the Addon. + +--- + +##### `preserveOnDelete`Optional + +```typescript +public readonly preserveOnDelete: boolean | IResolvable; +``` + +- *Type:* boolean | aws-cdk-lib.IResolvable + +Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. + +--- + +##### `resolveConflicts`Optional + +```typescript +public readonly resolveConflicts: string; +``` + +- *Type:* string + +How to resolve field value conflicts for an Amazon EKS add-on. + +--- + +##### `serviceAccountRoleArn`Optional + +```typescript +public readonly serviceAccountRoleArn: string; +``` + +- *Type:* string + +The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. + +--- + +##### `tagsRaw`Optional + +```typescript +public readonly tagsRaw: CfnTag[]; +``` + +- *Type:* aws-cdk-lib.CfnTag[] + +The metadata that you apply to the add-on to assist with categorization and organization. + +--- + +#### Constants + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. | + +--- + +##### `CFN_RESOURCE_TYPE_NAME`Required + +```typescript +public readonly CFN_RESOURCE_TYPE_NAME: string; +``` + +- *Type:* string + +The CloudFormation resource type name for this resource class. + +--- + +### EKSCluster + +#### Initializers + +```typescript +import { EKSCluster } from '@smallcase/cdk-eks-cluster-module' + +new EKSCluster(scope: Construct, id: string, props: EKSClusterProps) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | EKSClusterProps | *No description.* | + +--- + +##### `scope`Required + +- *Type:* constructs.Construct + +--- + +##### `id`Required + +- *Type:* string + +--- + +##### `props`Required + +- *Type:* EKSClusterProps + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| toString | Returns a string representation of this construct. | +| with | Applies one or more mixins to this construct. | +| addServiceAccountWithIamRole | *No description.* | + +--- + +##### `toString` + +```typescript +public toString(): string +``` + +Returns a string representation of this construct. + +##### `with` + +```typescript +public with(mixins: ...IMixin[]): IConstruct +``` + +Applies one or more mixins to this construct. + +Mixins are applied in order. The list of constructs is captured at the +start of the call, so constructs added by a mixin will not be visited. +Use multiple `with()` calls if subsequent mixins should apply to added +constructs. + +###### `mixins`Required + +- *Type:* ...constructs.IMixin[] + +The mixins to apply. + +--- + +##### `addServiceAccountWithIamRole` + +```typescript +public addServiceAccountWithIamRole(serviceAccountName: string, serviceAccountNamespace: string, policy: any): void +``` + +###### `serviceAccountName`Required + +- *Type:* string + +--- + +###### `serviceAccountNamespace`Required + +- *Type:* string + +--- + +###### `policy`Required + +- *Type:* any + +--- + +#### Static Functions + +| **Name** | **Description** | +| --- | --- | +| isConstruct | Checks if `x` is a construct. | + +--- + +##### `isConstruct` + +```typescript +import { EKSCluster } from '@smallcase/cdk-eks-cluster-module' + +EKSCluster.isConstruct(x: any) +``` + +Checks if `x` is a construct. + +Use this method instead of `instanceof` to properly detect `Construct` +instances, even when the construct library is symlinked. + +Explanation: in JavaScript, multiple copies of the `constructs` library on +disk are seen as independent, completely different libraries. As a +consequence, the class `Construct` in each copy of the `constructs` library +is seen as a different class, and an instance of one class will not test as +`instanceof` the other class. `npm install` will not create installations +like this, but users may manually symlink construct libraries together or +use a monorepo tool: in those cases, multiple copies of the `constructs` +library can be accidentally installed, and `instanceof` will behave +unpredictably. It is safest to avoid using `instanceof`, and using +this type-testing method instead. + +###### `x`Required + +- *Type:* any + +Any object. + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| node | constructs.Node | The tree node. | +| additionalFargateProfile | aws-cdk-lib.aws_eks.FargateProfile[] | *No description.* | +| additionalNodegroups | aws-cdk-lib.aws_eks.Nodegroup[] | *No description.* | +| cluster | aws-cdk-lib.aws_eks.Cluster | *No description.* | +| fargateProfiles | FargateProfile[] | *No description.* | + +--- + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* constructs.Node + +The tree node. + +--- + +##### `additionalFargateProfile`Required + +```typescript +public readonly additionalFargateProfile: FargateProfile[]; +``` + +- *Type:* aws-cdk-lib.aws_eks.FargateProfile[] + +--- + +##### `additionalNodegroups`Required + +```typescript +public readonly additionalNodegroups: Nodegroup[]; +``` + +- *Type:* aws-cdk-lib.aws_eks.Nodegroup[] + +--- + +##### `cluster`Required + +```typescript +public readonly cluster: Cluster; +``` + +- *Type:* aws-cdk-lib.aws_eks.Cluster + +--- + +##### `fargateProfiles`Required + +```typescript +public readonly fargateProfiles: FargateProfile[]; +``` + +- *Type:* FargateProfile[] + +--- + + +### KubeProxyAddon + +#### Initializers + +```typescript +import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' + +new KubeProxyAddon(scope: Construct, id: string, props: CoreAddonProps) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | CoreAddonProps | *No description.* | + +--- + +##### `scope`Required + +- *Type:* constructs.Construct + +--- + +##### `id`Required + +- *Type:* string + +--- + +##### `props`Required + +- *Type:* CoreAddonProps + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| toString | Returns a string representation of this construct. | +| with | Applies one or more mixins to this construct. | +| overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. | +| addDeletionOverride | Syntactic sugar for `addOverride(path, undefined)`. | +| addDependency | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addDependsOn | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addMetadata | Add a value to the CloudFormation Resource Metadata. | +| addOverride | Adds an override to the synthesized CloudFormation resource. | +| addPropertyDeletionOverride | Adds an override that deletes the value of a property from the resource definition. | +| addPropertyOverride | Adds an override to a resource property. | +| applyRemovalPolicy | Sets the deletion policy of the resource based on the removal policy specified. | +| getAtt | Returns a token for an runtime attribute of this resource. | +| getMetadata | Retrieve a value value from the CloudFormation Resource Metadata. | +| obtainDependencies | Retrieves an array of resources this resource depends on. | +| obtainResourceDependencies | Get a shallow copy of dependencies between this resource and other resources in the same stack. | +| removeDependency | Indicates that this resource no longer depends on another resource. | +| replaceDependency | Replaces one dependency with another. | +| inspect | Examines the CloudFormation resource and discloses attributes. | + +--- + +##### `toString` + +```typescript +public toString(): string +``` + +Returns a string representation of this construct. + +##### `with` + +```typescript +public with(mixins: ...IMixin[]): IConstruct +``` + +Applies one or more mixins to this construct. + +Mixins are applied in order. The list of constructs is captured at the +start of the call, so constructs added by a mixin will not be visited. +Use multiple `with()` calls if subsequent mixins should apply to added +constructs. + +###### `mixins`Required + +- *Type:* ...constructs.IMixin[] + +The mixins to apply. + +--- + +##### `overrideLogicalId` + +```typescript +public overrideLogicalId(newLogicalId: string): void +``` + +Overrides the auto-generated logical ID with a specific ID. + +###### `newLogicalId`Required + +- *Type:* string + +The new logical ID to use for this stack element. + +--- + +##### `addDeletionOverride` + +```typescript +public addDeletionOverride(path: string): void +``` + +Syntactic sugar for `addOverride(path, undefined)`. + +###### `path`Required + +- *Type:* string + +The path of the value to delete. + +--- + +##### `addDependency` + +```typescript +public addDependency(target: CfnResource): void +``` + +Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. + +This can be used for resources across stacks (or nested stack) boundaries +and the dependency will automatically be transferred to the relevant scope. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +--- + +##### ~~`addDependsOn`~~ + +```typescript +public addDependsOn(target: CfnResource): void +``` + +Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +--- + +##### `addMetadata` + +```typescript +public addMetadata(key: string, value: any): void +``` + +Add a value to the CloudFormation Resource Metadata. + +> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.) + +###### `key`Required + +- *Type:* string + +--- + +###### `value`Required + +- *Type:* any + +--- + +##### `addOverride` + +```typescript +public addOverride(path: string, value: any): void +``` + +Adds an override to the synthesized CloudFormation resource. + +To add a +property override, either use `addPropertyOverride` or prefix `path` with +"Properties." (i.e. `Properties.TopicName`). + +If the override is nested, separate each nested level using a dot (.) in the path parameter. +If there is an array as part of the nesting, specify the index in the path. + +To include a literal `.` in the property name, prefix with a `\`. In most +programming languages you will need to write this as `"\\."` because the +`\` itself will need to be escaped. + +For example, +```typescript +cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); +cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); +``` +would add the overrides +```json +"Properties": { + "GlobalSecondaryIndexes": [ + { + "Projection": { + "NonKeyAttributes": [ "myattribute" ] + ... + } + ... + }, + { + "ProjectionType": "INCLUDE" + ... + }, + ] + ... +} +``` + +The `value` argument to `addOverride` will not be processed or translated +in any way. Pass raw JSON values in here with the correct capitalization +for CloudFormation. If you pass CDK classes or structs, they will be +rendered with lowercased key names, and CloudFormation will reject the +template. + +###### `path`Required + +- *Type:* string + +The path of the property, you can use dot notation to override values in complex types. + +Any intermediate keys +will be created as needed. + +--- + +###### `value`Required + +- *Type:* any + +The value. + +Could be primitive or complex. + +--- + +##### `addPropertyDeletionOverride` + +```typescript +public addPropertyDeletionOverride(propertyPath: string): void +``` + +Adds an override that deletes the value of a property from the resource definition. + +###### `propertyPath`Required + +- *Type:* string + +The path to the property. + +--- + +##### `addPropertyOverride` + +```typescript +public addPropertyOverride(propertyPath: string, value: any): void +``` + +Adds an override to a resource property. + +Syntactic sugar for `addOverride("Properties.<...>", value)`. + +###### `propertyPath`Required + +- *Type:* string + +The path of the property. + +--- + +###### `value`Required + +- *Type:* any + +The value. + +--- + +##### `applyRemovalPolicy` + +```typescript +public applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void +``` + +Sets the deletion policy of the resource based on the removal policy specified. + +The Removal Policy controls what happens to this resource when it stops +being managed by CloudFormation, either because you've removed it from the +CDK application or because you've made a change that requires the resource +to be replaced. + +The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS +account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some +cases, a snapshot can be taken of the resource prior to deletion +(`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy +can be found in the following link: + +> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options) + +###### `policy`Optional + +- *Type:* aws-cdk-lib.RemovalPolicy + +--- + +###### `options`Optional + +- *Type:* aws-cdk-lib.RemovalPolicyOptions + +--- + +##### `getAtt` + +```typescript +public getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference +``` + +Returns a token for an runtime attribute of this resource. + +Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility +in case there is no generated attribute. + +###### `attributeName`Required + +- *Type:* string + +The name of the attribute. + +--- + +###### `typeHint`Optional + +- *Type:* aws-cdk-lib.ResolutionTypeHint + +--- + +##### `getMetadata` + +```typescript +public getMetadata(key: string): any +``` + +Retrieve a value value from the CloudFormation Resource Metadata. + +> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html + +Note that this is a different set of metadata from CDK node metadata; this +metadata ends up in the stack template under the resource, whereas CDK +node metadata ends up in the Cloud Assembly.) + +###### `key`Required + +- *Type:* string + +--- + +##### `obtainDependencies` + +```typescript +public obtainDependencies(): (Stack | CfnResource)[] +``` + +Retrieves an array of resources this resource depends on. + +This assembles dependencies on resources across stacks (including nested stacks) +automatically. + +##### `obtainResourceDependencies` + +```typescript +public obtainResourceDependencies(): CfnResource[] +``` + +Get a shallow copy of dependencies between this resource and other resources in the same stack. + +##### `removeDependency` + +```typescript +public removeDependency(target: CfnResource): void +``` + +Indicates that this resource no longer depends on another resource. + +This can be used for resources across stacks (including nested stacks) +and the dependency will automatically be removed from the relevant scope. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +--- + +##### `replaceDependency` + +```typescript +public replaceDependency(target: CfnResource, newTarget: CfnResource): void +``` + +Replaces one dependency with another. + +###### `target`Required + +- *Type:* aws-cdk-lib.CfnResource + +The dependency to replace. + +--- + +###### `newTarget`Required + +- *Type:* aws-cdk-lib.CfnResource + +The new dependency to add. + +--- + +##### `inspect` + +```typescript +public inspect(inspector: TreeInspector): void +``` + +Examines the CloudFormation resource and discloses attributes. + +###### `inspector`Required + +- *Type:* aws-cdk-lib.TreeInspector + +tree inspector to collect and process attributes. + +--- + +#### Static Functions + +| **Name** | **Description** | +| --- | --- | +| isConstruct | Checks if `x` is a construct. | +| isCfnElement | Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). | +| isCfnResource | Check whether the given object is a CfnResource. | + +--- + +##### `isConstruct` + +```typescript +import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' + +KubeProxyAddon.isConstruct(x: any) +``` + +Checks if `x` is a construct. + +Use this method instead of `instanceof` to properly detect `Construct` +instances, even when the construct library is symlinked. + +Explanation: in JavaScript, multiple copies of the `constructs` library on +disk are seen as independent, completely different libraries. As a +consequence, the class `Construct` in each copy of the `constructs` library +is seen as a different class, and an instance of one class will not test as +`instanceof` the other class. `npm install` will not create installations +like this, but users may manually symlink construct libraries together or +use a monorepo tool: in those cases, multiple copies of the `constructs` +library can be accidentally installed, and `instanceof` will behave +unpredictably. It is safest to avoid using `instanceof`, and using +this type-testing method instead. + +###### `x`Required + +- *Type:* any + +Any object. + +--- + +##### `isCfnElement` + +```typescript +import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' + +KubeProxyAddon.isCfnElement(x: any) +``` + +Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). + +Uses duck-typing instead of `instanceof` to allow stack elements from different +versions of this library to be included in the same stack. + +###### `x`Required + +- *Type:* any + +--- + +##### `isCfnResource` + +```typescript +import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' + +KubeProxyAddon.isCfnResource(x: any) +``` + +Check whether the given object is a CfnResource. + +###### `x`Required + +- *Type:* any + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| node | constructs.Node | The tree node. | +| creationStack | string[] | *No description.* | +| logicalId | string | The logical ID for this CloudFormation stack element. | +| stack | aws-cdk-lib.Stack | The stack in which this element is defined. | +| ref | string | Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. | +| cfnOptions | aws-cdk-lib.ICfnResourceOptions | Options for this resource, such as condition, update policy etc. | +| cfnResourceType | string | AWS resource type. | +| attrArn | string | The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . | +| tags | aws-cdk-lib.TagManager | Tag Manager which manages the tags for this resource. | +| addonName | string | The name of the add-on. | +| clusterName | string | The name of your cluster. | +| addonVersion | string | The version of the add-on. | +| configurationValues | string | The configuration values that you provided. | +| podIdentityAssociations | aws-cdk-lib.IResolvable \| aws-cdk-lib.IResolvable \| aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] | An array of Pod Identity Assocations owned by the Addon. | +| preserveOnDelete | boolean \| aws-cdk-lib.IResolvable | Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. | +| resolveConflicts | string | How to resolve field value conflicts for an Amazon EKS add-on. | +| serviceAccountRoleArn | string | The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. | +| tagsRaw | aws-cdk-lib.CfnTag[] | The metadata that you apply to the add-on to assist with categorization and organization. | + +--- + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* constructs.Node + +The tree node. + +--- + +##### `creationStack`Required + +```typescript +public readonly creationStack: string[]; +``` + +- *Type:* string[] + +--- + +##### `logicalId`Required + +```typescript +public readonly logicalId: string; +``` + +- *Type:* string + +The logical ID for this CloudFormation stack element. + +The logical ID of the element +is calculated from the path of the resource node in the construct tree. + +To override this value, use `overrideLogicalId(newLogicalId)`. + +--- + +##### `stack`Required + +```typescript +public readonly stack: Stack; +``` + +- *Type:* aws-cdk-lib.Stack + +The stack in which this element is defined. + +CfnElements must be defined within a stack scope (directly or indirectly). + +--- + +##### `ref`Required + +```typescript +public readonly ref: string; +``` + +- *Type:* string + +Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. + +If, by any chance, the intrinsic reference of a resource is not a string, you could +coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. + +--- + +##### `cfnOptions`Required + +```typescript +public readonly cfnOptions: ICfnResourceOptions; +``` + +- *Type:* aws-cdk-lib.ICfnResourceOptions + +Options for this resource, such as condition, update policy etc. + +--- + +##### `cfnResourceType`Required + +```typescript +public readonly cfnResourceType: string; +``` + +- *Type:* string + +AWS resource type. + +--- + +##### `attrArn`Required + +```typescript +public readonly attrArn: string; +``` + +- *Type:* string + +The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . + +--- + +##### `tags`Required + +```typescript +public readonly tags: TagManager; +``` + +- *Type:* aws-cdk-lib.TagManager + +Tag Manager which manages the tags for this resource. + +--- + +##### `addonName`Required + +```typescript +public readonly addonName: string; +``` + +- *Type:* string + +The name of the add-on. + +--- + +##### `clusterName`Required + +```typescript +public readonly clusterName: string; +``` + +- *Type:* string + +The name of your cluster. + --- -###### `policy`Required - -- *Type:* any +##### `addonVersion`Optional ---- +```typescript +public readonly addonVersion: string; +``` -#### Static Functions +- *Type:* string -| **Name** | **Description** | -| --- | --- | -| isConstruct | Checks if `x` is a construct. | +The version of the add-on. --- -##### `isConstruct` +##### `configurationValues`Optional ```typescript -import { EKSCluster } from '@smallcase/cdk-eks-cluster-module' - -EKSCluster.isConstruct(x: any) +public readonly configurationValues: string; ``` -Checks if `x` is a construct. - -Use this method instead of `instanceof` to properly detect `Construct` -instances, even when the construct library is symlinked. - -Explanation: in JavaScript, multiple copies of the `constructs` library on -disk are seen as independent, completely different libraries. As a -consequence, the class `Construct` in each copy of the `constructs` library -is seen as a different class, and an instance of one class will not test as -`instanceof` the other class. `npm install` will not create installations -like this, but users may manually symlink construct libraries together or -use a monorepo tool: in those cases, multiple copies of the `constructs` -library can be accidentally installed, and `instanceof` will behave -unpredictably. It is safest to avoid using `instanceof`, and using -this type-testing method instead. +- *Type:* string -###### `x`Required +The configuration values that you provided. -- *Type:* any +--- -Any object. +##### `podIdentityAssociations`Optional ---- +```typescript +public readonly podIdentityAssociations: IResolvable | (IResolvable | PodIdentityAssociationProperty)[]; +``` -#### Properties +- *Type:* aws-cdk-lib.IResolvable | aws-cdk-lib.IResolvable | aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| node | constructs.Node | The tree node. | -| additionalFargateProfile | aws-cdk-lib.aws_eks.FargateProfile[] | *No description.* | -| additionalNodegroups | aws-cdk-lib.aws_eks.Nodegroup[] | *No description.* | -| cluster | aws-cdk-lib.aws_eks.Cluster | *No description.* | -| fargateProfiles | FargateProfile[] | *No description.* | +An array of Pod Identity Assocations owned by the Addon. --- -##### `node`Required +##### `preserveOnDelete`Optional ```typescript -public readonly node: Node; +public readonly preserveOnDelete: boolean | IResolvable; ``` -- *Type:* constructs.Node +- *Type:* boolean | aws-cdk-lib.IResolvable -The tree node. +Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. --- -##### `additionalFargateProfile`Required +##### `resolveConflicts`Optional ```typescript -public readonly additionalFargateProfile: FargateProfile[]; +public readonly resolveConflicts: string; ``` -- *Type:* aws-cdk-lib.aws_eks.FargateProfile[] +- *Type:* string + +How to resolve field value conflicts for an Amazon EKS add-on. --- -##### `additionalNodegroups`Required +##### `serviceAccountRoleArn`Optional ```typescript -public readonly additionalNodegroups: Nodegroup[]; +public readonly serviceAccountRoleArn: string; ``` -- *Type:* aws-cdk-lib.aws_eks.Nodegroup[] +- *Type:* string + +The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. --- -##### `cluster`Required +##### `tagsRaw`Optional ```typescript -public readonly cluster: Cluster; +public readonly tagsRaw: CfnTag[]; ``` -- *Type:* aws-cdk-lib.aws_eks.Cluster +- *Type:* aws-cdk-lib.CfnTag[] + +The metadata that you apply to the add-on to assist with categorization and organization. --- -##### `fargateProfiles`Required +#### Constants + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. | + +--- + +##### `CFN_RESOURCE_TYPE_NAME`Required ```typescript -public readonly fargateProfiles: FargateProfile[]; +public readonly CFN_RESOURCE_TYPE_NAME: string; ``` -- *Type:* FargateProfile[] +- *Type:* string ---- +The CloudFormation resource type name for this resource class. +--- -### KubeProxyAddon +### MountpointS3CsiAddon -#### Initializers +#### Initializers ```typescript -import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' +import { MountpointS3CsiAddon } from '@smallcase/cdk-eks-cluster-module' -new KubeProxyAddon(scope: Construct, id: string, props: CoreAddonProps) +new MountpointS3CsiAddon(scope: Construct, id: string, props: CoreAddonProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | CoreAddonProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | CoreAddonProps | *No description.* | --- -##### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -##### `id`Required +##### `id`Required - *Type:* string --- -##### `props`Required +##### `props`Required - *Type:* CoreAddonProps @@ -1181,28 +2781,28 @@ new KubeProxyAddon(scope: Construct, id: string, props: CoreAddonProps) | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | -| with | Applies one or more mixins to this construct. | -| overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. | -| addDeletionOverride | Syntactic sugar for `addOverride(path, undefined)`. | -| addDependency | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | -| addDependsOn | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | -| addMetadata | Add a value to the CloudFormation Resource Metadata. | -| addOverride | Adds an override to the synthesized CloudFormation resource. | -| addPropertyDeletionOverride | Adds an override that deletes the value of a property from the resource definition. | -| addPropertyOverride | Adds an override to a resource property. | -| applyRemovalPolicy | Sets the deletion policy of the resource based on the removal policy specified. | -| getAtt | Returns a token for an runtime attribute of this resource. | -| getMetadata | Retrieve a value value from the CloudFormation Resource Metadata. | -| obtainDependencies | Retrieves an array of resources this resource depends on. | -| obtainResourceDependencies | Get a shallow copy of dependencies between this resource and other resources in the same stack. | -| removeDependency | Indicates that this resource no longer depends on another resource. | -| replaceDependency | Replaces one dependency with another. | -| inspect | Examines the CloudFormation resource and discloses attributes. | - ---- - -##### `toString` +| toString | Returns a string representation of this construct. | +| with | Applies one or more mixins to this construct. | +| overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. | +| addDeletionOverride | Syntactic sugar for `addOverride(path, undefined)`. | +| addDependency | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addDependsOn | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. | +| addMetadata | Add a value to the CloudFormation Resource Metadata. | +| addOverride | Adds an override to the synthesized CloudFormation resource. | +| addPropertyDeletionOverride | Adds an override that deletes the value of a property from the resource definition. | +| addPropertyOverride | Adds an override to a resource property. | +| applyRemovalPolicy | Sets the deletion policy of the resource based on the removal policy specified. | +| getAtt | Returns a token for an runtime attribute of this resource. | +| getMetadata | Retrieve a value value from the CloudFormation Resource Metadata. | +| obtainDependencies | Retrieves an array of resources this resource depends on. | +| obtainResourceDependencies | Get a shallow copy of dependencies between this resource and other resources in the same stack. | +| removeDependency | Indicates that this resource no longer depends on another resource. | +| replaceDependency | Replaces one dependency with another. | +| inspect | Examines the CloudFormation resource and discloses attributes. | + +--- + +##### `toString` ```typescript public toString(): string @@ -1210,7 +2810,7 @@ public toString(): string Returns a string representation of this construct. -##### `with` +##### `with` ```typescript public with(mixins: ...IMixin[]): IConstruct @@ -1223,7 +2823,7 @@ start of the call, so constructs added by a mixin will not be visited. Use multiple `with()` calls if subsequent mixins should apply to added constructs. -###### `mixins`Required +###### `mixins`Required - *Type:* ...constructs.IMixin[] @@ -1231,7 +2831,7 @@ The mixins to apply. --- -##### `overrideLogicalId` +##### `overrideLogicalId` ```typescript public overrideLogicalId(newLogicalId: string): void @@ -1239,7 +2839,7 @@ public overrideLogicalId(newLogicalId: string): void Overrides the auto-generated logical ID with a specific ID. -###### `newLogicalId`Required +###### `newLogicalId`Required - *Type:* string @@ -1247,7 +2847,7 @@ The new logical ID to use for this stack element. --- -##### `addDeletionOverride` +##### `addDeletionOverride` ```typescript public addDeletionOverride(path: string): void @@ -1255,7 +2855,7 @@ public addDeletionOverride(path: string): void Syntactic sugar for `addOverride(path, undefined)`. -###### `path`Required +###### `path`Required - *Type:* string @@ -1263,7 +2863,7 @@ The path of the value to delete. --- -##### `addDependency` +##### `addDependency` ```typescript public addDependency(target: CfnResource): void @@ -1274,13 +2874,13 @@ Indicates that this resource depends on another resource and cannot be provision This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource --- -##### ~~`addDependsOn`~~ +##### ~~`addDependsOn`~~ ```typescript public addDependsOn(target: CfnResource): void @@ -1288,13 +2888,13 @@ public addDependsOn(target: CfnResource): void Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource --- -##### `addMetadata` +##### `addMetadata` ```typescript public addMetadata(key: string, value: any): void @@ -1312,19 +2912,19 @@ Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.) -###### `key`Required +###### `key`Required - *Type:* string --- -###### `value`Required +###### `value`Required - *Type:* any --- -##### `addOverride` +##### `addOverride` ```typescript public addOverride(path: string, value: any): void @@ -1374,7 +2974,7 @@ for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template. -###### `path`Required +###### `path`Required - *Type:* string @@ -1385,7 +2985,7 @@ will be created as needed. --- -###### `value`Required +###### `value`Required - *Type:* any @@ -1395,7 +2995,7 @@ Could be primitive or complex. --- -##### `addPropertyDeletionOverride` +##### `addPropertyDeletionOverride` ```typescript public addPropertyDeletionOverride(propertyPath: string): void @@ -1403,7 +3003,7 @@ public addPropertyDeletionOverride(propertyPath: string): void Adds an override that deletes the value of a property from the resource definition. -###### `propertyPath`Required +###### `propertyPath`Required - *Type:* string @@ -1411,7 +3011,7 @@ The path to the property. --- -##### `addPropertyOverride` +##### `addPropertyOverride` ```typescript public addPropertyOverride(propertyPath: string, value: any): void @@ -1421,7 +3021,7 @@ Adds an override to a resource property. Syntactic sugar for `addOverride("Properties.<...>", value)`. -###### `propertyPath`Required +###### `propertyPath`Required - *Type:* string @@ -1429,7 +3029,7 @@ The path of the property. --- -###### `value`Required +###### `value`Required - *Type:* any @@ -1437,7 +3037,7 @@ The value. --- -##### `applyRemovalPolicy` +##### `applyRemovalPolicy` ```typescript public applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void @@ -1458,19 +3058,19 @@ can be found in the following link: > [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options) -###### `policy`Optional +###### `policy`Optional - *Type:* aws-cdk-lib.RemovalPolicy --- -###### `options`Optional +###### `options`Optional - *Type:* aws-cdk-lib.RemovalPolicyOptions --- -##### `getAtt` +##### `getAtt` ```typescript public getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference @@ -1481,7 +3081,7 @@ Returns a token for an runtime attribute of this resource. Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility in case there is no generated attribute. -###### `attributeName`Required +###### `attributeName`Required - *Type:* string @@ -1489,13 +3089,13 @@ The name of the attribute. --- -###### `typeHint`Optional +###### `typeHint`Optional - *Type:* aws-cdk-lib.ResolutionTypeHint --- -##### `getMetadata` +##### `getMetadata` ```typescript public getMetadata(key: string): any @@ -1513,13 +3113,13 @@ Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.) -###### `key`Required +###### `key`Required - *Type:* string --- -##### `obtainDependencies` +##### `obtainDependencies` ```typescript public obtainDependencies(): (Stack | CfnResource)[] @@ -1530,7 +3130,7 @@ Retrieves an array of resources this resource depends on. This assembles dependencies on resources across stacks (including nested stacks) automatically. -##### `obtainResourceDependencies` +##### `obtainResourceDependencies` ```typescript public obtainResourceDependencies(): CfnResource[] @@ -1538,7 +3138,7 @@ public obtainResourceDependencies(): CfnResource[] Get a shallow copy of dependencies between this resource and other resources in the same stack. -##### `removeDependency` +##### `removeDependency` ```typescript public removeDependency(target: CfnResource): void @@ -1549,13 +3149,13 @@ Indicates that this resource no longer depends on another resource. This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource --- -##### `replaceDependency` +##### `replaceDependency` ```typescript public replaceDependency(target: CfnResource, newTarget: CfnResource): void @@ -1563,7 +3163,7 @@ public replaceDependency(target: CfnResource, newTarget: CfnResource): void Replaces one dependency with another. -###### `target`Required +###### `target`Required - *Type:* aws-cdk-lib.CfnResource @@ -1571,7 +3171,7 @@ The dependency to replace. --- -###### `newTarget`Required +###### `newTarget`Required - *Type:* aws-cdk-lib.CfnResource @@ -1579,7 +3179,7 @@ The new dependency to add. --- -##### `inspect` +##### `inspect` ```typescript public inspect(inspector: TreeInspector): void @@ -1587,7 +3187,7 @@ public inspect(inspector: TreeInspector): void Examines the CloudFormation resource and discloses attributes. -###### `inspector`Required +###### `inspector`Required - *Type:* aws-cdk-lib.TreeInspector @@ -1599,18 +3199,18 @@ tree inspector to collect and process attributes. | **Name** | **Description** | | --- | --- | -| isConstruct | Checks if `x` is a construct. | -| isCfnElement | Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). | -| isCfnResource | Check whether the given object is a CfnResource. | +| isConstruct | Checks if `x` is a construct. | +| isCfnElement | Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). | +| isCfnResource | Check whether the given object is a CfnResource. | --- -##### `isConstruct` +##### `isConstruct` ```typescript -import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' +import { MountpointS3CsiAddon } from '@smallcase/cdk-eks-cluster-module' -KubeProxyAddon.isConstruct(x: any) +MountpointS3CsiAddon.isConstruct(x: any) ``` Checks if `x` is a construct. @@ -1629,7 +3229,7 @@ library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead. -###### `x`Required +###### `x`Required - *Type:* any @@ -1637,12 +3237,12 @@ Any object. --- -##### `isCfnElement` +##### `isCfnElement` ```typescript -import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' +import { MountpointS3CsiAddon } from '@smallcase/cdk-eks-cluster-module' -KubeProxyAddon.isCfnElement(x: any) +MountpointS3CsiAddon.isCfnElement(x: any) ``` Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). @@ -1650,23 +3250,23 @@ Returns `true` if a construct is a stack element (i.e. part of the synthesized c Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack. -###### `x`Required +###### `x`Required - *Type:* any --- -##### `isCfnResource` +##### `isCfnResource` ```typescript -import { KubeProxyAddon } from '@smallcase/cdk-eks-cluster-module' +import { MountpointS3CsiAddon } from '@smallcase/cdk-eks-cluster-module' -KubeProxyAddon.isCfnResource(x: any) +MountpointS3CsiAddon.isCfnResource(x: any) ``` Check whether the given object is a CfnResource. -###### `x`Required +###### `x`Required - *Type:* any @@ -1676,28 +3276,28 @@ Check whether the given object is a CfnResource. | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | constructs.Node | The tree node. | -| creationStack | string[] | *No description.* | -| logicalId | string | The logical ID for this CloudFormation stack element. | -| stack | aws-cdk-lib.Stack | The stack in which this element is defined. | -| ref | string | Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. | -| cfnOptions | aws-cdk-lib.ICfnResourceOptions | Options for this resource, such as condition, update policy etc. | -| cfnResourceType | string | AWS resource type. | -| attrArn | string | The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . | -| tags | aws-cdk-lib.TagManager | Tag Manager which manages the tags for this resource. | -| addonName | string | The name of the add-on. | -| clusterName | string | The name of your cluster. | -| addonVersion | string | The version of the add-on. | -| configurationValues | string | The configuration values that you provided. | -| podIdentityAssociations | aws-cdk-lib.IResolvable \| aws-cdk-lib.IResolvable \| aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] | An array of Pod Identity Assocations owned by the Addon. | -| preserveOnDelete | boolean \| aws-cdk-lib.IResolvable | Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. | -| resolveConflicts | string | How to resolve field value conflicts for an Amazon EKS add-on. | -| serviceAccountRoleArn | string | The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. | -| tagsRaw | aws-cdk-lib.CfnTag[] | The metadata that you apply to the add-on to assist with categorization and organization. | - ---- - -##### `node`Required +| node | constructs.Node | The tree node. | +| creationStack | string[] | *No description.* | +| logicalId | string | The logical ID for this CloudFormation stack element. | +| stack | aws-cdk-lib.Stack | The stack in which this element is defined. | +| ref | string | Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. | +| cfnOptions | aws-cdk-lib.ICfnResourceOptions | Options for this resource, such as condition, update policy etc. | +| cfnResourceType | string | AWS resource type. | +| attrArn | string | The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vpc-cni/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` . | +| tags | aws-cdk-lib.TagManager | Tag Manager which manages the tags for this resource. | +| addonName | string | The name of the add-on. | +| clusterName | string | The name of your cluster. | +| addonVersion | string | The version of the add-on. | +| configurationValues | string | The configuration values that you provided. | +| podIdentityAssociations | aws-cdk-lib.IResolvable \| aws-cdk-lib.IResolvable \| aws-cdk-lib.aws_eks.CfnAddon.PodIdentityAssociationProperty[] | An array of Pod Identity Assocations owned by the Addon. | +| preserveOnDelete | boolean \| aws-cdk-lib.IResolvable | Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. | +| resolveConflicts | string | How to resolve field value conflicts for an Amazon EKS add-on. | +| serviceAccountRoleArn | string | The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. | +| tagsRaw | aws-cdk-lib.CfnTag[] | The metadata that you apply to the add-on to assist with categorization and organization. | + +--- + +##### `node`Required ```typescript public readonly node: Node; @@ -1709,7 +3309,7 @@ The tree node. --- -##### `creationStack`Required +##### `creationStack`Required ```typescript public readonly creationStack: string[]; @@ -1719,7 +3319,7 @@ public readonly creationStack: string[]; --- -##### `logicalId`Required +##### `logicalId`Required ```typescript public readonly logicalId: string; @@ -1736,7 +3336,7 @@ To override this value, use `overrideLogicalId(newLogicalId)`. --- -##### `stack`Required +##### `stack`Required ```typescript public readonly stack: Stack; @@ -1750,7 +3350,7 @@ CfnElements must be defined within a stack scope (directly or indirectly). --- -##### `ref`Required +##### `ref`Required ```typescript public readonly ref: string; @@ -1765,7 +3365,7 @@ coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. --- -##### `cfnOptions`Required +##### `cfnOptions`Required ```typescript public readonly cfnOptions: ICfnResourceOptions; @@ -1777,7 +3377,7 @@ Options for this resource, such as condition, update policy etc. --- -##### `cfnResourceType`Required +##### `cfnResourceType`Required ```typescript public readonly cfnResourceType: string; @@ -1789,7 +3389,7 @@ AWS resource type. --- -##### `attrArn`Required +##### `attrArn`Required ```typescript public readonly attrArn: string; @@ -1801,7 +3401,7 @@ The ARN of the add-on, such as `arn:aws:eks:us-west-2:111122223333:addon/1-19/vp --- -##### `tags`Required +##### `tags`Required ```typescript public readonly tags: TagManager; @@ -1813,7 +3413,7 @@ Tag Manager which manages the tags for this resource. --- -##### `addonName`Required +##### `addonName`Required ```typescript public readonly addonName: string; @@ -1825,7 +3425,7 @@ The name of the add-on. --- -##### `clusterName`Required +##### `clusterName`Required ```typescript public readonly clusterName: string; @@ -1837,7 +3437,7 @@ The name of your cluster. --- -##### `addonVersion`Optional +##### `addonVersion`Optional ```typescript public readonly addonVersion: string; @@ -1849,7 +3449,7 @@ The version of the add-on. --- -##### `configurationValues`Optional +##### `configurationValues`Optional ```typescript public readonly configurationValues: string; @@ -1861,7 +3461,7 @@ The configuration values that you provided. --- -##### `podIdentityAssociations`Optional +##### `podIdentityAssociations`Optional ```typescript public readonly podIdentityAssociations: IResolvable | (IResolvable | PodIdentityAssociationProperty)[]; @@ -1873,7 +3473,7 @@ An array of Pod Identity Assocations owned by the Addon. --- -##### `preserveOnDelete`Optional +##### `preserveOnDelete`Optional ```typescript public readonly preserveOnDelete: boolean | IResolvable; @@ -1885,7 +3485,7 @@ Specifying this option preserves the add-on software on your cluster but Amazon --- -##### `resolveConflicts`Optional +##### `resolveConflicts`Optional ```typescript public readonly resolveConflicts: string; @@ -1897,7 +3497,7 @@ How to resolve field value conflicts for an Amazon EKS add-on. --- -##### `serviceAccountRoleArn`Optional +##### `serviceAccountRoleArn`Optional ```typescript public readonly serviceAccountRoleArn: string; @@ -1909,7 +3509,7 @@ The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's s --- -##### `tagsRaw`Optional +##### `tagsRaw`Optional ```typescript public readonly tagsRaw: CfnTag[]; @@ -1925,11 +3525,11 @@ The metadata that you apply to the add-on to assist with categorization and orga | **Name** | **Type** | **Description** | | --- | --- | --- | -| CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. | +| CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. | --- -##### `CFN_RESOURCE_TYPE_NAME`Required +##### `CFN_RESOURCE_TYPE_NAME`Required ```typescript public readonly CFN_RESOURCE_TYPE_NAME: string; @@ -3267,7 +4867,6 @@ const defaultCommonComponents: DefaultCommonComponents = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | awsEbsCsiDriver | DefaultCommonComponentsProps | *No description.* | -| awsEfsCsiDriver | DefaultCommonComponentsProps | *No description.* | | clusterAutoscaler | DefaultCommonComponentsProps | *No description.* | | externalDns | DefaultCommonComponentsProps | *No description.* | @@ -3283,16 +4882,6 @@ public readonly awsEbsCsiDriver: DefaultCommonComponentsProps; --- -##### `awsEfsCsiDriver`Optional - -```typescript -public readonly awsEfsCsiDriver: DefaultCommonComponentsProps; -``` - -- *Type:* DefaultCommonComponentsProps - ---- - ##### `clusterAutoscaler`Optional ```typescript @@ -3363,7 +4952,9 @@ const eKSClusterProps: EKSClusterProps = { ... } | addonProps | AddonProps | *No description.* | | clusterVPC | aws-cdk-lib.aws_ec2.IVpc | *No description.* | | coreDnsAddonProps | CoreAddonValuesProps | *No description.* | +| efsCsiAddonProps | CoreAddonValuesProps | *No description.* | | kubeProxyAddonProps | CoreAddonValuesProps | *No description.* | +| s3CsiAddonProps | CoreAddonValuesProps | *No description.* | --- @@ -3447,6 +5038,16 @@ public readonly coreDnsAddonProps: CoreAddonValuesProps; --- +##### `efsCsiAddonProps`Optional + +```typescript +public readonly efsCsiAddonProps: CoreAddonValuesProps; +``` + +- *Type:* CoreAddonValuesProps + +--- + ##### `kubeProxyAddonProps`Optional ```typescript @@ -3457,6 +5058,16 @@ public readonly kubeProxyAddonProps: CoreAddonValuesProps; --- +##### `s3CsiAddonProps`Optional + +```typescript +public readonly s3CsiAddonProps: CoreAddonValuesProps; +``` + +- *Type:* CoreAddonValuesProps + +--- + ### FargateProfile #### Initializer diff --git a/src/constructs/core-addon.ts b/src/constructs/core-addon.ts index 7cbb7d4..baf6ac5 100644 --- a/src/constructs/core-addon.ts +++ b/src/constructs/core-addon.ts @@ -23,6 +23,7 @@ interface CoreAddonAbstractProps { readonly resolveConflicts?: boolean; readonly serviceAccountName?: string; readonly awsManagedPolicyName?: string; + readonly awsManagedPolicyNames?: string[]; readonly namespace?: string; } @@ -64,6 +65,11 @@ abstract class CoreAddonAbstract extends eks.CfnAddon { iam.ManagedPolicy.fromAwsManagedPolicyName(props.awsManagedPolicyName), ); } + for (const policyName of props.awsManagedPolicyNames ?? []) { + serviceAccountRole.addManagedPolicy( + iam.ManagedPolicy.fromAwsManagedPolicyName(policyName), + ); + } this.serviceAccountRoleArn = serviceAccountRole.roleArn; } } @@ -92,4 +98,24 @@ export class KubeProxyAddon extends CoreAddonAbstract { serviceAccountName: 'kube-proxy', }); } -} \ No newline at end of file +} + +export class MountpointS3CsiAddon extends CoreAddonAbstract { + constructor(scope: Construct, id: string, props: CoreAddonProps) { + super(scope, id, { + ...props, + addonName: 'aws-mountpoint-s3-csi-driver', + }); + } +} + +export class AwsEfsCsiAddon extends CoreAddonAbstract { + constructor(scope: Construct, id: string, props: CoreAddonProps) { + super(scope, id, { + ...props, + addonName: 'aws-efs-csi-driver', + serviceAccountName: 'efs-csi-controller-sa', + awsManagedPolicyNames: ['service-role/AmazonEFSCSIDriverPolicy', 'service-role/AmazonS3FilesCSIDriverPolicy'], + }); + } +} diff --git a/src/constructs/eks-cluster.ts b/src/constructs/eks-cluster.ts index e878dbb..920d163 100644 --- a/src/constructs/eks-cluster.ts +++ b/src/constructs/eks-cluster.ts @@ -6,7 +6,7 @@ import * as kms from 'aws-cdk-lib/aws-kms'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { Construct } from 'constructs'; import { CommonHelmCharts, StandardHelmProps } from './common-helm-charts'; -import { CoreDnsAddon, KubeProxyAddon } from './core-addon'; +import { AwsEfsCsiAddon, CoreDnsAddon, KubeProxyAddon, MountpointS3CsiAddon } from './core-addon'; import { VpcCniAddonVersion, VpcEniAddon, @@ -82,7 +82,6 @@ export interface ClusterConfig { export interface DefaultCommonComponents { readonly externalDns?: DefaultCommonComponentsProps; readonly clusterAutoscaler?: DefaultCommonComponentsProps; - readonly awsEfsCsiDriver?: DefaultCommonComponentsProps; readonly awsEbsCsiDriver?: DefaultCommonComponentsProps; } @@ -109,6 +108,8 @@ export interface EKSClusterProps { readonly addonProps?: AddonProps; readonly coreDnsAddonProps?: CoreAddonValuesProps; readonly kubeProxyAddonProps?: CoreAddonValuesProps; + readonly s3CsiAddonProps?: CoreAddonValuesProps; + readonly efsCsiAddonProps?: CoreAddonValuesProps; readonly region: string; } @@ -421,6 +422,30 @@ export class EKSCluster extends Construct { }); } + if (props.s3CsiAddonProps) { + const s3CsiAddonConfig = this.props.s3CsiAddonProps?.addonVersion && this.props.s3CsiAddonProps?.configurationValues + ? { addonVersion: this.props.s3CsiAddonProps?.addonVersion, configurationValues: this.props.s3CsiAddonProps?.configurationValues } + : { addonVersion: this.props.s3CsiAddonProps?.addonVersion }; + + new MountpointS3CsiAddon(this, 'MountpointS3CsiAddon', { + cluster: this.cluster, + ...s3CsiAddonConfig, + resolveConflicts: true, + }); + } + + if (props.efsCsiAddonProps) { + const efsCsiAddonConfig = this.props.efsCsiAddonProps?.addonVersion && this.props.efsCsiAddonProps?.configurationValues + ? { addonVersion: this.props.efsCsiAddonProps?.addonVersion, configurationValues: this.props.efsCsiAddonProps?.configurationValues } + : { addonVersion: this.props.efsCsiAddonProps?.addonVersion }; + + new AwsEfsCsiAddon(this, 'AwsEfsCsiAddon', { + cluster: this.cluster, + ...efsCsiAddonConfig, + resolveConflicts: true, + }); + } + const storageclassDefault = new eks.KubernetesManifest(this, 'gp2', { overwrite: true, cluster: this.cluster, @@ -584,30 +609,6 @@ export class EKSCluster extends Construct { }, }, }, - 'aws-efs-csi-driver': { - iamPolicyPath: [`${__dirname}/../../assets/policy/aws-efs-csi-driver-policy.json`], - serviceAccounts: ['efs-csi-controller-sa', 'efs-csi-node-sa'], - helm: { - chartName: 'aws-efs-csi-driver', - chartVersion: '2.3.6', - helmRepository: 'https://kubernetes-sigs.github.io/aws-efs-csi-driver/', - namespace: props?.awsEfsCsiDriver?.namespace ?? 'kube-system', - helmValues: { - controller: { - serviceAccount: { - create: false, - name: 'efs-csi-controller-sa', - }, - }, - node: { - serviceAccount: { - create: false, - name: 'efs-csi-node-sa', - }, - }, - }, - }, - }, 'node-problem-detector': { helm: { chartName: 'node-problem-detector',