HelmChart
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'
});
# cluster: eks.Cluster
# option 1: use a construct
eks.HelmChart(self, "MyOCIChart",
cluster=cluster,
chart="some-chart",
repository="oci://${ACCOUNT_ID}.dkr.ecr.${ACCOUNT_REGION}.amazonaws.com/${REPO_NAME}",
namespace="oci",
version="0.0.1"
)
Cluster cluster;
// option 1: use a construct
// option 1: use a construct
HelmChart.Builder.create(this, "MyOCIChart")
.cluster(cluster)
.chart("some-chart")
.repository("oci://${ACCOUNT_ID}.dkr.ecr.${ACCOUNT_REGION}.amazonaws.com/${REPO_NAME}")
.namespace("oci")
.version("0.0.1")
.build();
// Install: dotnet add package Amazon.CDK.Lib
Cluster cluster;
// option 1: use a construct
// option 1: use a construct
new HelmChart(this, "MyOCIChart", new HelmChartProps {
Cluster = cluster,
Chart = "some-chart",
Repository = "oci://${ACCOUNT_ID}.dkr.ecr.${ACCOUNT_REGION}.amazonaws.com/${REPO_NAME}",
Namespace = "oci",
Version = "0.0.1"
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cluster Cluster
// option 1: use a construct
// option 1: use a construct
eks.NewHelmChart(this, jsii.String("MyOCIChart"), &HelmChartProps{
Cluster: Cluster,
Chart: jsii.String("some-chart"),
Repository: jsii.String("oci://${ACCOUNT_ID}.dkr.ecr.${ACCOUNT_REGION}.amazonaws.com/${REPO_NAME}"),
Namespace: jsii.String("oci"),
Version: jsii.String("0.0.1"),
})
Initializer
new HelmChart(scope: Construct, id: string, props: HelmChartProps)
HelmChart(scope: Construct, id: str, props: HelmChartProps)
new HelmChart(Construct scope, String id, HelmChartProps props)
new HelmChart(Construct scope, string id, HelmChartProps props)
NewHelmChart(Scope Construct, Id *string, Props HelmChartProps)
Construct Props
atomicoptionalbooleanatomicoptionalboolatomicoptionalBooleanAtomicoptionalboolAtomicoptional*bool= false#if set, upgrade process rolls back changes made in case of failed upgrade. The --wait flag will be set automatically if --atomic is used.
Default: No chart name. Implies chartAsset is used.
Either this or chartAsset must be specified.
chartAssetoptionalAssetchart_assetoptionalAssetchartAssetoptionalAssetChartAssetoptionalAssetChartAssetoptionalAsset#Default: No chart asset. Implies chart is used.
Either this or chart must be specified.
[disable-awslint:ref-via-interface]
createNamespaceoptionalbooleancreate_namespaceoptionalboolcreateNamespaceoptionalBooleanCreateNamespaceoptionalboolCreateNamespaceoptional*bool= true#namespaceoptionalstringnamespaceoptionalstrnamespaceoptionalStringNamespaceoptionalstringNamespaceoptional*string= default#releaseoptionalstringreleaseoptionalstrreleaseoptionalStringReleaseoptionalstringReleaseoptional*string#Default: If no release name is given, it will use the last 53 characters of the node's unique id.
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.DESTROY#notes
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
repositoryoptionalstringrepositoryoptionalstrrepositoryoptionalStringRepositoryoptionalstringRepositoryoptional*string#Default: No repository will be used, which means that the chart needs to be an absolute URL.
For example: https://charts.helm.sh/stable/
skipCrdsoptionalbooleanskip_crdsoptionalboolskipCrdsoptionalBooleanSkipCrdsoptionalboolSkipCrdsoptional*bool#Default: CRDs are installed if not already present
timeoutoptionalDurationtimeoutoptionalDurationtimeoutoptionalDurationTimeoutoptionalDurationTimeoutoptionalDuration= Duration.minutes(5)#Maximum 15 minutes.
valuesoptional{ [key: string]: any }valuesoptionaltyping.Mapping[str, Any]valuesoptionalMap<String, Object>ValuesoptionalIDictionary<string, object>Valuesoptional*map[string]interface{}#Default: No values are provided to the chart.
For nested values use a nested dictionary. For example: values: { installationCRDs: true, webhook: { port: 9443 } }
versionoptionalstringversionoptionalstrversionoptionalStringVersionoptionalstringVersionoptional*string#Default: If this is not specified, the latest version is installed
Default: Helm will not wait before marking release as successful
Properties
atomicmay be undefinedbooleanatomicmay be undefinedboolatomicmay be undefinedBooleanAtomicmay be undefinedboolAtomicmay be undefined*bool#chartmay be undefinedstringchartmay be undefinedstrchartmay be undefinedStringChartmay be undefinedstringChartmay be undefined*string#repositorymay be undefinedstringrepositorymay be undefinedstrrepositorymay be undefinedStringRepositorymay be undefinedstringRepositorymay be undefined*string#RESOURCE_TYPEstringresource_typestrRESOURCE_TYPEStringRESOURCE_TYPEstringRESOURCE_TYPE*stringrequiredstatic#versionmay be undefinedstringversionmay be undefinedstrversionmay be undefinedStringVersionmay be undefinedstringVersionmay be undefined*string#Methods
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
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.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#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.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining