Class: AWSCDK::EKSv2::BootstrapOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKSv2::BootstrapOptions
- Defined in:
- ek_sv2/bootstrap_options.rb
Overview
EKS node bootstrapping options.
Instance Attribute Summary collapse
-
#additional_args ⇒ String?
readonly
Additional command line arguments to pass to the
/etc/eks/bootstrap.shcommand. -
#aws_api_retry_attempts ⇒ Numeric?
readonly
Number of retry attempts for AWS API call (DescribeCluster).
-
#dns_cluster_ip ⇒ String?
readonly
Overrides the IP address to use for DNS queries within the cluster.
-
#docker_config_json ⇒ String?
readonly
The contents of the
/etc/docker/daemon.jsonfile. -
#enable_docker_bridge ⇒ Boolean?
readonly
Restores the docker default bridge network.
-
#kubelet_extra_args ⇒ String?
readonly
Extra arguments to add to the kubelet.
-
#use_max_pods ⇒ Boolean?
readonly
Sets
--max-podsfor the kubelet based on the capacity of the EC2 instance.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(additional_args: nil, aws_api_retry_attempts: nil, dns_cluster_ip: nil, docker_config_json: nil, enable_docker_bridge: nil, kubelet_extra_args: nil, use_max_pods: nil) ⇒ BootstrapOptions
constructor
A new instance of BootstrapOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(additional_args: nil, aws_api_retry_attempts: nil, dns_cluster_ip: nil, docker_config_json: nil, enable_docker_bridge: nil, kubelet_extra_args: nil, use_max_pods: nil) ⇒ BootstrapOptions
Returns a new instance of BootstrapOptions.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'ek_sv2/bootstrap_options.rb', line 14 def initialize(additional_args: nil, aws_api_retry_attempts: nil, dns_cluster_ip: nil, docker_config_json: nil, enable_docker_bridge: nil, kubelet_extra_args: nil, use_max_pods: nil) @additional_args = additional_args Jsii::Type.check_type(@additional_args, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "additionalArgs") unless @additional_args.nil? @aws_api_retry_attempts = aws_api_retry_attempts Jsii::Type.check_type(@aws_api_retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "awsApiRetryAttempts") unless @aws_api_retry_attempts.nil? @dns_cluster_ip = dns_cluster_ip Jsii::Type.check_type(@dns_cluster_ip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dnsClusterIp") unless @dns_cluster_ip.nil? @docker_config_json = docker_config_json Jsii::Type.check_type(@docker_config_json, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dockerConfigJson") unless @docker_config_json.nil? @enable_docker_bridge = enable_docker_bridge Jsii::Type.check_type(@enable_docker_bridge, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableDockerBridge") unless @enable_docker_bridge.nil? @kubelet_extra_args = kubelet_extra_args Jsii::Type.check_type(@kubelet_extra_args, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kubeletExtraArgs") unless @kubelet_extra_args.nil? @use_max_pods = use_max_pods Jsii::Type.check_type(@use_max_pods, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useMaxPods") unless @use_max_pods.nil? end |
Instance Attribute Details
#additional_args ⇒ String? (readonly)
Default: - none
Additional command line arguments to pass to the /etc/eks/bootstrap.sh command.
36 37 38 |
# File 'ek_sv2/bootstrap_options.rb', line 36 def additional_args @additional_args end |
#aws_api_retry_attempts ⇒ Numeric? (readonly)
Default: 3
Number of retry attempts for AWS API call (DescribeCluster).
41 42 43 |
# File 'ek_sv2/bootstrap_options.rb', line 41 def aws_api_retry_attempts @aws_api_retry_attempts end |
#dns_cluster_ip ⇒ String? (readonly)
Default: - 10.100.0.10 or 172.20.0.10 based on the IP address of the primary interface.
Overrides the IP address to use for DNS queries within the cluster.
46 47 48 |
# File 'ek_sv2/bootstrap_options.rb', line 46 def dns_cluster_ip @dns_cluster_ip end |
#docker_config_json ⇒ String? (readonly)
Default: - none
The contents of the /etc/docker/daemon.json file. Useful if you want a custom config differing from the default one in the EKS AMI.
51 52 53 |
# File 'ek_sv2/bootstrap_options.rb', line 51 def docker_config_json @docker_config_json end |
#enable_docker_bridge ⇒ Boolean? (readonly)
Default: false
Restores the docker default bridge network.
56 57 58 |
# File 'ek_sv2/bootstrap_options.rb', line 56 def enable_docker_bridge @enable_docker_bridge end |
#kubelet_extra_args ⇒ String? (readonly)
Default: - none
Extra arguments to add to the kubelet. Useful for adding labels or taints.
For example, --node-labels foo=bar,goo=far.
63 64 65 |
# File 'ek_sv2/bootstrap_options.rb', line 63 def kubelet_extra_args @kubelet_extra_args end |
#use_max_pods ⇒ Boolean? (readonly)
Default: true
Sets --max-pods for the kubelet based on the capacity of the EC2 instance.
68 69 70 |
# File 'ek_sv2/bootstrap_options.rb', line 68 def use_max_pods @use_max_pods end |
Class Method Details
.jsii_properties ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 |
# File 'ek_sv2/bootstrap_options.rb', line 70 def self.jsii_properties { :additional_args => "additionalArgs", :aws_api_retry_attempts => "awsApiRetryAttempts", :dns_cluster_ip => "dnsClusterIp", :docker_config_json => "dockerConfigJson", :enable_docker_bridge => "enableDockerBridge", :kubelet_extra_args => "kubeletExtraArgs", :use_max_pods => "useMaxPods", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'ek_sv2/bootstrap_options.rb', line 82 def to_jsii result = {} result.merge!({ "additionalArgs" => @additional_args, "awsApiRetryAttempts" => @aws_api_retry_attempts, "dnsClusterIp" => @dns_cluster_ip, "dockerConfigJson" => @docker_config_json, "enableDockerBridge" => @enable_docker_bridge, "kubeletExtraArgs" => @kubelet_extra_args, "useMaxPods" => @use_max_pods, }) result.compact end |