Class: AWSCDK::EKS::ClusterProps
- Inherits:
-
ClusterOptions
- Object
- ClusterOptions
- AWSCDK::EKS::ClusterProps
- Defined in:
- eks/cluster_props.rb
Overview
Common configuration props for EKS clusters.
Instance Attribute Summary collapse
-
#alb_controller ⇒ AWSCDK::EKS::ALBControllerOptions?
readonly
Install the AWS Load Balancer Controller onto the cluster.
-
#authentication_mode ⇒ AWSCDK::EKS::AuthenticationMode?
readonly
The desired authentication mode for the cluster.
-
#awscli_layer ⇒ AWSCDK::Lambda::ILayerVersion?
readonly
An AWS Lambda layer that contains the
awsCLI. -
#bootstrap_cluster_creator_admin_permissions ⇒ Boolean?
readonly
Whether or not IAM principal of the cluster creator was set as a cluster admin access entry during cluster creation time.
-
#bootstrap_self_managed_addons ⇒ Boolean?
readonly
If you set this value to False when creating a cluster, the default networking add-ons will not be installed.
-
#cluster_handler_environment ⇒ Hash{String => String}?
readonly
Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.
-
#cluster_handler_security_group ⇒ AWSCDK::EC2::ISecurityGroup?
readonly
A security group to associate with the Cluster Handler's Lambdas.
-
#cluster_logging ⇒ Array<AWSCDK::EKS::ClusterLoggingTypes>?
readonly
The cluster log types which you want to enable.
-
#cluster_name ⇒ String?
readonly
Name for the cluster.
-
#core_dns_compute_type ⇒ AWSCDK::EKS::CoreDNSComputeType?
readonly
Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.
-
#default_capacity ⇒ Numeric?
readonly
Number of instances to allocate as an initial capacity for this cluster.
-
#default_capacity_instance ⇒ AWSCDK::EC2::InstanceType?
readonly
The instance type to use for the default capacity.
-
#default_capacity_type ⇒ AWSCDK::EKS::DefaultCapacityType?
readonly
The default capacity type for the cluster.
-
#deletion_protection ⇒ Boolean?
readonly
The current deletion protection setting for the cluster.
-
#endpoint_access ⇒ AWSCDK::EKS::EndpointAccess?
readonly
Configure access to the Kubernetes API server endpoint..
-
#ip_family ⇒ AWSCDK::EKS::IPFamily?
readonly
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
-
#kubectl_environment ⇒ Hash{String => String}?
readonly
Environment variables for the kubectl execution.
-
#kubectl_lambda_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM role to pass to the Kubectl Lambda Handler.
-
#kubectl_layer ⇒ AWSCDK::Lambda::ILayerVersion
readonly
An AWS Lambda Layer which includes
kubectland Helm. -
#kubectl_memory ⇒ AWSCDK::Size?
readonly
Amount of memory to allocate to the provider's lambda function.
-
#masters_role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role that will be added to the
system:mastersKubernetes RBAC group. -
#on_event_layer ⇒ AWSCDK::Lambda::ILayerVersion?
readonly
An AWS Lambda Layer which includes the NPM dependency
proxy-agent. -
#output_cluster_name ⇒ Boolean?
readonly
Determines whether a CloudFormation output with the name of the cluster will be synthesized.
-
#output_config_command ⇒ Boolean?
readonly
Determines whether a CloudFormation output with the
aws eks update-kubeconfigcommand will be synthesized. -
#output_masters_role_arn ⇒ Boolean?
readonly
Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if
mastersRoleis specified). -
#place_cluster_handler_in_vpc ⇒ Boolean?
readonly
If set to true, the cluster handler functions will be placed in the private subnets of the cluster vpc, subject to the
vpcSubnetsselection strategy. -
#prune ⇒ Boolean?
readonly
Indicates whether Kubernetes resources added through
addManifest()can be automatically pruned. -
#remote_node_networks ⇒ Array<AWSCDK::EKS::RemoteNodeNetwork>?
readonly
IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.
-
#remote_pod_networks ⇒ Array<AWSCDK::EKS::RemotePodNetwork>?
readonly
IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy applied to all CloudFormation resources created by this construct when they are no longer managed by CloudFormation.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
-
#secrets_encryption_key ⇒ AWSCDK::Interfaces::AWSKMS::IKeyRef?
readonly
KMS secret for envelope encryption for Kubernetes secrets.
-
#security_group ⇒ AWSCDK::EC2::ISecurityGroup?
readonly
Security Group to use for Control Plane ENIs.
-
#service_ipv4_cidr ⇒ String?
readonly
The CIDR block to assign Kubernetes service IP addresses from.
-
#tags ⇒ Hash{String => String}?
readonly
The tags assigned to the EKS cluster.
-
#version ⇒ AWSCDK::EKS::KubernetesVersion
readonly
The Kubernetes version to run in the cluster.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC in which to create the Cluster.
-
#vpc_subnets ⇒ Array<AWSCDK::EC2::SubnetSelection>?
readonly
Where to place EKS Control Plane ENIs.
Class Method Summary collapse
Instance Method Summary collapse
-
#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, bootstrap_cluster_creator_admin_permissions: nil, bootstrap_self_managed_addons: nil, default_capacity: nil, default_capacity_instance: nil, default_capacity_type: nil, kubectl_lambda_role: nil, tags: nil) ⇒ ClusterProps
constructor
A new instance of ClusterProps.
- #to_jsii ⇒ Object
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, bootstrap_cluster_creator_admin_permissions: nil, bootstrap_self_managed_addons: nil, default_capacity: nil, default_capacity_instance: nil, default_capacity_type: nil, kubectl_lambda_role: nil, tags: nil) ⇒ ClusterProps
Returns a new instance of ClusterProps.
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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'eks/cluster_props.rb', line 45 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, bootstrap_cluster_creator_admin_permissions: nil, bootstrap_self_managed_addons: nil, default_capacity: nil, default_capacity_instance: nil, default_capacity_type: nil, kubectl_lambda_role: nil, tags: 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? @bootstrap_cluster_creator_admin_permissions = Jsii::Type.check_type(@bootstrap_cluster_creator_admin_permissions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "bootstrapClusterCreatorAdminPermissions") unless @bootstrap_cluster_creator_admin_permissions.nil? @bootstrap_self_managed_addons = bootstrap_self_managed_addons Jsii::Type.check_type(@bootstrap_self_managed_addons, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "bootstrapSelfManagedAddons") unless @bootstrap_self_managed_addons.nil? @default_capacity = default_capacity Jsii::Type.check_type(@default_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "defaultCapacity") unless @default_capacity.nil? @default_capacity_instance = default_capacity_instance Jsii::Type.check_type(@default_capacity_instance, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkluc3RhbmNlVHlwZSJ9")), "defaultCapacityInstance") unless @default_capacity_instance.nil? @default_capacity_type = default_capacity_type Jsii::Type.check_type(@default_capacity_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkRlZmF1bHRDYXBhY2l0eVR5cGUifQ==")), "defaultCapacityType") unless @default_capacity_type.nil? @kubectl_lambda_role = kubectl_lambda_role Jsii::Type.check_type(@kubectl_lambda_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "kubectlLambdaRole") unless @kubectl_lambda_role.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#alb_controller ⇒ AWSCDK::EKS::ALBControllerOptions? (readonly)
Default: - The controller is not installed.
Install the AWS Load Balancer Controller onto the cluster.
194 195 196 |
# File 'eks/cluster_props.rb', line 194 def alb_controller @alb_controller end |
#authentication_mode ⇒ AWSCDK::EKS::AuthenticationMode? (readonly)
Default: AuthenticationMode.CONFIG_MAP
The desired authentication mode for the cluster.
199 200 201 |
# File 'eks/cluster_props.rb', line 199 def authentication_mode @authentication_mode end |
#awscli_layer ⇒ AWSCDK::Lambda::ILayerVersion? (readonly)
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
210 211 212 |
# File 'eks/cluster_props.rb', line 210 def awscli_layer @awscli_layer end |
#bootstrap_cluster_creator_admin_permissions ⇒ Boolean? (readonly)
Default: true
Whether or not IAM principal of the cluster creator was set as a cluster admin access entry during cluster creation time.
Changing this value after the cluster has been created will result in the cluster being replaced.
356 357 358 |
# File 'eks/cluster_props.rb', line 356 def @bootstrap_cluster_creator_admin_permissions end |
#bootstrap_self_managed_addons ⇒ Boolean? (readonly)
Default: true
If you set this value to False when creating a cluster, the default networking add-ons will not be installed.
The default networking addons include vpc-cni, coredns, and kube-proxy. Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.
Changing this value after the cluster has been created will result in the cluster being replaced.
366 367 368 |
# File 'eks/cluster_props.rb', line 366 def bootstrap_self_managed_addons @bootstrap_self_managed_addons end |
#cluster_handler_environment ⇒ Hash{String => String}? (readonly)
Default: - No environment variables.
Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.
215 216 217 |
# File 'eks/cluster_props.rb', line 215 def cluster_handler_environment @cluster_handler_environment end |
#cluster_handler_security_group ⇒ AWSCDK::EC2::ISecurityGroup? (readonly)
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.
224 225 226 |
# File 'eks/cluster_props.rb', line 224 def cluster_handler_security_group @cluster_handler_security_group end |
#cluster_logging ⇒ Array<AWSCDK::EKS::ClusterLoggingTypes>? (readonly)
Default: - none
The cluster log types which you want to enable.
229 230 231 |
# File 'eks/cluster_props.rb', line 229 def cluster_logging @cluster_logging end |
#cluster_name ⇒ String? (readonly)
Default: - Automatically generated name
Name for the cluster.
132 133 134 |
# File 'eks/cluster_props.rb', line 132 def cluster_name @cluster_name end |
#core_dns_compute_type ⇒ AWSCDK::EKS::CoreDNSComputeType? (readonly)
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.
234 235 236 |
# File 'eks/cluster_props.rb', line 234 def core_dns_compute_type @core_dns_compute_type end |
#default_capacity ⇒ Numeric? (readonly)
Default: 2
Number of instances to allocate as an initial capacity for this cluster.
Instance type can be configured through default_capacity_instance_type,
which defaults to m5.large.
Use cluster.addAutoScalingGroupCapacity to add additional customized capacity. Set this
to 0 is you wish to avoid the initial capacity allocation.
377 378 379 |
# File 'eks/cluster_props.rb', line 377 def default_capacity @default_capacity end |
#default_capacity_instance ⇒ AWSCDK::EC2::InstanceType? (readonly)
Default: m5.large
The instance type to use for the default capacity.
This will only be taken
into account if default_capacity is > 0.
385 386 387 |
# File 'eks/cluster_props.rb', line 385 def default_capacity_instance @default_capacity_instance end |
#default_capacity_type ⇒ AWSCDK::EKS::DefaultCapacityType? (readonly)
Default: NODEGROUP
The default capacity type for the cluster.
390 391 392 |
# File 'eks/cluster_props.rb', line 390 def default_capacity_type @default_capacity_type end |
#deletion_protection ⇒ Boolean? (readonly)
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.
243 244 245 |
# File 'eks/cluster_props.rb', line 243 def deletion_protection @deletion_protection end |
#endpoint_access ⇒ AWSCDK::EKS::EndpointAccess? (readonly)
Default: EndpointAccess.PUBLIC_AND_PRIVATE
Configure access to the Kubernetes API server endpoint..
249 250 251 |
# File 'eks/cluster_props.rb', line 249 def endpoint_access @endpoint_access end |
#ip_family ⇒ AWSCDK::EKS::IPFamily? (readonly)
Default: - IpFamily.IP_V4
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
255 256 257 |
# File 'eks/cluster_props.rb', line 255 def ip_family @ip_family end |
#kubectl_environment ⇒ Hash{String => String}? (readonly)
Default: - No environment variables.
Environment variables for the kubectl execution.
Only relevant for kubectl enabled clusters.
262 263 264 |
# File 'eks/cluster_props.rb', line 262 def kubectl_environment @kubectl_environment end |
#kubectl_lambda_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - Default Lambda IAM Execution Role
The IAM role to pass to the Kubectl Lambda Handler.
395 396 397 |
# File 'eks/cluster_props.rb', line 395 def kubectl_lambda_role @kubectl_lambda_role end |
#kubectl_layer ⇒ AWSCDK::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
188 189 190 |
# File 'eks/cluster_props.rb', line 188 def kubectl_layer @kubectl_layer end |
#kubectl_memory ⇒ AWSCDK::Size? (readonly)
Default: Size.gibibytes(1)
Amount of memory to allocate to the provider's lambda function.
267 268 269 |
# File 'eks/cluster_props.rb', line 267 def kubectl_memory @kubectl_memory end |
#masters_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - no masters role.
An IAM role that will be added to the system:masters Kubernetes RBAC group.
273 274 275 |
# File 'eks/cluster_props.rb', line 273 def masters_role @masters_role end |
#on_event_layer ⇒ AWSCDK::Lambda::ILayerVersion? (readonly)
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],
})
295 296 297 |
# File 'eks/cluster_props.rb', line 295 def on_event_layer @on_event_layer end |
#output_cluster_name ⇒ Boolean? (readonly)
Default: false
Determines whether a CloudFormation output with the name of the cluster will be synthesized.
137 138 139 |
# File 'eks/cluster_props.rb', line 137 def output_cluster_name @output_cluster_name end |
#output_config_command ⇒ Boolean? (readonly)
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.
148 149 150 |
# File 'eks/cluster_props.rb', line 148 def output_config_command @output_config_command end |
#output_masters_role_arn ⇒ Boolean? (readonly)
Default: false
Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole is specified).
300 301 302 |
# File 'eks/cluster_props.rb', line 300 def output_masters_role_arn @output_masters_role_arn end |
#place_cluster_handler_in_vpc ⇒ Boolean? (readonly)
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.
305 306 307 |
# File 'eks/cluster_props.rb', line 305 def place_cluster_handler_in_vpc @place_cluster_handler_in_vpc end |
#prune ⇒ Boolean? (readonly)
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.
314 315 316 |
# File 'eks/cluster_props.rb', line 314 def prune @prune end |
#remote_node_networks ⇒ Array<AWSCDK::EKS::RemoteNodeNetwork>? (readonly)
Default: - none
IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.
319 320 321 |
# File 'eks/cluster_props.rb', line 319 def remote_node_networks @remote_node_networks end |
#remote_pod_networks ⇒ Array<AWSCDK::EKS::RemotePodNetwork>? (readonly)
Default: - none
IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.
324 325 326 |
# File 'eks/cluster_props.rb', line 324 def remote_pod_networks @remote_pod_networks end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
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.
338 339 340 |
# File 'eks/cluster_props.rb', line 338 def removal_policy @removal_policy end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
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.
153 154 155 |
# File 'eks/cluster_props.rb', line 153 def role @role end |
#secrets_encryption_key ⇒ AWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)
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.
343 344 345 |
# File 'eks/cluster_props.rb', line 343 def secrets_encryption_key @secrets_encryption_key end |
#security_group ⇒ AWSCDK::EC2::ISecurityGroup? (readonly)
Default: - A security group is automatically created
Security Group to use for Control Plane ENIs.
158 159 160 |
# File 'eks/cluster_props.rb', line 158 def security_group @security_group end |
#service_ipv4_cidr ⇒ String? (readonly)
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.
349 350 351 |
# File 'eks/cluster_props.rb', line 349 def service_ipv4_cidr @service_ipv4_cidr end |
#tags ⇒ Hash{String => String}? (readonly)
Default: - none
The tags assigned to the EKS cluster.
400 401 402 |
# File 'eks/cluster_props.rb', line 400 def @tags end |
#version ⇒ AWSCDK::EKS::KubernetesVersion (readonly)
The Kubernetes version to run in the cluster.
127 128 129 |
# File 'eks/cluster_props.rb', line 127 def version @version end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: - a VPC with default configuration will be created and can be accessed through cluster.vpc.
The VPC in which to create the Cluster.
163 164 165 |
# File 'eks/cluster_props.rb', line 163 def vpc @vpc end |
#vpc_subnets ⇒ Array<AWSCDK::EC2::SubnetSelection>? (readonly)
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 }]
172 173 174 |
# File 'eks/cluster_props.rb', line 172 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'eks/cluster_props.rb', line 402 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", :bootstrap_cluster_creator_admin_permissions => "bootstrapClusterCreatorAdminPermissions", :bootstrap_self_managed_addons => "bootstrapSelfManagedAddons", :default_capacity => "defaultCapacity", :default_capacity_instance => "defaultCapacityInstance", :default_capacity_type => "defaultCapacityType", :kubectl_lambda_role => "kubectlLambdaRole", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'eks/cluster_props.rb', line 445 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, "bootstrapClusterCreatorAdminPermissions" => @bootstrap_cluster_creator_admin_permissions, "bootstrapSelfManagedAddons" => @bootstrap_self_managed_addons, "defaultCapacity" => @default_capacity, "defaultCapacityInstance" => @default_capacity_instance, "defaultCapacityType" => @default_capacity_type, "kubectlLambdaRole" => @kubectl_lambda_role, "tags" => @tags, }) result.compact end |