@Stability(value=Experimental) public static final class ClusterOptions.Builder extends Object implements software.amazon.jsii.Builder<ClusterOptions>
ClusterOptions
Constructor and Description |
---|
Builder() |
@Stability(value=Experimental) public ClusterOptions.Builder clusterHandlerEnvironment(Map<String,String> clusterHandlerEnvironment)
ClusterOptions.getClusterHandlerEnvironment()
clusterHandlerEnvironment
- Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.this
@Stability(value=Experimental) public ClusterOptions.Builder coreDnsComputeType(CoreDnsComputeType coreDnsComputeType)
ClusterOptions.getCoreDnsComputeType()
coreDnsComputeType
- Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.this
@Stability(value=Experimental) public ClusterOptions.Builder endpointAccess(EndpointAccess endpointAccess)
ClusterOptions.getEndpointAccess()
endpointAccess
- Configure access to the Kubernetes API server endpoint..this
@Stability(value=Experimental) public ClusterOptions.Builder kubectlEnvironment(Map<String,String> kubectlEnvironment)
ClusterOptions.getKubectlEnvironment()
kubectlEnvironment
- Environment variables for the kubectl execution.
Only relevant for kubectl enabled clusters.this
@Stability(value=Experimental) public ClusterOptions.Builder kubectlLayer(ILayerVersion kubectlLayer)
ClusterOptions.getKubectlLayer()
kubectlLayer
- An AWS Lambda Layer which includes `kubectl`, Helm and the AWS CLI.
By default, the provider will use the layer included in the
"aws-lambda-layer-kubectl" SAR application which is available in all
commercial regions.
To deploy the layer locally, visit https://github.com/aws-samples/aws-lambda-layer-kubectl/blob/master/cdk/README.md for instructions on how to prepare the .zip file and then define it in your app as follows:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 LayerVersion layer = new LayerVersion(this, "kubectl-layer", new LayerVersionProps() .code(lambda.Code.fromAsset(String.format("%s/layer.zip", __dirname)))); Object compatibleRuntimes;
this
@Stability(value=Experimental) public ClusterOptions.Builder kubectlMemory(Size kubectlMemory)
ClusterOptions.getKubectlMemory()
kubectlMemory
- Amount of memory to allocate to the provider's lambda function.this
@Stability(value=Experimental) public ClusterOptions.Builder mastersRole(IRole mastersRole)
ClusterOptions.getMastersRole()
mastersRole
- An IAM role that will be added to the `system:masters` Kubernetes RBAC group.this
@Stability(value=Experimental) public ClusterOptions.Builder outputMastersRoleArn(Boolean outputMastersRoleArn)
ClusterOptions.getOutputMastersRoleArn()
outputMastersRoleArn
- Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if `mastersRole` is specified).this
@Stability(value=Experimental) public ClusterOptions.Builder placeClusterHandlerInVpc(Boolean placeClusterHandlerInVpc)
ClusterOptions.getPlaceClusterHandlerInVpc()
placeClusterHandlerInVpc
- If set to true, the cluster handler functions will be placed in the private subnets of the cluster vpc, subject to the `vpcSubnets` selection strategy.this
@Stability(value=Experimental) public ClusterOptions.Builder prune(Boolean prune)
ClusterOptions.getPrune()
prune
- Indicates whether Kubernetes resources added through `addManifest()` can be automatically pruned.
When this is enabled (default), prune labels will be
allocated and injected to each resource. These labels will then be used
when issuing the kubectl apply
operation with the --prune
switch.this
@Stability(value=Experimental) public ClusterOptions.Builder secretsEncryptionKey(IKey secretsEncryptionKey)
ClusterOptions.getSecretsEncryptionKey()
secretsEncryptionKey
- KMS secret for envelope encryption for Kubernetes secrets.this
@Stability(value=Experimental) public ClusterOptions.Builder version(KubernetesVersion version)
CommonClusterOptions.getVersion()
version
- The Kubernetes version to run in the cluster. This parameter is required.this
@Stability(value=Experimental) public ClusterOptions.Builder clusterName(String clusterName)
CommonClusterOptions.getClusterName()
clusterName
- Name for the cluster.this
@Stability(value=Experimental) public ClusterOptions.Builder outputClusterName(Boolean outputClusterName)
CommonClusterOptions.getOutputClusterName()
outputClusterName
- Determines whether a CloudFormation output with the name of the cluster will be synthesized.this
@Stability(value=Experimental) public ClusterOptions.Builder outputConfigCommand(Boolean outputConfigCommand)
CommonClusterOptions.getOutputConfigCommand()
outputConfigCommand
- Determines whether a CloudFormation output with the `aws eks update-kubeconfig` command will be synthesized.
This command will include
the cluster name and, if applicable, the ARN of the masters IAM role.this
@Stability(value=Experimental) public ClusterOptions.Builder role(IRole role)
CommonClusterOptions.getRole()
role
- Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.this
@Stability(value=Experimental) public ClusterOptions.Builder securityGroup(ISecurityGroup securityGroup)
CommonClusterOptions.getSecurityGroup()
securityGroup
- Security Group to use for Control Plane ENIs.this
@Stability(value=Experimental) public ClusterOptions.Builder vpc(IVpc vpc)
CommonClusterOptions.getVpc()
vpc
- The VPC in which to create the Cluster.this
@Stability(value=Experimental) public ClusterOptions.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets)
CommonClusterOptions.getVpcSubnets()
vpcSubnets
- Where to place EKS Control Plane ENIs.
If you want to create public load balancers, this must include public subnets.
For example, to only select private subnets, supply the following:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 vpcSubnets: [ { subnetType: ec2.SubnetType.Private } ]
this
@Stability(value=Experimental) public ClusterOptions build()
build
in interface software.amazon.jsii.Builder<ClusterOptions>
ClusterOptions
NullPointerException
- if any required attribute was not providedCopyright © 2021. All rights reserved.