class HelmChart (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Eks.V2.Alpha.HelmChart |
Go | github.com/aws/aws-cdk-go/awscdkeksv2alpha/v2#HelmChart |
Java | software.amazon.awscdk.services.eks.v2.alpha.HelmChart |
Python | aws_cdk.aws_eks_v2_alpha.HelmChart |
TypeScript (source) | @aws-cdk/aws-eks-v2-alpha ยป HelmChart |
Implements
IConstruct, IDependable
Represents a helm chart within the Kubernetes system.
Applies/deletes the resources using kubectl in sync with the resource.
Example
declare const cluster: eks.Cluster;
// option 1: use a construct
new eks.HelmChart(this, 'MyOCIChart', {
cluster,
chart: 'some-chart',
repository: 'oci://${ACCOUNT_ID}.dkr.ecr.${ACCOUNT_REGION}.amazonaws.com/${REPO_NAME}',
namespace: 'oci',
version: '0.0.1'
});
Initializer
new HelmChart(scope: Construct, id: string, props: HelmChartProps)
Parameters
- scope
Construct - id
string - props
HelmChart Props
Construct Props
| Name | Type | Description |
|---|---|---|
| cluster | ICluster | The EKS cluster to apply this configuration to. |
| atomic? | boolean | Whether or not Helm should treat this operation as atomic; |
| chart? | string | The name of the chart. |
| chart | Asset | The chart in the form of an asset. |
| create | boolean | create namespace if not exist. |
| namespace? | string | The Kubernetes namespace scope of the requests. |
| release? | string | The name of the release. |
| removal | Removal | The removal policy applied to the custom resource that manages the Helm chart. |
| repository? | string | The repository which contains the chart. |
| skip | boolean | if set, no CRDs will be installed. |
| timeout? | Duration | Amount of time to wait for any individual Kubernetes operation. |
| values? | { [string]: any } | The values to be used by the chart. |
| version? | string | The chart version to install. |
| wait? | boolean | Whether or not Helm should wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. |
cluster
Type:
ICluster
The EKS cluster to apply this configuration to.
[disable-awslint:ref-via-interface]
atomic?
Type:
boolean
(optional, default: false)
Whether or not Helm should treat this operation as atomic;
if set, upgrade process rolls back changes made in case of failed upgrade. The --wait flag will be set automatically if --atomic is used.
chart?
Type:
string
(optional, default: No chart name. Implies chartAsset is used.)
The name of the chart.
Either this or chartAsset must be specified.
chartAsset?
Type:
Asset
(optional, default: No chart asset. Implies chart is used.)
The chart in the form of an asset.
Either this or chart must be specified.
createNamespace?
Type:
boolean
(optional, default: true)
create namespace if not exist.
namespace?
Type:
string
(optional, default: default)
The Kubernetes namespace scope of the requests.
release?
Type:
string
(optional, default: If no release name is given, it will use the last 53 characters of the node's unique id.)
The name of the release.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.DESTROY)
The removal policy applied to the custom resource that manages the Helm chart.
The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:
- The resource is removed from the template, so CloudFormation stops managing it
- A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
- The stack is deleted, so CloudFormation stops managing all resources in it
repository?
Type:
string
(optional, default: No repository will be used, which means that the chart needs to be an absolute URL.)
The repository which contains the chart.
For example: https://charts.helm.sh/stable/
skipCrds?
Type:
boolean
(optional, default: CRDs are installed if not already present)
if set, no CRDs will be installed.
timeout?
Type:
Duration
(optional, default: Duration.minutes(5))
Amount of time to wait for any individual Kubernetes operation.
Maximum 15 minutes.
values?
Type:
{ [string]: any }
(optional, default: No values are provided to the chart.)
The values to be used by the chart.
For nested values use a nested dictionary. For example: values: { installationCRDs: true, webhook: { port: 9443 } }
version?
Type:
string
(optional, default: If this is not specified, the latest version is installed)
The chart version to install.
wait?
Type:
boolean
(optional, default: Helm will not wait before marking release as successful)
Whether or not Helm should wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful.
Properties
| Name | Type | Description |
|---|---|---|
| node | Node | The tree node. |
| atomic? | boolean | |
| chart? | string | |
| chart | Asset | |
| repository? | string | |
| version? | string | |
| static RESOURCE_TYPE | string | The CloudFormation resource type. |
node
Type:
Node
The tree node.
atomic?
Type:
boolean
(optional)
chart?
Type:
string
(optional)
chartAsset?
Type:
Asset
(optional)
repository?
Type:
string
(optional)
version?
Type:
string
(optional)
static RESOURCE_TYPE
Type:
string
The CloudFormation resource type.
Methods
| Name | Description |
|---|---|
| to | Returns a string representation of this construct. |
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.

.NET
Go
Java
Python
TypeScript (