Class: AWSCDK::EKSv2::ComputeConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ek_sv2/compute_config.rb

Overview

Options for configuring EKS Auto Mode compute settings.

When enabled, EKS will automatically manage compute resources like node groups and Fargate profiles.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node_pools: nil, node_role: nil) ⇒ ComputeConfig

Returns a new instance of ComputeConfig.

Parameters:

  • node_pools (Array<String>, nil) (defaults to: nil)

    Names of nodePools to include in Auto Mode.

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

    IAM role for the nodePools.



11
12
13
14
15
16
# File 'ek_sv2/compute_config.rb', line 11

def initialize(node_pools: nil, node_role: nil)
  @node_pools = node_pools
  Jsii::Type.check_type(@node_pools, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "nodePools") unless @node_pools.nil?
  @node_role = node_role
  Jsii::Type.check_type(@node_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "nodeRole") unless @node_role.nil?
end

Instance Attribute Details

#node_poolsArray<String>? (readonly)

Note:

Default: - ['system', 'general-purpose']

Names of nodePools to include in Auto Mode.

You cannot modify the built in system and general-purpose node pools. You can only enable or disable them. Node pool values are case-sensitive and must be general-purpose and/or system.

Returns:

  • (Array<String>, nil)

See Also:

  • https://docs.aws.amazon.com/eks/latest/userguide/create-node-pool.html


26
27
28
# File 'ek_sv2/compute_config.rb', line 26

def node_pools
  @node_pools
end

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

Note:

Default: - generated by the CDK

IAM role for the nodePools.

Returns:

See Also:

  • https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html


32
33
34
# File 'ek_sv2/compute_config.rb', line 32

def node_role
  @node_role
end

Class Method Details

.jsii_propertiesObject



34
35
36
37
38
39
# File 'ek_sv2/compute_config.rb', line 34

def self.jsii_properties
  {
    :node_pools => "nodePools",
    :node_role => "nodeRole",
  }
end

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
# File 'ek_sv2/compute_config.rb', line 41

def to_jsii
  result = {}
  result.merge!({
    "nodePools" => @node_pools,
    "nodeRole" => @node_role,
  })
  result.compact
end