Class: Google::Apis::ContainerV1::NodePoolAutoscaling

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/container_v1/classes.rb,
generated/google/apis/container_v1/representations.rb,
generated/google/apis/container_v1/representations.rb

Overview

NodePoolAutoscaling contains information required by cluster autoscaler to adjust the size of the node pool to the current cluster usage.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ NodePoolAutoscaling

Returns a new instance of NodePoolAutoscaling



1642
1643
1644
# File 'generated/google/apis/container_v1/classes.rb', line 1642

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#enabledBoolean Also known as: enabled?

Is autoscaling enabled for this node pool. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


1627
1628
1629
# File 'generated/google/apis/container_v1/classes.rb', line 1627

def enabled
  @enabled
end

#max_node_countFixnum

Maximum number of nodes in the NodePool. Must be >= min_node_count. There has to enough quota to scale up the cluster. Corresponds to the JSON property maxNodeCount

Returns:

  • (Fixnum)


1634
1635
1636
# File 'generated/google/apis/container_v1/classes.rb', line 1634

def max_node_count
  @max_node_count
end

#min_node_countFixnum

Minimum number of nodes in the NodePool. Must be >= 1 and <= max_node_count. Corresponds to the JSON property minNodeCount

Returns:

  • (Fixnum)


1640
1641
1642
# File 'generated/google/apis/container_v1/classes.rb', line 1640

def min_node_count
  @min_node_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1647
1648
1649
1650
1651
# File 'generated/google/apis/container_v1/classes.rb', line 1647

def update!(**args)
  @enabled = args[:enabled] if args.key?(:enabled)
  @max_node_count = args[:max_node_count] if args.key?(:max_node_count)
  @min_node_count = args[:min_node_count] if args.key?(:min_node_count)
end