Class: AWSCDK::EKS::CfnNodegroup::UpdateConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
eks/cfn_nodegroup.rb

Overview

The update configuration for the node group.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_unavailable: nil, max_unavailable_percentage: nil, update_strategy: nil) ⇒ UpdateConfigProperty

Returns a new instance of UpdateConfigProperty.

Parameters:

  • max_unavailable (Numeric, nil) (defaults to: nil)

    The maximum number of nodes unavailable at once during a version update.

  • max_unavailable_percentage (Numeric, nil) (defaults to: nil)

    The maximum percentage of nodes unavailable during a version update.

  • update_strategy (String, nil) (defaults to: nil)

    The configuration for the behavior to follow during a node group version update of this managed node group.



1189
1190
1191
1192
1193
1194
1195
1196
# File 'eks/cfn_nodegroup.rb', line 1189

def initialize(max_unavailable: nil, max_unavailable_percentage: nil, update_strategy: nil)
  @max_unavailable = max_unavailable
  Jsii::Type.check_type(@max_unavailable, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxUnavailable") unless @max_unavailable.nil?
  @max_unavailable_percentage = max_unavailable_percentage
  Jsii::Type.check_type(@max_unavailable_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxUnavailablePercentage") unless @max_unavailable_percentage.nil?
  @update_strategy = update_strategy
  Jsii::Type.check_type(@update_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "updateStrategy") unless @update_strategy.nil?
end

Instance Attribute Details

#max_unavailableNumeric? (readonly)

The maximum number of nodes unavailable at once during a version update.

Nodes are updated in parallel. This value or max_unavailable_percentage is required to have a value.The maximum number is 100.



1204
1205
1206
# File 'eks/cfn_nodegroup.rb', line 1204

def max_unavailable
  @max_unavailable
end

#max_unavailable_percentageNumeric? (readonly)

The maximum percentage of nodes unavailable during a version update.

This percentage of nodes are updated in parallel, up to 100 nodes at once. This value or max_unavailable is required to have a value.



1211
1212
1213
# File 'eks/cfn_nodegroup.rb', line 1211

def max_unavailable_percentage
  @max_unavailable_percentage
end

#update_strategyString? (readonly)

The configuration for the behavior to follow during a node group version update of this managed node group.

You choose between two possible strategies for replacing nodes during an UpdateNodegroupVersion action.

An Amazon EKS managed node group updates by replacing nodes with new nodes of newer AMI versions in parallel. The update strategy changes the managed node update behavior of the managed node group for each quantity. The default strategy has guardrails to protect you from misconfiguration and launches the new instances first, before terminating the old instances. The minimal strategy removes the guardrails and terminates the old instances before launching the new instances. This minimal strategy is useful in scenarios where you are constrained to resources or costs (for example, with hardware accelerators such as GPUs).



1220
1221
1222
# File 'eks/cfn_nodegroup.rb', line 1220

def update_strategy
  @update_strategy
end

Class Method Details

.jsii_propertiesObject



1222
1223
1224
1225
1226
1227
1228
# File 'eks/cfn_nodegroup.rb', line 1222

def self.jsii_properties
  {
    :max_unavailable => "maxUnavailable",
    :max_unavailable_percentage => "maxUnavailablePercentage",
    :update_strategy => "updateStrategy",
  }
end

Instance Method Details

#to_jsiiObject



1230
1231
1232
1233
1234
1235
1236
1237
1238
# File 'eks/cfn_nodegroup.rb', line 1230

def to_jsii
  result = {}
  result.merge!({
    "maxUnavailable" => @max_unavailable,
    "maxUnavailablePercentage" => @max_unavailable_percentage,
    "updateStrategy" => @update_strategy,
  })
  result.compact
end