Class KubectlProviderProps.Builder
java.lang.Object
software.amazon.awscdk.services.eks.v2.alpha.KubectlProviderProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<KubectlProviderProps>
- Enclosing interface:
KubectlProviderProps
@Stability(Experimental)
public static final class KubectlProviderProps.Builder
extends Object
implements software.amazon.jsii.Builder<KubectlProviderProps>
A builder for
KubectlProviderProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionawscliLayer(ILayerVersion awscliLayer) Sets the value ofKubectlProviderOptions.getAwscliLayer()build()Builds the configured instance.Sets the value ofKubectlProviderProps.getCluster()environment(Map<String, String> environment) Sets the value ofKubectlProviderOptions.getEnvironment()kubectlLayer(ILayerVersion kubectlLayer) Sets the value ofKubectlProviderOptions.getKubectlLayer()Sets the value ofKubectlProviderOptions.getMemory()privateSubnets(List<? extends ISubnet> privateSubnets) Sets the value ofKubectlProviderOptions.getPrivateSubnets()removalPolicy(RemovalPolicy removalPolicy) Sets the value ofKubectlProviderOptions.getRemovalPolicy()Sets the value ofKubectlProviderOptions.getRole()securityGroup(ISecurityGroup securityGroup) Sets the value ofKubectlProviderOptions.getSecurityGroup()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cluster
Sets the value ofKubectlProviderProps.getCluster()- Parameters:
cluster- The cluster to control. This parameter is required.- Returns:
this
-
kubectlLayer
@Stability(Experimental) public KubectlProviderProps.Builder kubectlLayer(ILayerVersion kubectlLayer) Sets the value ofKubectlProviderOptions.getKubectlLayer()- Parameters:
kubectlLayer- An AWS Lambda layer that includeskubectlandhelm. This parameter is required.- Returns:
this
-
awscliLayer
Sets the value ofKubectlProviderOptions.getAwscliLayer()- Parameters:
awscliLayer- An AWS Lambda layer that contains theawsCLI. If not defined, a default layer will be used containing the AWS CLI 2.x.- Returns:
this
-
environment
@Stability(Experimental) public KubectlProviderProps.Builder environment(Map<String, String> environment) Sets the value ofKubectlProviderOptions.getEnvironment()- Parameters:
environment- Custom environment variables when runningkubectlagainst this cluster.- Returns:
this
-
memory
Sets the value ofKubectlProviderOptions.getMemory()- Parameters:
memory- The amount of memory allocated to the kubectl provider's lambda function.- Returns:
this
-
privateSubnets
@Stability(Experimental) public KubectlProviderProps.Builder privateSubnets(List<? extends ISubnet> privateSubnets) Sets the value ofKubectlProviderOptions.getPrivateSubnets()- Parameters:
privateSubnets- Subnets to host thekubectlcompute resources. If not specified, the k8s endpoint is expected to be accessible publicly.- Returns:
this
-
removalPolicy
@Stability(Experimental) public KubectlProviderProps.Builder removalPolicy(RemovalPolicy removalPolicy) Sets the value ofKubectlProviderOptions.getRemovalPolicy()- Parameters:
removalPolicy- 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:
this
-
role
Sets the value ofKubectlProviderOptions.getRole()- Parameters:
role- An IAM role that can perform kubectl operations against this cluster. The role should be mapped to thesystem:mastersKubernetes RBAC role.This role is directly passed to the lambda handler that sends Kube Ctl commands to the cluster.
- Returns:
this
-
securityGroup
@Stability(Experimental) public KubectlProviderProps.Builder securityGroup(ISecurityGroup securityGroup) Sets the value ofKubectlProviderOptions.getSecurityGroup()- Parameters:
securityGroup- A security group to use forkubectlexecution.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<KubectlProviderProps>- Returns:
- a new instance of
KubectlProviderProps - Throws:
NullPointerException- if any required attribute was not provided
-