Class: AWSCDK::EKSv2::HelmChartOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ek_sv2/helm_chart_options.rb

Overview

Helm Chart options.

Direct Known Subclasses

HelmChartProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(atomic: nil, chart: nil, chart_asset: nil, create_namespace: nil, namespace: nil, release: nil, removal_policy: nil, repository: nil, skip_crds: nil, timeout: nil, values: nil, version: nil, wait: nil) ⇒ HelmChartOptions

Returns a new instance of HelmChartOptions.

Parameters:

  • atomic (Boolean, nil) (defaults to: nil)

    Whether or not Helm should treat this operation as atomic;

  • chart (String, nil) (defaults to: nil)

    The name of the chart.

  • chart_asset (AWSCDK::S3Assets::Asset, nil) (defaults to: nil)

    The chart in the form of an asset.

  • create_namespace (Boolean, nil) (defaults to: nil)

    create namespace if not exist.

  • namespace (String, nil) (defaults to: nil)

    The Kubernetes namespace scope of the requests.

  • release (String, nil) (defaults to: nil)

    The name of the release.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy applied to the custom resource that manages the Helm chart.

  • repository (String, nil) (defaults to: nil)

    The repository which contains the chart.

  • skip_crds (Boolean, nil) (defaults to: nil)

    if set, no CRDs will be installed.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    Amount of time to wait for any individual Kubernetes operation.

  • values (Hash{String => Object}, nil) (defaults to: nil)

    The values to be used by the chart.

  • version (String, nil) (defaults to: nil)

    The chart version to install.

  • wait (Boolean, nil) (defaults to: nil)

    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.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'ek_sv2/helm_chart_options.rb', line 20

def initialize(atomic: nil, chart: nil, chart_asset: nil, create_namespace: nil, namespace: nil, release: nil, removal_policy: nil, repository: nil, skip_crds: nil, timeout: nil, values: nil, version: nil, wait: nil)
  @atomic = atomic
  Jsii::Type.check_type(@atomic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "atomic") unless @atomic.nil?
  @chart = chart
  Jsii::Type.check_type(@chart, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "chart") unless @chart.nil?
  @chart_asset = chart_asset
  Jsii::Type.check_type(@chart_asset, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczNfYXNzZXRzLkFzc2V0In0=")), "chartAsset") unless @chart_asset.nil?
  @create_namespace = create_namespace
  Jsii::Type.check_type(@create_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "createNamespace") unless @create_namespace.nil?
  @namespace = namespace
  Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil?
  @release = release
  Jsii::Type.check_type(@release, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "release") unless @release.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @repository = repository
  Jsii::Type.check_type(@repository, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repository") unless @repository.nil?
  @skip_crds = skip_crds
  Jsii::Type.check_type(@skip_crds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "skipCrds") unless @skip_crds.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
  @values = values
  Jsii::Type.check_type(@values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "values") unless @values.nil?
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil?
  @wait = wait
  Jsii::Type.check_type(@wait, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "wait") unless @wait.nil?
end

Instance Attribute Details

#atomicBoolean? (readonly)

Note:

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.

Returns:

  • (Boolean, nil)


56
57
58
# File 'ek_sv2/helm_chart_options.rb', line 56

def atomic
  @atomic
end

#chartString? (readonly)

Note:

Default: - No chart name. Implies chartAsset is used.

The name of the chart.

Either this or chart_asset must be specified.

Returns:

  • (String, nil)


63
64
65
# File 'ek_sv2/helm_chart_options.rb', line 63

def chart
  @chart
end

#chart_assetAWSCDK::S3Assets::Asset? (readonly)

Note:

Default: - No chart asset. Implies chart is used.

The chart in the form of an asset.

Either this or chart must be specified.

Returns:



70
71
72
# File 'ek_sv2/helm_chart_options.rb', line 70

def chart_asset
  @chart_asset
end

#create_namespaceBoolean? (readonly)

Note:

Default: true

create namespace if not exist.

Returns:

  • (Boolean, nil)


75
76
77
# File 'ek_sv2/helm_chart_options.rb', line 75

def create_namespace
  @create_namespace
end

#namespaceString? (readonly)

Note:

Default: default

The Kubernetes namespace scope of the requests.

Returns:

  • (String, nil)


80
81
82
# File 'ek_sv2/helm_chart_options.rb', line 80

def namespace
  @namespace
end

#releaseString? (readonly)

Note:

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.

Returns:

  • (String, nil)


85
86
87
# File 'ek_sv2/helm_chart_options.rb', line 85

def release
  @release
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

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

Returns:



97
98
99
# File 'ek_sv2/helm_chart_options.rb', line 97

def removal_policy
  @removal_policy
end

#repositoryString? (readonly)

Note:

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/

Returns:

  • (String, nil)


104
105
106
# File 'ek_sv2/helm_chart_options.rb', line 104

def repository
  @repository
end

#skip_crdsBoolean? (readonly)

Note:

Default: - CRDs are installed if not already present

if set, no CRDs will be installed.

Returns:

  • (Boolean, nil)


109
110
111
# File 'ek_sv2/helm_chart_options.rb', line 109

def skip_crds
  @skip_crds
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.minutes(5)

Amount of time to wait for any individual Kubernetes operation.

Maximum 15 minutes.

Returns:



116
117
118
# File 'ek_sv2/helm_chart_options.rb', line 116

def timeout
  @timeout
end

#valuesHash{String => Object}? (readonly)

Note:

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 } }

Returns:

  • (Hash{String => Object}, nil)


127
128
129
# File 'ek_sv2/helm_chart_options.rb', line 127

def values
  @values
end

#versionString? (readonly)

Note:

Default: - If this is not specified, the latest version is installed

The chart version to install.

Returns:

  • (String, nil)


132
133
134
# File 'ek_sv2/helm_chart_options.rb', line 132

def version
  @version
end

#waitBoolean? (readonly)

Note:

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.

Returns:

  • (Boolean, nil)


137
138
139
# File 'ek_sv2/helm_chart_options.rb', line 137

def wait
  @wait
end

Class Method Details

.jsii_propertiesObject



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'ek_sv2/helm_chart_options.rb', line 139

def self.jsii_properties
  {
    :atomic => "atomic",
    :chart => "chart",
    :chart_asset => "chartAsset",
    :create_namespace => "createNamespace",
    :namespace => "namespace",
    :release => "release",
    :removal_policy => "removalPolicy",
    :repository => "repository",
    :skip_crds => "skipCrds",
    :timeout => "timeout",
    :values => "values",
    :version => "version",
    :wait => "wait",
  }
end

Instance Method Details

#to_jsiiObject



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'ek_sv2/helm_chart_options.rb', line 157

def to_jsii
  result = {}
  result.merge!({
    "atomic" => @atomic,
    "chart" => @chart,
    "chartAsset" => @chart_asset,
    "createNamespace" => @create_namespace,
    "namespace" => @namespace,
    "release" => @release,
    "removalPolicy" => @removal_policy,
    "repository" => @repository,
    "skipCrds" => @skip_crds,
    "timeout" => @timeout,
    "values" => @values,
    "version" => @version,
    "wait" => @wait,
  })
  result.compact
end