Class KubectlProvider.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<KubectlProvider>
- Enclosing class:
KubectlProvider
KubectlProvider.-
Method Summary
Modifier and TypeMethodDescriptionawscliLayer(ILayerVersion awscliLayer) An AWS Lambda layer that contains theawsCLI.build()The cluster to control.static KubectlProvider.Builderenvironment(Map<String, String> environment) Custom environment variables when runningkubectlagainst this cluster.kubectlLayer(ILayerVersion kubectlLayer) An AWS Lambda layer that includeskubectlandhelm.The amount of memory allocated to the kubectl provider's lambda function.privateSubnets(List<? extends ISubnet> privateSubnets) Subnets to host thekubectlcompute resources.removalPolicy(RemovalPolicy removalPolicy) The removal policy applied to the custom resource that provides kubectl.An IAM role that can perform kubectl operations against this cluster.securityGroup(ISecurityGroup securityGroup) A security group to use forkubectlexecution.
-
Method Details
-
create
@Stability(Stable) public static KubectlProvider.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
KubectlProvider.Builder.
-
kubectlLayer
An AWS Lambda layer that includeskubectlandhelm.- Parameters:
kubectlLayer- An AWS Lambda layer that includeskubectlandhelm. This parameter is required.- Returns:
this
-
awscliLayer
An AWS Lambda layer that contains theawsCLI.Default: - If not defined, a default layer will be used containing the AWS CLI 2.x.
- Parameters:
awscliLayer- An AWS Lambda layer that contains theawsCLI. This parameter is required.- Returns:
this
-
environment
Custom environment variables when runningkubectlagainst this cluster.Default: - No custom environment variables
- Parameters:
environment- Custom environment variables when runningkubectlagainst this cluster. This parameter is required.- Returns:
this
-
memory
The amount of memory allocated to the kubectl provider's lambda function.Default: - 1024
- Parameters:
memory- The amount of memory allocated to the kubectl provider's lambda function. This parameter is required.- Returns:
this
-
privateSubnets
@Stability(Stable) public KubectlProvider.Builder privateSubnets(List<? extends ISubnet> privateSubnets) Subnets to host thekubectlcompute resources.If not specified, the k8s endpoint is expected to be accessible publicly.
Default: - the k8s is accessible publicly
- Parameters:
privateSubnets- Subnets to host thekubectlcompute resources. This parameter is required.- Returns:
this
-
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
Default: RemovalPolicy.DESTROY
- Parameters:
removalPolicy- The removal policy applied to the custom resource that provides kubectl. This parameter is required.- Returns:
this
-
role
An IAM role that can perform kubectl operations against this cluster.The role should be mapped to the
system:mastersKubernetes RBAC role.This role is directly passed to the lambda handler that sends Kube Ctl commands to the cluster.
Default: - if not specified, the default role created by a lambda function will be used.
- Parameters:
role- An IAM role that can perform kubectl operations against this cluster. This parameter is required.- Returns:
this
-
securityGroup
A security group to use forkubectlexecution.Default: - If not specified, the k8s endpoint is expected to be accessible publicly.
- Parameters:
securityGroup- A security group to use forkubectlexecution. This parameter is required.- Returns:
this
-
cluster
The cluster to control.- Parameters:
cluster- The cluster to control. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<KubectlProvider>- Returns:
- a newly built instance of
KubectlProvider.
-