Class: AWSCDK::EKS::KubectlProviderProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
eks/kubectl_provider_props.rb

Overview

Properties for a KubectlProvider.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster:, removal_policy: nil) ⇒ KubectlProviderProps

Returns a new instance of KubectlProviderProps.

Parameters:



9
10
11
12
13
14
# File 'eks/kubectl_provider_props.rb', line 9

def initialize(cluster:, removal_policy: nil)
  @cluster = cluster
  Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLklDbHVzdGVyIn0=")), "cluster")
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
end

Instance Attribute Details

#clusterAWSCDK::EKS::ICluster (readonly)

The cluster to control.



19
20
21
# File 'eks/kubectl_provider_props.rb', line 19

def cluster
  @cluster
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.DESTROY

The removal policy applied to the custom resource that provides kubectl.

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:



31
32
33
# File 'eks/kubectl_provider_props.rb', line 31

def removal_policy
  @removal_policy
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
# File 'eks/kubectl_provider_props.rb', line 33

def self.jsii_properties
  {
    :cluster => "cluster",
    :removal_policy => "removalPolicy",
  }
end

Instance Method Details

#to_jsiiObject



40
41
42
43
44
45
46
47
# File 'eks/kubectl_provider_props.rb', line 40

def to_jsii
  result = {}
  result.merge!({
    "cluster" => @cluster,
    "removalPolicy" => @removal_policy,
  })
  result.compact
end