Class FargateClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.eks.v2.alpha.FargateClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FargateClusterProps>
- Enclosing interface:
FargateClusterProps
@Stability(Experimental)
public static final class FargateClusterProps.Builder
extends Object
implements software.amazon.jsii.Builder<FargateClusterProps>
A builder for
FargateClusterProps
-
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()
defaultProfile
(FargateProfileOptions defaultProfile) Sets the value ofFargateClusterProps.getDefaultProfile()
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()
Sets the value ofClusterCommonOptions.getRole()
secretsEncryptionKey
(IKey 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
-
defaultProfile
@Stability(Experimental) public FargateClusterProps.Builder defaultProfile(FargateProfileOptions defaultProfile) Sets the value ofFargateClusterProps.getDefaultProfile()
- Parameters:
defaultProfile
- Fargate Profile to create along with the cluster.- Returns:
this
-
version
Sets the value ofClusterCommonOptions.getVersion()
- Parameters:
version
- The Kubernetes version to run in the cluster. This parameter is required.- Returns:
this
-
albController
@Stability(Experimental) public FargateClusterProps.Builder albController(AlbControllerOptions albController) Sets the value ofClusterCommonOptions.getAlbController()
- Parameters:
albController
- Install the AWS Load Balancer Controller onto the cluster.- Returns:
this
-
clusterLogging
@Stability(Experimental) public FargateClusterProps.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(Experimental) public FargateClusterProps.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(Experimental) public FargateClusterProps.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(Experimental) public FargateClusterProps.Builder kubectlProviderOptions(KubectlProviderOptions kubectlProviderOptions) Sets the value ofClusterCommonOptions.getKubectlProviderOptions()
- Parameters:
kubectlProviderOptions
- Options for creating the kubectl provider - a lambda function that executeskubectl
andhelm
against the cluster. If defined,kubectlLayer
is a required property.If not defined, kubectl provider will not be created by default.
- Returns:
this
-
mastersRole
Sets the value ofClusterCommonOptions.getMastersRole()
- Parameters:
mastersRole
- An IAM role that will be added to thesystem:masters
Kubernetes 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 apply
operation with the--prune
switch.- 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(Experimental) public FargateClusterProps.Builder secretsEncryptionKey(IKey secretsEncryptionKey) Sets the value ofClusterCommonOptions.getSecretsEncryptionKey()
- Parameters:
secretsEncryptionKey
- KMS secret for envelope encryption for Kubernetes secrets.- Returns:
this
-
securityGroup
@Stability(Experimental) public FargateClusterProps.Builder securityGroup(ISecurityGroup 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(Experimental) public FargateClusterProps.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:
build
in interfacesoftware.amazon.jsii.Builder<FargateClusterProps>
- Returns:
- a new instance of
FargateClusterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-