Class: AWSCDK::EKSv2::KubectlProviderProps
- Inherits:
-
KubectlProviderOptions
- Object
- KubectlProviderOptions
- AWSCDK::EKSv2::KubectlProviderProps
- Defined in:
- ek_sv2/kubectl_provider_props.rb
Overview
Properties for a KubectlProvider.
Instance Attribute Summary collapse
-
#awscli_layer ⇒ AWSCDK::Lambda::ILayerVersion?
readonly
An AWS Lambda layer that contains the
awsCLI. -
#cluster ⇒ AWSCDK::EKSv2::ICluster
readonly
The cluster to control.
-
#environment ⇒ Hash{String => String}?
readonly
Custom environment variables when running
kubectlagainst this cluster. -
#kubectl_layer ⇒ AWSCDK::Lambda::ILayerVersion
readonly
An AWS Lambda layer that includes
kubectlandhelm. -
#memory ⇒ AWSCDK::Size?
readonly
The amount of memory allocated to the kubectl provider's lambda function.
-
#private_subnets ⇒ Array<AWSCDK::EC2::ISubnet>?
readonly
Subnets to host the
kubectlcompute resources. -
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy applied to the custom resource that provides kubectl.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role that can perform kubectl operations against this cluster.
-
#security_group ⇒ AWSCDK::EC2::ISecurityGroup?
readonly
deprecated
Deprecated.
Use
securityGroupsinstead. -
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
Security groups to use for
kubectlexecution.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(kubectl_layer:, awscli_layer: nil, environment: nil, memory: nil, private_subnets: nil, removal_policy: nil, role: nil, security_group: nil, security_groups: nil, cluster:) ⇒ KubectlProviderProps
constructor
A new instance of KubectlProviderProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(kubectl_layer:, awscli_layer: nil, environment: nil, memory: nil, private_subnets: nil, removal_policy: nil, role: nil, security_group: nil, security_groups: nil, cluster:) ⇒ KubectlProviderProps
Returns a new instance of KubectlProviderProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'ek_sv2/kubectl_provider_props.rb', line 17 def initialize(kubectl_layer:, awscli_layer: nil, environment: nil, memory: nil, private_subnets: nil, removal_policy: nil, role: nil, security_group: nil, security_groups: nil, cluster:) @kubectl_layer = kubectl_layer Jsii::Type.check_type(@kubectl_layer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklMYXllclZlcnNpb24ifQ==")), "kubectlLayer") @awscli_layer = awscli_layer Jsii::Type.check_type(@awscli_layer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklMYXllclZlcnNpb24ifQ==")), "awscliLayer") unless @awscli_layer.nil? @environment = environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "environment") unless @environment.nil? @memory = memory Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "memory") unless @memory.nil? @private_subnets = private_subnets Jsii::Type.check_type(@private_subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVN1Ym5ldCJ9LCJraW5kIjoiYXJyYXkifX0=")), "privateSubnets") unless @private_subnets.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? @security_group = security_group Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @cluster = cluster Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLklDbHVzdGVyIn0=")), "cluster") end |
Instance Attribute Details
#awscli_layer ⇒ AWSCDK::Lambda::ILayerVersion? (readonly)
Default: - If not defined, a default layer will be used containing the AWS CLI 2.x.
An AWS Lambda layer that contains the aws CLI.
48 49 50 |
# File 'ek_sv2/kubectl_provider_props.rb', line 48 def awscli_layer @awscli_layer end |
#cluster ⇒ AWSCDK::EKSv2::ICluster (readonly)
The cluster to control.
102 103 104 |
# File 'ek_sv2/kubectl_provider_props.rb', line 102 def cluster @cluster end |
#environment ⇒ Hash{String => String}? (readonly)
Default: - No custom environment variables
Custom environment variables when running kubectl against this cluster.
53 54 55 |
# File 'ek_sv2/kubectl_provider_props.rb', line 53 def environment @environment end |
#kubectl_layer ⇒ AWSCDK::Lambda::ILayerVersion (readonly)
An AWS Lambda layer that includes kubectl and helm.
43 44 45 |
# File 'ek_sv2/kubectl_provider_props.rb', line 43 def kubectl_layer @kubectl_layer end |
#memory ⇒ AWSCDK::Size? (readonly)
Default: - 1024
The amount of memory allocated to the kubectl provider's lambda function.
58 59 60 |
# File 'ek_sv2/kubectl_provider_props.rb', line 58 def memory @memory end |
#private_subnets ⇒ Array<AWSCDK::EC2::ISubnet>? (readonly)
Default: - the k8s is accessible publicly
Subnets to host the kubectl compute resources.
If not specified, the k8s endpoint is expected to be accessible publicly.
66 67 68 |
# File 'ek_sv2/kubectl_provider_props.rb', line 66 def private_subnets @private_subnets end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
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
78 79 80 |
# File 'ek_sv2/kubectl_provider_props.rb', line 78 def removal_policy @removal_policy end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - if not specified, the default role created by a lambda function will be used.
An IAM role that can perform kubectl operations against this cluster.
The role should be mapped to the system:masters Kubernetes RBAC role.
This role is directly passed to the lambda handler that sends Kube Ctl commands to the cluster.
87 88 89 |
# File 'ek_sv2/kubectl_provider_props.rb', line 87 def role @role end |
#security_group ⇒ AWSCDK::EC2::ISecurityGroup? (readonly)
Use securityGroups instead.
Default: - If not specified, the k8s endpoint is expected to be accessible publicly.
A security group to use for kubectl execution.
93 94 95 |
# File 'ek_sv2/kubectl_provider_props.rb', line 93 def security_group @security_group end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - If not specified, the k8s endpoint is expected to be accessible publicly.
Security groups to use for kubectl execution.
98 99 100 |
# File 'ek_sv2/kubectl_provider_props.rb', line 98 def security_groups @security_groups end |
Class Method Details
.jsii_properties ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'ek_sv2/kubectl_provider_props.rb', line 104 def self.jsii_properties { :kubectl_layer => "kubectlLayer", :awscli_layer => "awscliLayer", :environment => "environment", :memory => "memory", :private_subnets => "privateSubnets", :removal_policy => "removalPolicy", :role => "role", :security_group => "securityGroup", :security_groups => "securityGroups", :cluster => "cluster", } end |
Instance Method Details
#to_jsii ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'ek_sv2/kubectl_provider_props.rb', line 119 def to_jsii result = {} result.merge!(super) result.merge!({ "kubectlLayer" => @kubectl_layer, "awscliLayer" => @awscli_layer, "environment" => @environment, "memory" => @memory, "privateSubnets" => @private_subnets, "removalPolicy" => @removal_policy, "role" => @role, "securityGroup" => @security_group, "securityGroups" => @security_groups, "cluster" => @cluster, }) result.compact end |