Class: AWSCDK::EKSv2::ClusterAttributes
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKSv2::ClusterAttributes
- Defined in:
- ek_sv2/cluster_attributes.rb
Overview
Attributes for EKS clusters.
Instance Attribute Summary collapse
-
#cluster_certificate_authority_data ⇒ String?
readonly
The certificate-authority-data for your cluster.
-
#cluster_encryption_config_key_arn ⇒ String?
readonly
Amazon Resource Name (ARN) or alias of the customer master key (CMK).
-
#cluster_endpoint ⇒ String?
readonly
The API Server endpoint URL.
-
#cluster_name ⇒ String
readonly
The physical name of the Cluster.
-
#cluster_security_group_id ⇒ String?
readonly
The cluster security group that was created by Amazon EKS for the cluster.
-
#ip_family ⇒ AWSCDK::EKSv2::IPFamily?
readonly
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
-
#kubectl_provider ⇒ AWSCDK::EKSv2::IKubectlProvider?
readonly
KubectlProvider for issuing kubectl commands.
-
#kubectl_provider_options ⇒ AWSCDK::EKSv2::KubectlProviderOptions?
readonly
Options for creating the kubectl provider - a lambda function that executes
kubectlandhelmagainst the cluster. -
#open_id_connect_provider ⇒ AWSCDK::IAM::IOpenIdConnectProvider?
readonly
An Open ID Connect provider for this cluster that can be used to configure service accounts.
-
#prune ⇒ Boolean?
readonly
Indicates whether Kubernetes resources added through
addManifest()can be automatically pruned. -
#security_group_ids ⇒ Array<String>?
readonly
Additional security groups associated with this cluster.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC in which this Cluster was created.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cluster_name:, cluster_certificate_authority_data: nil, cluster_encryption_config_key_arn: nil, cluster_endpoint: nil, cluster_security_group_id: nil, ip_family: nil, kubectl_provider: nil, kubectl_provider_options: nil, open_id_connect_provider: nil, prune: nil, security_group_ids: nil, vpc: nil) ⇒ ClusterAttributes
constructor
A new instance of ClusterAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cluster_name:, cluster_certificate_authority_data: nil, cluster_encryption_config_key_arn: nil, cluster_endpoint: nil, cluster_security_group_id: nil, ip_family: nil, kubectl_provider: nil, kubectl_provider_options: nil, open_id_connect_provider: nil, prune: nil, security_group_ids: nil, vpc: nil) ⇒ ClusterAttributes
Returns a new instance of ClusterAttributes.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'ek_sv2/cluster_attributes.rb', line 19 def initialize(cluster_name:, cluster_certificate_authority_data: nil, cluster_encryption_config_key_arn: nil, cluster_endpoint: nil, cluster_security_group_id: nil, ip_family: nil, kubectl_provider: nil, kubectl_provider_options: nil, open_id_connect_provider: nil, prune: nil, security_group_ids: nil, vpc: nil) @cluster_name = cluster_name Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") @cluster_certificate_authority_data = Jsii::Type.check_type(@cluster_certificate_authority_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterCertificateAuthorityData") unless @cluster_certificate_authority_data.nil? @cluster_encryption_config_key_arn = cluster_encryption_config_key_arn Jsii::Type.check_type(@cluster_encryption_config_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterEncryptionConfigKeyArn") unless @cluster_encryption_config_key_arn.nil? @cluster_endpoint = cluster_endpoint Jsii::Type.check_type(@cluster_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterEndpoint") unless @cluster_endpoint.nil? @cluster_security_group_id = cluster_security_group_id Jsii::Type.check_type(@cluster_security_group_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterSecurityGroupId") unless @cluster_security_group_id.nil? @ip_family = ip_family Jsii::Type.check_type(@ip_family, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLklwRmFtaWx5In0=")), "ipFamily") unless @ip_family.nil? @kubectl_provider = kubectl_provider Jsii::Type.check_type(@kubectl_provider, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLklLdWJlY3RsUHJvdmlkZXIifQ==")), "kubectlProvider") unless @kubectl_provider.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? @open_id_connect_provider = open_id_connect_provider Jsii::Type.check_type(@open_id_connect_provider, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklPcGVuSWRDb25uZWN0UHJvdmlkZXIifQ==")), "openIdConnectProvider") unless @open_id_connect_provider.nil? @prune = prune Jsii::Type.check_type(@prune, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "prune") unless @prune.nil? @security_group_ids = security_group_ids Jsii::Type.check_type(@security_group_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "securityGroupIds") unless @security_group_ids.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil? end |
Instance Attribute Details
#cluster_certificate_authority_data ⇒ String? (readonly)
Default: - if not specified cluster.clusterCertificateAuthorityData will throw an error
The certificate-authority-data for your cluster.
54 55 56 |
# File 'ek_sv2/cluster_attributes.rb', line 54 def @cluster_certificate_authority_data end |
#cluster_encryption_config_key_arn ⇒ String? (readonly)
Default: - if not specified cluster.clusterEncryptionConfigKeyArn will throw an error
Amazon Resource Name (ARN) or alias of the customer master key (CMK).
59 60 61 |
# File 'ek_sv2/cluster_attributes.rb', line 59 def cluster_encryption_config_key_arn @cluster_encryption_config_key_arn end |
#cluster_endpoint ⇒ String? (readonly)
Default: - if not specified cluster.clusterEndpoint will throw an error.
The API Server endpoint URL.
64 65 66 |
# File 'ek_sv2/cluster_attributes.rb', line 64 def cluster_endpoint @cluster_endpoint end |
#cluster_name ⇒ String (readonly)
The physical name of the Cluster.
49 50 51 |
# File 'ek_sv2/cluster_attributes.rb', line 49 def cluster_name @cluster_name end |
#cluster_security_group_id ⇒ String? (readonly)
Default: - if not specified cluster.clusterSecurityGroupId will throw an error
The cluster security group that was created by Amazon EKS for the cluster.
69 70 71 |
# File 'ek_sv2/cluster_attributes.rb', line 69 def cluster_security_group_id @cluster_security_group_id 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.
75 76 77 |
# File 'ek_sv2/cluster_attributes.rb', line 75 def ip_family @ip_family end |
#kubectl_provider ⇒ AWSCDK::EKSv2::IKubectlProvider? (readonly)
Default: - Default CDK provider
KubectlProvider for issuing kubectl commands.
80 81 82 |
# File 'ek_sv2/cluster_attributes.rb', line 80 def kubectl_provider @kubectl_provider end |
#kubectl_provider_options ⇒ AWSCDK::EKSv2::KubectlProviderOptions? (readonly)
Default: - kubectl provider will not be created by default.
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.
87 88 89 |
# File 'ek_sv2/cluster_attributes.rb', line 87 def @kubectl_provider_options end |
#open_id_connect_provider ⇒ AWSCDK::IAM::IOpenIdConnectProvider? (readonly)
Default: - if not specified cluster.openIdConnectProvider and cluster.addServiceAccount will throw an error.
An Open ID Connect provider for this cluster that can be used to configure service accounts.
You can either import an existing provider using iam.OpenIdConnectProvider.fromProviderArn,
or create a new provider using new eks.OpenIdConnectProvider
95 96 97 |
# File 'ek_sv2/cluster_attributes.rb', line 95 def open_id_connect_provider @open_id_connect_provider 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.
104 105 106 |
# File 'ek_sv2/cluster_attributes.rb', line 104 def prune @prune end |
#security_group_ids ⇒ Array<String>? (readonly)
Default: - if not specified, no additional security groups will be considered in cluster.connections.
Additional security groups associated with this cluster.
109 110 111 |
# File 'ek_sv2/cluster_attributes.rb', line 109 def security_group_ids @security_group_ids end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: - if not specified cluster.vpc will throw an error
The VPC in which this Cluster was created.
114 115 116 |
# File 'ek_sv2/cluster_attributes.rb', line 114 def vpc @vpc end |
Class Method Details
.jsii_properties ⇒ Object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'ek_sv2/cluster_attributes.rb', line 116 def self.jsii_properties { :cluster_name => "clusterName", :cluster_certificate_authority_data => "clusterCertificateAuthorityData", :cluster_encryption_config_key_arn => "clusterEncryptionConfigKeyArn", :cluster_endpoint => "clusterEndpoint", :cluster_security_group_id => "clusterSecurityGroupId", :ip_family => "ipFamily", :kubectl_provider => "kubectlProvider", :kubectl_provider_options => "kubectlProviderOptions", :open_id_connect_provider => "openIdConnectProvider", :prune => "prune", :security_group_ids => "securityGroupIds", :vpc => "vpc", } end |
Instance Method Details
#to_jsii ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'ek_sv2/cluster_attributes.rb', line 133 def to_jsii result = {} result.merge!({ "clusterName" => @cluster_name, "clusterCertificateAuthorityData" => @cluster_certificate_authority_data, "clusterEncryptionConfigKeyArn" => @cluster_encryption_config_key_arn, "clusterEndpoint" => @cluster_endpoint, "clusterSecurityGroupId" => @cluster_security_group_id, "ipFamily" => @ip_family, "kubectlProvider" => @kubectl_provider, "kubectlProviderOptions" => @kubectl_provider_options, "openIdConnectProvider" => @open_id_connect_provider, "prune" => @prune, "securityGroupIds" => @security_group_ids, "vpc" => @vpc, }) result.compact end |