Class: Google::Apis::ContainerV1::UpdateNodePoolRequest

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

UpdateNodePoolRequests update a node pool's image and/or version.

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) ⇒ UpdateNodePoolRequest

Returns a new instance of UpdateNodePoolRequest.



3885
3886
3887
# File 'generated/google/apis/container_v1/classes.rb', line 3885

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

Instance Attribute Details

#cluster_idString

Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. Corresponds to the JSON property clusterId

Returns:

  • (String)


3806
3807
3808
# File 'generated/google/apis/container_v1/classes.rb', line 3806

def cluster_id
  @cluster_id
end

#image_typeString

Required. The desired image type for the node pool. Corresponds to the JSON property imageType

Returns:

  • (String)


3811
3812
3813
# File 'generated/google/apis/container_v1/classes.rb', line 3811

def image_type
  @image_type
end

#locationsArray<String>

The desired list of Google Compute Engine zones in which the node pool's nodes should be located. Changing the locations for a node pool will result in nodes being either created or removed from the node pool, depending on whether locations are being added or removed. Corresponds to the JSON property locations

Returns:

  • (Array<String>)


3820
3821
3822
# File 'generated/google/apis/container_v1/classes.rb', line 3820

def locations
  @locations
end

#nameString

The name (project, location, cluster, node pool) of the node pool to update. Specified in the format 'projects//locations//clusters//nodePools/'. Corresponds to the JSON property name

Returns:

  • (String)


3827
3828
3829
# File 'generated/google/apis/container_v1/classes.rb', line 3827

def name
  @name
end

#node_pool_idString

Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. Corresponds to the JSON property nodePoolId

Returns:

  • (String)


3833
3834
3835
# File 'generated/google/apis/container_v1/classes.rb', line 3833

def node_pool_id
  @node_pool_id
end

#node_versionString

Required. The Kubernetes version to change the nodes to (typically an upgrade). Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior:

  • "latest": picks the highest valid Kubernetes version
  • "1.X": picks the highest valid patch+gke.N patch in the 1.X version
  • "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
  • "1.X.Y-gke.N": picks an explicit Kubernetes version
  • "-": picks the Kubernetes master version Corresponds to the JSON property nodeVersion

Returns:

  • (String)


3846
3847
3848
# File 'generated/google/apis/container_v1/classes.rb', line 3846

def node_version
  @node_version
end

#project_idString

Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. Corresponds to the JSON property projectId

Returns:

  • (String)


3853
3854
3855
# File 'generated/google/apis/container_v1/classes.rb', line 3853

def project_id
  @project_id
end

#upgrade_settingsGoogle::Apis::ContainerV1::UpgradeSettings

These upgrade settings control the level of parallelism and the level of disruption caused by an upgrade. maxUnavailable controls the number of nodes that can be simultaneously unavailable. maxSurge controls the number of additional nodes that can be added to the node pool temporarily for the time of the upgrade to increase the number of available nodes. (maxUnavailable + maxSurge) determines the level of parallelism (how many nodes are being upgraded at the same time). Note: upgrades inevitably introduce some disruption since workloads need to be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, this holds true. (Disruption stays within the limits of PodDisruptionBudget, if it is configured.) Consider a hypothetical node pool with 5 nodes having maxSurge=2, maxUnavailable=1. This means the upgrade process upgrades 3 nodes simultaneously. It creates 2 additional (upgraded) nodes, then it brings down 3 old (not yet upgraded) nodes at the same time. This ensures that there are always at least 4 nodes available. Corresponds to the JSON property upgradeSettings



3875
3876
3877
# File 'generated/google/apis/container_v1/classes.rb', line 3875

def upgrade_settings
  @upgrade_settings
end

#zoneString

Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. Corresponds to the JSON property zone

Returns:

  • (String)


3883
3884
3885
# File 'generated/google/apis/container_v1/classes.rb', line 3883

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
# File 'generated/google/apis/container_v1/classes.rb', line 3890

def update!(**args)
  @cluster_id = args[:cluster_id] if args.key?(:cluster_id)
  @image_type = args[:image_type] if args.key?(:image_type)
  @locations = args[:locations] if args.key?(:locations)
  @name = args[:name] if args.key?(:name)
  @node_pool_id = args[:node_pool_id] if args.key?(:node_pool_id)
  @node_version = args[:node_version] if args.key?(:node_version)
  @project_id = args[:project_id] if args.key?(:project_id)
  @upgrade_settings = args[:upgrade_settings] if args.key?(:upgrade_settings)
  @zone = args[:zone] if args.key?(:zone)
end