Class: AWSCDK::EKS::FargateClusterProps

Inherits:
ClusterOptions
  • Object
show all
Defined in:
eks/fargate_cluster_props.rb

Overview

Configuration props for EKS Fargate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version:, cluster_name: nil, output_cluster_name: nil, output_config_command: nil, role: nil, security_group: nil, vpc: nil, vpc_subnets: nil, kubectl_layer:, alb_controller: nil, authentication_mode: nil, awscli_layer: nil, cluster_handler_environment: nil, cluster_handler_security_group: nil, cluster_logging: nil, core_dns_compute_type: nil, deletion_protection: nil, endpoint_access: nil, ip_family: nil, kubectl_environment: nil, kubectl_memory: nil, masters_role: nil, on_event_layer: nil, output_masters_role_arn: nil, place_cluster_handler_in_vpc: nil, prune: nil, remote_node_networks: nil, remote_pod_networks: nil, removal_policy: nil, secrets_encryption_key: nil, service_ipv4_cidr: nil, default_profile: nil) ⇒ FargateClusterProps

Returns a new instance of FargateClusterProps.

Parameters:

  • version (AWSCDK::EKS::KubernetesVersion)

    The Kubernetes version to run in the cluster.

  • cluster_name (String, nil) (defaults to: nil)

    Name for the cluster.

  • output_cluster_name (Boolean, nil) (defaults to: nil)

    Determines whether a CloudFormation output with the name of the cluster will be synthesized.

  • output_config_command (Boolean, nil) (defaults to: nil)

    Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

  • security_group (AWSCDK::EC2::ISecurityGroup, nil) (defaults to: nil)

    Security Group to use for Control Plane ENIs.

  • vpc (AWSCDK::EC2::IVPC, nil) (defaults to: nil)

    The VPC in which to create the Cluster.

  • vpc_subnets (Array<AWSCDK::EC2::SubnetSelection>, nil) (defaults to: nil)

    Where to place EKS Control Plane ENIs.

  • kubectl_layer (AWSCDK::Lambda::ILayerVersion)

    An AWS Lambda Layer which includes kubectl and Helm.

  • alb_controller (AWSCDK::EKS::ALBControllerOptions, nil) (defaults to: nil)

    Install the AWS Load Balancer Controller onto the cluster.

  • authentication_mode (AWSCDK::EKS::AuthenticationMode, nil) (defaults to: nil)

    The desired authentication mode for the cluster.

  • awscli_layer (AWSCDK::Lambda::ILayerVersion, nil) (defaults to: nil)

    An AWS Lambda layer that contains the aws CLI.

  • cluster_handler_environment (Hash{String => String}, nil) (defaults to: nil)

    Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.

  • cluster_handler_security_group (AWSCDK::EC2::ISecurityGroup, nil) (defaults to: nil)

    A security group to associate with the Cluster Handler's Lambdas.

  • cluster_logging (Array<AWSCDK::EKS::ClusterLoggingTypes>, nil) (defaults to: nil)

    The cluster log types which you want to enable.

  • core_dns_compute_type (AWSCDK::EKS::CoreDNSComputeType, nil) (defaults to: nil)

    Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.

  • deletion_protection (Boolean, nil) (defaults to: nil)

    The current deletion protection setting for the cluster.

  • endpoint_access (AWSCDK::EKS::EndpointAccess, nil) (defaults to: nil)

    Configure access to the Kubernetes API server endpoint..

  • ip_family (AWSCDK::EKS::IPFamily, nil) (defaults to: nil)

    Specify which IP family is used to assign Kubernetes pod and service IP addresses.

  • kubectl_environment (Hash{String => String}, nil) (defaults to: nil)

    Environment variables for the kubectl execution.

  • kubectl_memory (AWSCDK::Size, nil) (defaults to: nil)

    Amount of memory to allocate to the provider's lambda function.

  • masters_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    An IAM role that will be added to the system:masters Kubernetes RBAC group.

  • on_event_layer (AWSCDK::Lambda::ILayerVersion, nil) (defaults to: nil)

    An AWS Lambda Layer which includes the NPM dependency proxy-agent.

  • output_masters_role_arn (Boolean, nil) (defaults to: nil)

    Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole is specified).

  • place_cluster_handler_in_vpc (Boolean, nil) (defaults to: nil)

    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.

  • prune (Boolean, nil) (defaults to: nil)

    Indicates whether Kubernetes resources added through addManifest() can be automatically pruned.

  • remote_node_networks (Array<AWSCDK::EKS::RemoteNodeNetwork>, nil) (defaults to: nil)

    IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.

  • remote_pod_networks (Array<AWSCDK::EKS::RemotePodNetwork>, nil) (defaults to: nil)

    IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy applied to all CloudFormation resources created by this construct when they are no longer managed by CloudFormation.

  • secrets_encryption_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    KMS secret for envelope encryption for Kubernetes secrets.

  • service_ipv4_cidr (String, nil) (defaults to: nil)

    The CIDR block to assign Kubernetes service IP addresses from.

  • default_profile (AWSCDK::EKS::FargateProfileOptions, nil) (defaults to: nil)

    Fargate Profile to create along with the cluster.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'eks/fargate_cluster_props.rb', line 39

def initialize(version:, cluster_name: nil, output_cluster_name: nil, output_config_command: nil, role: nil, security_group: nil, vpc: nil, vpc_subnets: nil, kubectl_layer:, alb_controller: nil, authentication_mode: nil, awscli_layer: nil, cluster_handler_environment: nil, cluster_handler_security_group: nil, cluster_logging: nil, core_dns_compute_type: nil, deletion_protection: nil, endpoint_access: nil, ip_family: nil, kubectl_environment: nil, kubectl_memory: nil, masters_role: nil, on_event_layer: nil, output_masters_role_arn: nil, place_cluster_handler_in_vpc: nil, prune: nil, remote_node_networks: nil, remote_pod_networks: nil, removal_policy: nil, secrets_encryption_key: nil, service_ipv4_cidr: nil, default_profile: nil)
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkt1YmVybmV0ZXNWZXJzaW9uIn0=")), "version")
  @cluster_name = cluster_name
  Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") unless @cluster_name.nil?
  @output_cluster_name = output_cluster_name
  Jsii::Type.check_type(@output_cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "outputClusterName") unless @output_cluster_name.nil?
  @output_config_command = output_config_command
  Jsii::Type.check_type(@output_config_command, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "outputConfigCommand") unless @output_config_command.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @security_group = security_group
  Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil?
  @vpc_subnets = vpc_subnets.is_a?(Array) ? vpc_subnets.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : vpc_subnets
  Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuU3VibmV0U2VsZWN0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "vpcSubnets") unless @vpc_subnets.nil?
  @kubectl_layer = kubectl_layer
  Jsii::Type.check_type(@kubectl_layer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklMYXllclZlcnNpb24ifQ==")), "kubectlLayer")
  @alb_controller = alb_controller.is_a?(Hash) ? ::AWSCDK::EKS::ALBControllerOptions.new(**alb_controller.transform_keys(&:to_sym)) : alb_controller
  Jsii::Type.check_type(@alb_controller, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkFsYkNvbnRyb2xsZXJPcHRpb25zIn0=")), "albController") unless @alb_controller.nil?
  @authentication_mode = authentication_mode
  Jsii::Type.check_type(@authentication_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkF1dGhlbnRpY2F0aW9uTW9kZSJ9")), "authenticationMode") unless @authentication_mode.nil?
  @awscli_layer = awscli_layer
  Jsii::Type.check_type(@awscli_layer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklMYXllclZlcnNpb24ifQ==")), "awscliLayer") unless @awscli_layer.nil?
  @cluster_handler_environment = cluster_handler_environment
  Jsii::Type.check_type(@cluster_handler_environment, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "clusterHandlerEnvironment") unless @cluster_handler_environment.nil?
  @cluster_handler_security_group = cluster_handler_security_group
  Jsii::Type.check_type(@cluster_handler_security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "clusterHandlerSecurityGroup") unless @cluster_handler_security_group.nil?
  @cluster_logging = cluster_logging
  Jsii::Type.check_type(@cluster_logging, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2x1c3RlckxvZ2dpbmdUeXBlcyJ9LCJraW5kIjoiYXJyYXkifX0=")), "clusterLogging") unless @cluster_logging.nil?
  @core_dns_compute_type = core_dns_compute_type
  Jsii::Type.check_type(@core_dns_compute_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkNvcmVEbnNDb21wdXRlVHlwZSJ9")), "coreDnsComputeType") unless @core_dns_compute_type.nil?
  @deletion_protection = deletion_protection
  Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deletionProtection") unless @deletion_protection.nil?
  @endpoint_access = endpoint_access
  Jsii::Type.check_type(@endpoint_access, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkVuZHBvaW50QWNjZXNzIn0=")), "endpointAccess") unless @endpoint_access.nil?
  @ip_family = ip_family
  Jsii::Type.check_type(@ip_family, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLklwRmFtaWx5In0=")), "ipFamily") unless @ip_family.nil?
  @kubectl_environment = kubectl_environment
  Jsii::Type.check_type(@kubectl_environment, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "kubectlEnvironment") unless @kubectl_environment.nil?
  @kubectl_memory = kubectl_memory
  Jsii::Type.check_type(@kubectl_memory, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "kubectlMemory") unless @kubectl_memory.nil?
  @masters_role = masters_role
  Jsii::Type.check_type(@masters_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "mastersRole") unless @masters_role.nil?
  @on_event_layer = on_event_layer
  Jsii::Type.check_type(@on_event_layer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklMYXllclZlcnNpb24ifQ==")), "onEventLayer") unless @on_event_layer.nil?
  @output_masters_role_arn = output_masters_role_arn
  Jsii::Type.check_type(@output_masters_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "outputMastersRoleArn") unless @output_masters_role_arn.nil?
  @place_cluster_handler_in_vpc = place_cluster_handler_in_vpc
  Jsii::Type.check_type(@place_cluster_handler_in_vpc, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "placeClusterHandlerInVpc") unless @place_cluster_handler_in_vpc.nil?
  @prune = prune
  Jsii::Type.check_type(@prune, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "prune") unless @prune.nil?
  @remote_node_networks = remote_node_networks.is_a?(Array) ? remote_node_networks.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EKS::RemoteNodeNetwork.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : remote_node_networks
  Jsii::Type.check_type(@remote_node_networks, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuUmVtb3RlTm9kZU5ldHdvcmsifSwia2luZCI6ImFycmF5In19")), "remoteNodeNetworks") unless @remote_node_networks.nil?
  @remote_pod_networks = remote_pod_networks.is_a?(Array) ? remote_pod_networks.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EKS::RemotePodNetwork.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : remote_pod_networks
  Jsii::Type.check_type(@remote_pod_networks, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuUmVtb3RlUG9kTmV0d29yayJ9LCJraW5kIjoiYXJyYXkifX0=")), "remotePodNetworks") unless @remote_pod_networks.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @secrets_encryption_key = secrets_encryption_key
  Jsii::Type.check_type(@secrets_encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "secretsEncryptionKey") unless @secrets_encryption_key.nil?
  @service_ipv4_cidr = service_ipv4_cidr
  Jsii::Type.check_type(@service_ipv4_cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceIpv4Cidr") unless @service_ipv4_cidr.nil?
  @default_profile = default_profile.is_a?(Hash) ? ::AWSCDK::EKS::FargateProfileOptions.new(**default_profile.transform_keys(&:to_sym)) : default_profile
  Jsii::Type.check_type(@default_profile, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkZhcmdhdGVQcm9maWxlT3B0aW9ucyJ9")), "defaultProfile") unless @default_profile.nil?
end

Instance Attribute Details

#alb_controllerAWSCDK::EKS::ALBControllerOptions? (readonly)

Note:

Default: - The controller is not installed.

Install the AWS Load Balancer Controller onto the cluster.



176
177
178
# File 'eks/fargate_cluster_props.rb', line 176

def alb_controller
  @alb_controller
end

#authentication_modeAWSCDK::EKS::AuthenticationMode? (readonly)

Note:

Default: AuthenticationMode.CONFIG_MAP

The desired authentication mode for the cluster.



181
182
183
# File 'eks/fargate_cluster_props.rb', line 181

def authentication_mode
  @authentication_mode
end

#awscli_layerAWSCDK::Lambda::ILayerVersion? (readonly)

Note:

Default: - a default layer with the AWS CLI 1.x

An AWS Lambda layer that contains the aws CLI.

The handler expects the layer to include the following executables:

/opt/awscli/aws


192
193
194
# File 'eks/fargate_cluster_props.rb', line 192

def awscli_layer
  @awscli_layer
end

#cluster_handler_environmentHash{String => String}? (readonly)

Note:

Default: - No environment variables.

Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.

Returns:

  • (Hash{String => String}, nil)


197
198
199
# File 'eks/fargate_cluster_props.rb', line 197

def cluster_handler_environment
  @cluster_handler_environment
end

#cluster_handler_security_groupAWSCDK::EC2::ISecurityGroup? (readonly)

Note:

Default: - No security group.

A security group to associate with the Cluster Handler's Lambdas.

The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.

Requires place_cluster_handler_in_vpc to be set to true.

Returns:



206
207
208
# File 'eks/fargate_cluster_props.rb', line 206

def cluster_handler_security_group
  @cluster_handler_security_group
end

#cluster_loggingArray<AWSCDK::EKS::ClusterLoggingTypes>? (readonly)

Note:

Default: - none

The cluster log types which you want to enable.

Returns:



211
212
213
# File 'eks/fargate_cluster_props.rb', line 211

def cluster_logging
  @cluster_logging
end

#cluster_nameString? (readonly)

Note:

Default: - Automatically generated name

Name for the cluster.

Returns:

  • (String, nil)


114
115
116
# File 'eks/fargate_cluster_props.rb', line 114

def cluster_name
  @cluster_name
end

#core_dns_compute_typeAWSCDK::EKS::CoreDNSComputeType? (readonly)

Note:

Default: CoreDnsComputeType.EC2 (for FargateCluster the default is FARGATE)

Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.



216
217
218
# File 'eks/fargate_cluster_props.rb', line 216

def core_dns_compute_type
  @core_dns_compute_type
end

#default_profileAWSCDK::EKS::FargateProfileOptions? (readonly)

Note:

Default: - A profile called "default" with 'default' and 'kube-system' selectors will be created if this is left undefined.

Fargate Profile to create along with the cluster.



336
337
338
# File 'eks/fargate_cluster_props.rb', line 336

def default_profile
  @default_profile
end

#deletion_protectionBoolean? (readonly)

Note:

Default: - deletion protection is disabled

The current deletion protection setting for the cluster.

When true, deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When false, the cluster can be deleted normally. This setting only applies to clusters in an active state.



225
226
227
# File 'eks/fargate_cluster_props.rb', line 225

def deletion_protection
  @deletion_protection
end

#endpoint_accessAWSCDK::EKS::EndpointAccess? (readonly)

Note:

Default: EndpointAccess.PUBLIC_AND_PRIVATE

Configure access to the Kubernetes API server endpoint..



231
232
233
# File 'eks/fargate_cluster_props.rb', line 231

def endpoint_access
  @endpoint_access
end

#ip_familyAWSCDK::EKS::IPFamily? (readonly)

Note:

Default: - IpFamily.IP_V4

Specify which IP family is used to assign Kubernetes pod and service IP addresses.



237
238
239
# File 'eks/fargate_cluster_props.rb', line 237

def ip_family
  @ip_family
end

#kubectl_environmentHash{String => String}? (readonly)

Note:

Default: - No environment variables.

Environment variables for the kubectl execution.

Only relevant for kubectl enabled clusters.

Returns:

  • (Hash{String => String}, nil)


244
245
246
# File 'eks/fargate_cluster_props.rb', line 244

def kubectl_environment
  @kubectl_environment
end

#kubectl_layerAWSCDK::Lambda::ILayerVersion (readonly)

An AWS Lambda Layer which includes kubectl and Helm.

This layer is used by the kubectl handler to apply manifests and install helm charts. You must pick an appropriate releases of one of the @aws-cdk/layer-kubectl-vXX packages, that works with the version of Kubernetes you have chosen.

The handler expects the layer to include the following executables:

/opt/helm/helm
/opt/kubectl/kubectl


170
171
172
# File 'eks/fargate_cluster_props.rb', line 170

def kubectl_layer
  @kubectl_layer
end

#kubectl_memoryAWSCDK::Size? (readonly)

Note:

Default: Size.gibibytes(1)

Amount of memory to allocate to the provider's lambda function.

Returns:



249
250
251
# File 'eks/fargate_cluster_props.rb', line 249

def kubectl_memory
  @kubectl_memory
end

#masters_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - no masters role.

An IAM role that will be added to the system:masters Kubernetes RBAC group.



255
256
257
# File 'eks/fargate_cluster_props.rb', line 255

def masters_role
  @masters_role
end

#on_event_layerAWSCDK::Lambda::ILayerVersion? (readonly)

Note:

Default: - a layer bundled with this module.

An AWS Lambda Layer which includes the NPM dependency proxy-agent.

This layer is used by the onEvent handler to route AWS SDK requests through a proxy.

By default, the provider will use the layer included in the "aws-lambda-layer-node-proxy-agent" SAR application which is available in all commercial regions.

To deploy the layer locally define it in your app as follows:

# Example automatically generated from non-compiling source. May contain errors.
layer = Lambda::LayerVersion.new(self, "proxy-agent-layer", {
    code: Lambda::Code.from_asset("#{__dirname}/layer.zip"),
    compatible_runtimes: [Lambda::Runtime::NODEJS_LATEST],
})


277
278
279
# File 'eks/fargate_cluster_props.rb', line 277

def on_event_layer
  @on_event_layer
end

#output_cluster_nameBoolean? (readonly)

Note:

Default: false

Determines whether a CloudFormation output with the name of the cluster will be synthesized.

Returns:

  • (Boolean, nil)


119
120
121
# File 'eks/fargate_cluster_props.rb', line 119

def output_cluster_name
  @output_cluster_name
end

#output_config_commandBoolean? (readonly)

Note:

Default: true

Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized.

This command will include the cluster name and the ARN of the masters IAM role.

Note: If mastersRole is not specified, this property will be ignored and no config command will be emitted.



130
131
132
# File 'eks/fargate_cluster_props.rb', line 130

def output_config_command
  @output_config_command
end

#output_masters_role_arnBoolean? (readonly)

Note:

Default: false

Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole is specified).

Returns:

  • (Boolean, nil)


282
283
284
# File 'eks/fargate_cluster_props.rb', line 282

def output_masters_role_arn
  @output_masters_role_arn
end

#place_cluster_handler_in_vpcBoolean? (readonly)

Note:

Default: false

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.

Returns:

  • (Boolean, nil)


287
288
289
# File 'eks/fargate_cluster_props.rb', line 287

def place_cluster_handler_in_vpc
  @place_cluster_handler_in_vpc
end

#pruneBoolean? (readonly)

Note:

Default: true

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.

Returns:

  • (Boolean, nil)


296
297
298
# File 'eks/fargate_cluster_props.rb', line 296

def prune
  @prune
end

#remote_node_networksArray<AWSCDK::EKS::RemoteNodeNetwork>? (readonly)

Note:

Default: - none

IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.

Returns:



301
302
303
# File 'eks/fargate_cluster_props.rb', line 301

def remote_node_networks
  @remote_node_networks
end

#remote_pod_networksArray<AWSCDK::EKS::RemotePodNetwork>? (readonly)

Note:

Default: - none

IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.

Returns:



306
307
308
# File 'eks/fargate_cluster_props.rb', line 306

def remote_pod_networks
  @remote_pod_networks
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: - Resources will be deleted.

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:



320
321
322
# File 'eks/fargate_cluster_props.rb', line 320

def removal_policy
  @removal_policy
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - A role is automatically created for you

Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

Returns:



135
136
137
# File 'eks/fargate_cluster_props.rb', line 135

def role
  @role
end

#secrets_encryption_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - By default, Kubernetes stores all secret object data within etcd and all etcd volumes used by Amazon EKS are encrypted at the disk-level using AWS-Managed encryption keys.

KMS secret for envelope encryption for Kubernetes secrets.



325
326
327
# File 'eks/fargate_cluster_props.rb', line 325

def secrets_encryption_key
  @secrets_encryption_key
end

#security_groupAWSCDK::EC2::ISecurityGroup? (readonly)

Note:

Default: - A security group is automatically created

Security Group to use for Control Plane ENIs.

Returns:



140
141
142
# File 'eks/fargate_cluster_props.rb', line 140

def security_group
  @security_group
end

#service_ipv4_cidrString? (readonly)

Note:

Default: - Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks

The CIDR block to assign Kubernetes service IP addresses from.



331
332
333
# File 'eks/fargate_cluster_props.rb', line 331

def service_ipv4_cidr
  @service_ipv4_cidr
end

#versionAWSCDK::EKS::KubernetesVersion (readonly)

The Kubernetes version to run in the cluster.



109
110
111
# File 'eks/fargate_cluster_props.rb', line 109

def version
  @version
end

#vpcAWSCDK::EC2::IVPC? (readonly)

Note:

Default: - a VPC with default configuration will be created and can be accessed through cluster.vpc.

The VPC in which to create the Cluster.

Returns:



145
146
147
# File 'eks/fargate_cluster_props.rb', line 145

def vpc
  @vpc
end

#vpc_subnetsArray<AWSCDK::EC2::SubnetSelection>? (readonly)

Note:

Default: - All public and private subnets

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:



154
155
156
# File 'eks/fargate_cluster_props.rb', line 154

def vpc_subnets
  @vpc_subnets
end

Class Method Details

.jsii_propertiesObject



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'eks/fargate_cluster_props.rb', line 338

def self.jsii_properties
  {
    :version => "version",
    :cluster_name => "clusterName",
    :output_cluster_name => "outputClusterName",
    :output_config_command => "outputConfigCommand",
    :role => "role",
    :security_group => "securityGroup",
    :vpc => "vpc",
    :vpc_subnets => "vpcSubnets",
    :kubectl_layer => "kubectlLayer",
    :alb_controller => "albController",
    :authentication_mode => "authenticationMode",
    :awscli_layer => "awscliLayer",
    :cluster_handler_environment => "clusterHandlerEnvironment",
    :cluster_handler_security_group => "clusterHandlerSecurityGroup",
    :cluster_logging => "clusterLogging",
    :core_dns_compute_type => "coreDnsComputeType",
    :deletion_protection => "deletionProtection",
    :endpoint_access => "endpointAccess",
    :ip_family => "ipFamily",
    :kubectl_environment => "kubectlEnvironment",
    :kubectl_memory => "kubectlMemory",
    :masters_role => "mastersRole",
    :on_event_layer => "onEventLayer",
    :output_masters_role_arn => "outputMastersRoleArn",
    :place_cluster_handler_in_vpc => "placeClusterHandlerInVpc",
    :prune => "prune",
    :remote_node_networks => "remoteNodeNetworks",
    :remote_pod_networks => "remotePodNetworks",
    :removal_policy => "removalPolicy",
    :secrets_encryption_key => "secretsEncryptionKey",
    :service_ipv4_cidr => "serviceIpv4Cidr",
    :default_profile => "defaultProfile",
  }
end

Instance Method Details

#to_jsiiObject



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'eks/fargate_cluster_props.rb', line 375

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "version" => @version,
    "clusterName" => @cluster_name,
    "outputClusterName" => @output_cluster_name,
    "outputConfigCommand" => @output_config_command,
    "role" => @role,
    "securityGroup" => @security_group,
    "vpc" => @vpc,
    "vpcSubnets" => @vpc_subnets,
    "kubectlLayer" => @kubectl_layer,
    "albController" => @alb_controller,
    "authenticationMode" => @authentication_mode,
    "awscliLayer" => @awscli_layer,
    "clusterHandlerEnvironment" => @cluster_handler_environment,
    "clusterHandlerSecurityGroup" => @cluster_handler_security_group,
    "clusterLogging" => @cluster_logging,
    "coreDnsComputeType" => @core_dns_compute_type,
    "deletionProtection" => @deletion_protection,
    "endpointAccess" => @endpoint_access,
    "ipFamily" => @ip_family,
    "kubectlEnvironment" => @kubectl_environment,
    "kubectlMemory" => @kubectl_memory,
    "mastersRole" => @masters_role,
    "onEventLayer" => @on_event_layer,
    "outputMastersRoleArn" => @output_masters_role_arn,
    "placeClusterHandlerInVpc" => @place_cluster_handler_in_vpc,
    "prune" => @prune,
    "remoteNodeNetworks" => @remote_node_networks,
    "remotePodNetworks" => @remote_pod_networks,
    "removalPolicy" => @removal_policy,
    "secretsEncryptionKey" => @secrets_encryption_key,
    "serviceIpv4Cidr" => @service_ipv4_cidr,
    "defaultProfile" => @default_profile,
  })
  result.compact
end