Class ClusterCommonOptions.Builder
java.lang.Object
software.amazon.awscdk.services.eks_v2.ClusterCommonOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClusterCommonOptions>
- Enclosing interface:
ClusterCommonOptions
@Stability(Stable)
public static final class ClusterCommonOptions.Builder
extends Object
implements software.amazon.jsii.Builder<ClusterCommonOptions>
A builder for
ClusterCommonOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalbController(AlbControllerOptions albController) Sets the value ofClusterCommonOptions.getAlbController()build()Builds the configured instance.clusterLogging(List<? extends ClusterLoggingTypes> clusterLogging) Sets the value ofClusterCommonOptions.getClusterLogging()clusterName(String clusterName) Sets the value ofClusterCommonOptions.getClusterName()coreDnsComputeType(CoreDnsComputeType coreDnsComputeType) Sets the value ofClusterCommonOptions.getCoreDnsComputeType()endpointAccess(EndpointAccess endpointAccess) Sets the value ofClusterCommonOptions.getEndpointAccess()Sets the value ofClusterCommonOptions.getIpFamily()kubectlProviderOptions(KubectlProviderOptions kubectlProviderOptions) Sets the value ofClusterCommonOptions.getKubectlProviderOptions()mastersRole(IRole mastersRole) Sets the value ofClusterCommonOptions.getMastersRole()Sets the value ofClusterCommonOptions.getPrune()remoteNodeNetworks(List<? extends RemoteNodeNetwork> remoteNodeNetworks) Sets the value ofClusterCommonOptions.getRemoteNodeNetworks()remotePodNetworks(List<? extends RemotePodNetwork> remotePodNetworks) Sets the value ofClusterCommonOptions.getRemotePodNetworks()removalPolicy(RemovalPolicy removalPolicy) Sets the value ofClusterCommonOptions.getRemovalPolicy()Sets the value ofClusterCommonOptions.getRole()secretsEncryptionKey(IKeyRef secretsEncryptionKey) Sets the value ofClusterCommonOptions.getSecretsEncryptionKey()securityGroup(ISecurityGroup securityGroup) Sets the value ofClusterCommonOptions.getSecurityGroup()serviceIpv4Cidr(String serviceIpv4Cidr) Sets the value ofClusterCommonOptions.getServiceIpv4Cidr()Sets the value ofClusterCommonOptions.getTags()version(KubernetesVersion version) Sets the value ofClusterCommonOptions.getVersion()Sets the value ofClusterCommonOptions.getVpc()vpcSubnets(List<? extends SubnetSelection> vpcSubnets) Sets the value ofClusterCommonOptions.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
version
Sets the value ofClusterCommonOptions.getVersion()- Parameters:
version- The Kubernetes version to run in the cluster. This parameter is required.- Returns:
this
-
albController
@Stability(Stable) public ClusterCommonOptions.Builder albController(AlbControllerOptions albController) Sets the value ofClusterCommonOptions.getAlbController()- Parameters:
albController- Install the AWS Load Balancer Controller onto the cluster.- Returns:
this
-
clusterLogging
@Stability(Stable) public ClusterCommonOptions.Builder clusterLogging(List<? extends ClusterLoggingTypes> clusterLogging) Sets the value ofClusterCommonOptions.getClusterLogging()- Parameters:
clusterLogging- The cluster log types which you want to enable.- Returns:
this
-
clusterName
Sets the value ofClusterCommonOptions.getClusterName()- Parameters:
clusterName- Name for the cluster.- Returns:
this
-
coreDnsComputeType
@Stability(Stable) public ClusterCommonOptions.Builder coreDnsComputeType(CoreDnsComputeType coreDnsComputeType) Sets the value ofClusterCommonOptions.getCoreDnsComputeType()- Parameters:
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.- Returns:
this
-
endpointAccess
@Stability(Stable) public ClusterCommonOptions.Builder endpointAccess(EndpointAccess endpointAccess) Sets the value ofClusterCommonOptions.getEndpointAccess()- Parameters:
endpointAccess- Configure access to the Kubernetes API server endpoint..- Returns:
this
-
ipFamily
Sets the value ofClusterCommonOptions.getIpFamily()- Parameters:
ipFamily- Specify which IP family is used to assign Kubernetes pod and service IP addresses.- Returns:
this
-
kubectlProviderOptions
@Stability(Stable) public ClusterCommonOptions.Builder kubectlProviderOptions(KubectlProviderOptions kubectlProviderOptions) Sets the value ofClusterCommonOptions.getKubectlProviderOptions()- Parameters:
kubectlProviderOptions- Options for creating the kubectl provider - a lambda function that executeskubectlandhelmagainst the cluster. If defined,kubectlLayeris a required property.- Returns:
this
-
mastersRole
Sets the value ofClusterCommonOptions.getMastersRole()- Parameters:
mastersRole- An IAM role that will be added to thesystem:mastersKubernetes RBAC group.- Returns:
this
-
prune
Sets the value ofClusterCommonOptions.getPrune()- Parameters:
prune- Indicates whether Kubernetes resources added throughaddManifest()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 thekubectl applyoperation with the--pruneswitch.- Returns:
this
-
remoteNodeNetworks
@Stability(Stable) public ClusterCommonOptions.Builder remoteNodeNetworks(List<? extends RemoteNodeNetwork> remoteNodeNetworks) Sets the value ofClusterCommonOptions.getRemoteNodeNetworks()- Parameters:
remoteNodeNetworks- IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.- Returns:
this
-
remotePodNetworks
@Stability(Stable) public ClusterCommonOptions.Builder remotePodNetworks(List<? extends RemotePodNetwork> remotePodNetworks) Sets the value ofClusterCommonOptions.getRemotePodNetworks()- Parameters:
remotePodNetworks- IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.- Returns:
this
-
removalPolicy
Sets the value ofClusterCommonOptions.getRemovalPolicy()- Parameters:
removalPolicy- The removal policy applied to all CloudFormation resources created by this construct when they are no longer 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.
This affects the EKS cluster itself, associated IAM roles, node groups, security groups, VPC and any other CloudFormation resources managed by this construct.
- Returns:
this
-
role
Sets the value ofClusterCommonOptions.getRole()- Parameters:
role- Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.- Returns:
this
-
secretsEncryptionKey
@Stability(Stable) public ClusterCommonOptions.Builder secretsEncryptionKey(IKeyRef secretsEncryptionKey) Sets the value ofClusterCommonOptions.getSecretsEncryptionKey()- Parameters:
secretsEncryptionKey- KMS secret for envelope encryption for Kubernetes secrets.- Returns:
this
-
securityGroup
Sets the value ofClusterCommonOptions.getSecurityGroup()- Parameters:
securityGroup- Security Group to use for Control Plane ENIs.- Returns:
this
-
serviceIpv4Cidr
Sets the value ofClusterCommonOptions.getServiceIpv4Cidr()- Parameters:
serviceIpv4Cidr- The CIDR block to assign Kubernetes service IP addresses from.- Returns:
this
-
tags
Sets the value ofClusterCommonOptions.getTags()- Parameters:
tags- The tags assigned to the EKS cluster.- Returns:
this
-
vpc
Sets the value ofClusterCommonOptions.getVpc()- Parameters:
vpc- The VPC in which to create the Cluster.- Returns:
this
-
vpcSubnets
@Stability(Stable) public ClusterCommonOptions.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets) Sets the value ofClusterCommonOptions.getVpcSubnets()- Parameters:
vpcSubnets- Where to place EKS Control Plane ENIs. For example, to only select private subnets, supply the following:vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }]- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ClusterCommonOptions>- Returns:
- a new instance of
ClusterCommonOptions - Throws:
NullPointerException- if any required attribute was not provided
-