Class: Google::Apis::ContainerV1::ClusterUpdate

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

ClusterUpdate describes an update to the cluster. Exactly one update can be applied to a cluster with each request, so at most one field can be provided.

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

Returns a new instance of ClusterUpdate



792
793
794
# File 'generated/google/apis/container_v1/classes.rb', line 792

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

Instance Attribute Details

#desired_addons_configGoogle::Apis::ContainerV1::AddonsConfig

Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality. Corresponds to the JSON property desiredAddonsConfig



768
769
770
# File 'generated/google/apis/container_v1/classes.rb', line 768

def desired_addons_config
  @desired_addons_config
end

#desired_image_typeString

The desired image type for the node pool. NOTE: Set the "desired_node_pool" field as well. Corresponds to the JSON property desiredImageType

Returns:

  • (String)


762
763
764
# File 'generated/google/apis/container_v1/classes.rb', line 762

def desired_image_type
  @desired_image_type
end

#desired_locationsArray<String>

The desired list of Google Compute Engine locations in which the cluster's nodes should be located. Changing the locations a cluster is in will result in nodes being either created or removed from the cluster, depending on whether locations are being added or removed. This list must always include the cluster's primary zone. Corresponds to the JSON property desiredLocations

Returns:

  • (Array<String>)


748
749
750
# File 'generated/google/apis/container_v1/classes.rb', line 748

def desired_locations
  @desired_locations
end

#desired_master_versionString

The Kubernetes version to change the master to. The only valid value is the latest supported version. Use "-" to have the server automatically select the latest version. Corresponds to the JSON property desiredMasterVersion

Returns:

  • (String)


790
791
792
# File 'generated/google/apis/container_v1/classes.rb', line 790

def desired_master_version
  @desired_master_version
end

#desired_monitoring_serviceString

The monitoring service the cluster should use to write metrics. Currently available options:

  • "monitoring.googleapis.com" - the Google Cloud Monitoring service
  • "none" - no metrics will be exported from the cluster Corresponds to the JSON property desiredMonitoringService

Returns:

  • (String)


756
757
758
# File 'generated/google/apis/container_v1/classes.rb', line 756

def desired_monitoring_service
  @desired_monitoring_service
end

#desired_node_pool_autoscalingGoogle::Apis::ContainerV1::NodePoolAutoscaling

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



738
739
740
# File 'generated/google/apis/container_v1/classes.rb', line 738

def desired_node_pool_autoscaling
  @desired_node_pool_autoscaling
end

#desired_node_pool_idString

The node pool to be upgraded. This field is mandatory if "desired_node_version", "desired_image_family" or "desired_node_pool_autoscaling" is specified and there is more than one node pool on the cluster. Corresponds to the JSON property desiredNodePoolId

Returns:

  • (String)


776
777
778
# File 'generated/google/apis/container_v1/classes.rb', line 776

def desired_node_pool_id
  @desired_node_pool_id
end

#desired_node_versionString

The Kubernetes version to change the nodes to (typically an upgrade). Use - to upgrade to the latest version supported by the server. Corresponds to the JSON property desiredNodeVersion

Returns:

  • (String)


783
784
785
# File 'generated/google/apis/container_v1/classes.rb', line 783

def desired_node_version
  @desired_node_version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



797
798
799
800
801
802
803
804
805
806
# File 'generated/google/apis/container_v1/classes.rb', line 797

def update!(**args)
  @desired_node_pool_autoscaling = args[:desired_node_pool_autoscaling] if args.key?(:desired_node_pool_autoscaling)
  @desired_locations = args[:desired_locations] if args.key?(:desired_locations)
  @desired_monitoring_service = args[:desired_monitoring_service] if args.key?(:desired_monitoring_service)
  @desired_image_type = args[:desired_image_type] if args.key?(:desired_image_type)
  @desired_addons_config = args[:desired_addons_config] if args.key?(:desired_addons_config)
  @desired_node_pool_id = args[:desired_node_pool_id] if args.key?(:desired_node_pool_id)
  @desired_node_version = args[:desired_node_version] if args.key?(:desired_node_version)
  @desired_master_version = args[:desired_master_version] if args.key?(:desired_master_version)
end