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()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
-
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
-