Class: AWSCDK::EKSv2::FargateClusterProps
- Inherits:
-
ClusterCommonOptions
- Object
- ClusterCommonOptions
- AWSCDK::EKSv2::FargateClusterProps
- Defined in:
- ek_sv2/fargate_cluster_props.rb
Overview
Configuration props for EKS Fargate.
Instance Attribute Summary collapse
-
#alb_controller ⇒ AWSCDK::EKSv2::ALBControllerOptions?
readonly
Install the AWS Load Balancer Controller onto the cluster.
-
#cluster_logging ⇒ Array<AWSCDK::EKSv2::ClusterLoggingTypes>?
readonly
The cluster log types which you want to enable.
-
#cluster_name ⇒ String?
readonly
Name for the cluster.
-
#core_dns_compute_type ⇒ AWSCDK::EKSv2::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_profile ⇒ AWSCDK::EKSv2::FargateProfileOptions?
readonly
Fargate Profile to create along with the cluster.
-
#endpoint_access ⇒ AWSCDK::EKSv2::EndpointAccess?
readonly
Configure access to the Kubernetes API server endpoint..
-
#ip_family ⇒ AWSCDK::EKSv2::IPFamily?
readonly
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
-
#kubectl_provider_options ⇒ AWSCDK::EKSv2::KubectlProviderOptions?
readonly
Options for creating the kubectl provider - a lambda function that executes
kubectlandhelmagainst the cluster. -
#masters_role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role that will be added to the
system:mastersKubernetes RBAC group. -
#prune ⇒ Boolean?
readonly
Indicates whether Kubernetes resources added through
addManifest()can be automatically pruned. -
#remote_node_networks ⇒ Array<AWSCDK::EKSv2::RemoteNodeNetwork>?
readonly
IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.
-
#remote_pod_networks ⇒ Array<AWSCDK::EKSv2::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::EKSv2::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:, alb_controller: nil, cluster_logging: nil, cluster_name: nil, core_dns_compute_type: nil, endpoint_access: nil, ip_family: nil, kubectl_provider_options: nil, masters_role: nil, prune: nil, remote_node_networks: nil, remote_pod_networks: nil, removal_policy: nil, role: nil, secrets_encryption_key: nil, security_group: nil, service_ipv4_cidr: nil, tags: nil, vpc: nil, vpc_subnets: nil, default_profile: nil) ⇒ FargateClusterProps
constructor
A new instance of FargateClusterProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(version:, alb_controller: nil, cluster_logging: nil, cluster_name: nil, core_dns_compute_type: nil, endpoint_access: nil, ip_family: nil, kubectl_provider_options: nil, masters_role: nil, prune: nil, remote_node_networks: nil, remote_pod_networks: nil, removal_policy: nil, role: nil, secrets_encryption_key: nil, security_group: nil, service_ipv4_cidr: nil, tags: nil, vpc: nil, vpc_subnets: nil, default_profile: nil) ⇒ FargateClusterProps
Returns a new instance of FargateClusterProps.
28 29 30 31 32 33 34 35 36 37 38 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 |
# File 'ek_sv2/fargate_cluster_props.rb', line 28 def initialize(version:, alb_controller: nil, cluster_logging: nil, cluster_name: nil, core_dns_compute_type: nil, endpoint_access: nil, ip_family: nil, kubectl_provider_options: nil, masters_role: nil, prune: nil, remote_node_networks: nil, remote_pod_networks: nil, removal_policy: nil, role: nil, secrets_encryption_key: nil, security_group: nil, service_ipv4_cidr: nil, tags: nil, vpc: nil, vpc_subnets: nil, default_profile: nil) @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkt1YmVybmV0ZXNWZXJzaW9uIn0=")), "version") @alb_controller = alb_controller.is_a?(Hash) ? ::AWSCDK::EKSv2::ALBControllerOptions.new(**alb_controller.transform_keys(&:to_sym)) : alb_controller Jsii::Type.check_type(@alb_controller, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkFsYkNvbnRyb2xsZXJPcHRpb25zIn0=")), "albController") unless @alb_controller.nil? @cluster_logging = cluster_logging Jsii::Type.check_type(@cluster_logging, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3NfdjIuQ2x1c3RlckxvZ2dpbmdUeXBlcyJ9LCJraW5kIjoiYXJyYXkifX0=")), "clusterLogging") unless @cluster_logging.nil? @cluster_name = cluster_name Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") unless @cluster_name.nil? @core_dns_compute_type = core_dns_compute_type Jsii::Type.check_type(@core_dns_compute_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkNvcmVEbnNDb21wdXRlVHlwZSJ9")), "coreDnsComputeType") unless @core_dns_compute_type.nil? @endpoint_access = endpoint_access Jsii::Type.check_type(@endpoint_access, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkVuZHBvaW50QWNjZXNzIn0=")), "endpointAccess") unless @endpoint_access.nil? @ip_family = ip_family Jsii::Type.check_type(@ip_family, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLklwRmFtaWx5In0=")), "ipFamily") unless @ip_family.nil? @kubectl_provider_options = .is_a?(Hash) ? ::AWSCDK::EKSv2::KubectlProviderOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@kubectl_provider_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkt1YmVjdGxQcm92aWRlck9wdGlvbnMifQ==")), "kubectlProviderOptions") unless @kubectl_provider_options.nil? @masters_role = masters_role Jsii::Type.check_type(@masters_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "mastersRole") unless @masters_role.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::EKSv2::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("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3NfdjIuUmVtb3RlTm9kZU5ldHdvcmsifSwia2luZCI6ImFycmF5In19")), "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::EKSv2::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("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3NfdjIuUmVtb3RlUG9kTmV0d29yayJ9LCJraW5kIjoiYXJyYXkifX0=")), "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? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.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? @security_group = security_group Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.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? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.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? @default_profile = default_profile.is_a?(Hash) ? ::AWSCDK::EKSv2::FargateProfileOptions.new(**default_profile.transform_keys(&:to_sym)) : default_profile Jsii::Type.check_type(@default_profile, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkZhcmdhdGVQcm9maWxlT3B0aW9ucyJ9")), "defaultProfile") unless @default_profile.nil? end |
Instance Attribute Details
#alb_controller ⇒ AWSCDK::EKSv2::ALBControllerOptions? (readonly)
Default: - The controller is not installed.
Install the AWS Load Balancer Controller onto the cluster.
82 83 84 |
# File 'ek_sv2/fargate_cluster_props.rb', line 82 def alb_controller @alb_controller end |
#cluster_logging ⇒ Array<AWSCDK::EKSv2::ClusterLoggingTypes>? (readonly)
Default: - none
The cluster log types which you want to enable.
87 88 89 |
# File 'ek_sv2/fargate_cluster_props.rb', line 87 def cluster_logging @cluster_logging end |
#cluster_name ⇒ String? (readonly)
Default: - Automatically generated name
Name for the cluster.
92 93 94 |
# File 'ek_sv2/fargate_cluster_props.rb', line 92 def cluster_name @cluster_name end |
#core_dns_compute_type ⇒ AWSCDK::EKSv2::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.
97 98 99 |
# File 'ek_sv2/fargate_cluster_props.rb', line 97 def core_dns_compute_type @core_dns_compute_type end |
#default_profile ⇒ AWSCDK::EKSv2::FargateProfileOptions? (readonly)
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.
200 201 202 |
# File 'ek_sv2/fargate_cluster_props.rb', line 200 def default_profile @default_profile end |
#endpoint_access ⇒ AWSCDK::EKSv2::EndpointAccess? (readonly)
Default: EndpointAccess.PUBLIC_AND_PRIVATE
Configure access to the Kubernetes API server endpoint..
103 104 105 |
# File 'ek_sv2/fargate_cluster_props.rb', line 103 def endpoint_access @endpoint_access end |
#ip_family ⇒ AWSCDK::EKSv2::IPFamily? (readonly)
Default: IpFamily.IP_V4
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
109 110 111 |
# File 'ek_sv2/fargate_cluster_props.rb', line 109 def ip_family @ip_family end |
#kubectl_provider_options ⇒ AWSCDK::EKSv2::KubectlProviderOptions? (readonly)
Default: - kubectl provider will not be created
Options for creating the kubectl provider - a lambda function that executes kubectl and helm against the cluster.
If defined, kubectl_layer is a required property.
116 117 118 |
# File 'ek_sv2/fargate_cluster_props.rb', line 116 def @kubectl_provider_options 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.
122 123 124 |
# File 'ek_sv2/fargate_cluster_props.rb', line 122 def masters_role @masters_role 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.
131 132 133 |
# File 'ek_sv2/fargate_cluster_props.rb', line 131 def prune @prune end |
#remote_node_networks ⇒ Array<AWSCDK::EKSv2::RemoteNodeNetwork>? (readonly)
Default: - none
IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.
136 137 138 |
# File 'ek_sv2/fargate_cluster_props.rb', line 136 def remote_node_networks @remote_node_networks end |
#remote_pod_networks ⇒ Array<AWSCDK::EKSv2::RemotePodNetwork>? (readonly)
Default: - none
IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.
141 142 143 |
# File 'ek_sv2/fargate_cluster_props.rb', line 141 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.
155 156 157 |
# File 'ek_sv2/fargate_cluster_props.rb', line 155 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.
160 161 162 |
# File 'ek_sv2/fargate_cluster_props.rb', line 160 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.
165 166 167 |
# File 'ek_sv2/fargate_cluster_props.rb', line 165 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.
170 171 172 |
# File 'ek_sv2/fargate_cluster_props.rb', line 170 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.
176 177 178 |
# File 'ek_sv2/fargate_cluster_props.rb', line 176 def service_ipv4_cidr @service_ipv4_cidr end |
#tags ⇒ Hash{String => String}? (readonly)
Default: - none
The tags assigned to the EKS cluster.
181 182 183 |
# File 'ek_sv2/fargate_cluster_props.rb', line 181 def @tags end |
#version ⇒ AWSCDK::EKSv2::KubernetesVersion (readonly)
The Kubernetes version to run in the cluster.
76 77 78 |
# File 'ek_sv2/fargate_cluster_props.rb', line 76 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.
186 187 188 |
# File 'ek_sv2/fargate_cluster_props.rb', line 186 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 }]
195 196 197 |
# File 'ek_sv2/fargate_cluster_props.rb', line 195 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'ek_sv2/fargate_cluster_props.rb', line 202 def self.jsii_properties { :version => "version", :alb_controller => "albController", :cluster_logging => "clusterLogging", :cluster_name => "clusterName", :core_dns_compute_type => "coreDnsComputeType", :endpoint_access => "endpointAccess", :ip_family => "ipFamily", :kubectl_provider_options => "kubectlProviderOptions", :masters_role => "mastersRole", :prune => "prune", :remote_node_networks => "remoteNodeNetworks", :remote_pod_networks => "remotePodNetworks", :removal_policy => "removalPolicy", :role => "role", :secrets_encryption_key => "secretsEncryptionKey", :security_group => "securityGroup", :service_ipv4_cidr => "serviceIpv4Cidr", :tags => "tags", :vpc => "vpc", :vpc_subnets => "vpcSubnets", :default_profile => "defaultProfile", } end |
Instance Method Details
#to_jsii ⇒ Object
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'ek_sv2/fargate_cluster_props.rb', line 228 def to_jsii result = {} result.merge!(super) result.merge!({ "version" => @version, "albController" => @alb_controller, "clusterLogging" => @cluster_logging, "clusterName" => @cluster_name, "coreDnsComputeType" => @core_dns_compute_type, "endpointAccess" => @endpoint_access, "ipFamily" => @ip_family, "kubectlProviderOptions" => @kubectl_provider_options, "mastersRole" => @masters_role, "prune" => @prune, "remoteNodeNetworks" => @remote_node_networks, "remotePodNetworks" => @remote_pod_networks, "removalPolicy" => @removal_policy, "role" => @role, "secretsEncryptionKey" => @secrets_encryption_key, "securityGroup" => @security_group, "serviceIpv4Cidr" => @service_ipv4_cidr, "tags" => @tags, "vpc" => @vpc, "vpcSubnets" => @vpc_subnets, "defaultProfile" => @default_profile, }) result.compact end |