diff --git a/docs/resources/google_container_regional_cluster.md b/docs/resources/google_container_regional_cluster.md index 6fc73d7bd..4a3b9f6df 100644 --- a/docs/resources/google_container_regional_cluster.md +++ b/docs/resources/google_container_regional_cluster.md @@ -26,7 +26,7 @@ Properties that can be accessed from the `google_container_regional_cluster` res * `description`: An optional description of this cluster. - * `initial_node_count`: The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "nodeConfig") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. + * `initial_node_count`: The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "nodeConfig") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. This field has been deprecated. Please use nodePool.initial_node_count instead. * `node_config`: Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "initialNodeCount") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. @@ -50,12 +50,22 @@ Properties that can be accessed from the `google_container_regional_cluster` res * `preemptible`: Whether the nodes are created as preemptible VM instances. See: https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances. + * `accelerators`: A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for more information about support for GPUs. + + * `disk_type`: Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' + + * `min_cpu_platform`: Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. + + * `taints`: List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + * `master_auth`: The authentication information for accessing the master endpoint. * `username`: The username to use for HTTP basic authentication to the master endpoint. * `password`: The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password. + * `client_certificate_config`: Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued. + * `cluster_ca_certificate`: Base64-encoded public certificate that is the root of trust for the cluster. * `client_certificate`: Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. @@ -88,8 +98,30 @@ Properties that can be accessed from the `google_container_regional_cluster` res * `horizontal_pod_autoscaling`: Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. + * `network_policy_config`: Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. + * `subnetwork`: The name of the Google Compute Engine subnetwork to which the cluster is connected. + * `locations`: The list of Google Compute Engine zones in which the cluster's nodes should be located. + + * `resource_labels`: The resource labels for the cluster to use to annotate any related Google Compute Engine resources. + + * `label_fingerprint`: The fingerprint of the set of labels for this cluster. + + * `legacy_abac`: Configuration for the legacy ABAC authorization mode. + + * `enabled`: Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM. + + * `network_policy`: Configuration options for the NetworkPolicy feature. + + * `provider`: The selected network policy provider. + + * `enabled`: Whether network policy is enabled on the cluster. + + * `default_max_pods_constraint`: The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. + + * `max_pods_per_node`: Constraint enforced on the max num of pods per node. + * `endpoint`: The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ See the masterAuth property of this resource for username and password information. * `initial_cluster_version`: The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. @@ -100,6 +132,10 @@ Properties that can be accessed from the `google_container_regional_cluster` res * `create_time`: The time the cluster was created, in RFC3339 text format. + * `status`: The current status of this cluster. + + * `status_message`: Additional information about the current status of this cluster, if available. + * `node_ipv4_cidr_size`: The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. * `services_ipv4_cidr`: The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR. @@ -108,6 +144,16 @@ Properties that can be accessed from the `google_container_regional_cluster` res * `expire_time`: The time the cluster will be automatically deleted in RFC3339 text format. + * `enable_tpu`: Enable the ability to use Cloud TPUs in this cluster. + + * `tpu_ipv4_cidr_block`: The IP address range of the Cloud TPUs in this cluster, in CIDR notation + + * `conditions`: Which conditions caused the current cluster state. + + * `code`: Machine-friendly representation of the condition + + * `message`: Human-friendly representation of the condition + * `location`: The location where the cluster is deployed diff --git a/docs/resources/google_container_regional_clusters.md b/docs/resources/google_container_regional_clusters.md index 52685ca3a..10b2af122 100644 --- a/docs/resources/google_container_regional_clusters.md +++ b/docs/resources/google_container_regional_clusters.md @@ -31,15 +31,26 @@ See [google_container_regional_cluster.md](google_container_regional_cluster.md) * `cluster_ipv4_cidrs`: an array of `google_container_regional_cluster` cluster_ipv4_cidr * `addons_configs`: an array of `google_container_regional_cluster` addons_config * `subnetworks`: an array of `google_container_regional_cluster` subnetwork + * `locations`: an array of `google_container_regional_cluster` locations + * `resource_labels`: an array of `google_container_regional_cluster` resource_labels + * `label_fingerprints`: an array of `google_container_regional_cluster` label_fingerprint + * `legacy_abacs`: an array of `google_container_regional_cluster` legacy_abac + * `network_policies`: an array of `google_container_regional_cluster` network_policy + * `default_max_pods_constraints`: an array of `google_container_regional_cluster` default_max_pods_constraint * `endpoints`: an array of `google_container_regional_cluster` endpoint * `initial_cluster_versions`: an array of `google_container_regional_cluster` initial_cluster_version * `current_master_versions`: an array of `google_container_regional_cluster` current_master_version * `current_node_versions`: an array of `google_container_regional_cluster` current_node_version * `create_times`: an array of `google_container_regional_cluster` create_time + * `statuses`: an array of `google_container_regional_cluster` status + * `status_messages`: an array of `google_container_regional_cluster` status_message * `node_ipv4_cidr_sizes`: an array of `google_container_regional_cluster` node_ipv4_cidr_size * `services_ipv4_cidrs`: an array of `google_container_regional_cluster` services_ipv4_cidr * `current_node_counts`: an array of `google_container_regional_cluster` current_node_count * `expire_times`: an array of `google_container_regional_cluster` expire_time + * `enable_tpus`: an array of `google_container_regional_cluster` enable_tpu + * `tpu_ipv4_cidr_blocks`: an array of `google_container_regional_cluster` tpu_ipv4_cidr_block + * `conditions`: an array of `google_container_regional_cluster` conditions * `locations`: an array of `google_container_regional_cluster` location ## Filter Criteria diff --git a/libraries/google/container/property/regionalcluster_addons_config.rb b/libraries/google/container/property/regionalcluster_addons_config.rb index 7990a3339..8d691cb0e 100644 --- a/libraries/google/container/property/regionalcluster_addons_config.rb +++ b/libraries/google/container/property/regionalcluster_addons_config.rb @@ -15,6 +15,7 @@ # ---------------------------------------------------------------------------- require 'google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling' require 'google/container/property/regionalcluster_addons_config_http_load_balancing' +require 'google/container/property/regionalcluster_addons_config_network_policy_config' module GoogleInSpec module Container module Property @@ -23,11 +24,14 @@ class RegionalClusterAddonsConfig attr_reader :horizontal_pod_autoscaling + attr_reader :network_policy_config + def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @http_load_balancing = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHttpLoadBalancing.new(args['httpLoadBalancing'], to_s) @horizontal_pod_autoscaling = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHorizontalPodAutoscaling.new(args['horizontalPodAutoscaling'], to_s) + @network_policy_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigNetworkPolicyConfig.new(args['networkPolicyConfig'], to_s) end def to_s diff --git a/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb b/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb new file mode 100644 index 000000000..f1c764d4c --- /dev/null +++ b/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterAddonsConfigNetworkPolicyConfig + attr_reader :disabled + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @disabled = args['disabled'] + end + + def to_s + "#{@parent_identifier} RegionalClusterAddonsConfigNetworkPolicyConfig" + end + end + end + end +end diff --git a/libraries/google/container/property/regionalcluster_conditions.rb b/libraries/google/container/property/regionalcluster_conditions.rb new file mode 100644 index 000000000..e434b6d07 --- /dev/null +++ b/libraries/google/container/property/regionalcluster_conditions.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterConditions + attr_reader :code + + attr_reader :message + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @code = args['code'] + @message = args['message'] + end + + def to_s + "#{@parent_identifier} RegionalClusterConditions" + end + end + + class RegionalClusterConditionsArray + def self.parse(value, parent_identifier) + return if value.nil? + return RegionalClusterConditions.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| RegionalClusterConditions.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb b/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb new file mode 100644 index 000000000..8fd052f39 --- /dev/null +++ b/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterDefaultMaxPodsConstraint + attr_reader :max_pods_per_node + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @max_pods_per_node = args['maxPodsPerNode'] + end + + def to_s + "#{@parent_identifier} RegionalClusterDefaultMaxPodsConstraint" + end + end + end + end +end diff --git a/libraries/google/container/property/regionalcluster_legacy_abac.rb b/libraries/google/container/property/regionalcluster_legacy_abac.rb new file mode 100644 index 000000000..e4dcc7a07 --- /dev/null +++ b/libraries/google/container/property/regionalcluster_legacy_abac.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterLegacyAbac + attr_reader :enabled + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @enabled = args['enabled'] + end + + def to_s + "#{@parent_identifier} RegionalClusterLegacyAbac" + end + end + end + end +end diff --git a/libraries/google/container/property/regionalcluster_master_auth.rb b/libraries/google/container/property/regionalcluster_master_auth.rb index d84e74afb..fd42fe7d9 100644 --- a/libraries/google/container/property/regionalcluster_master_auth.rb +++ b/libraries/google/container/property/regionalcluster_master_auth.rb @@ -13,6 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- +require 'google/container/property/regionalcluster_master_auth_client_certificate_config' module GoogleInSpec module Container module Property @@ -21,6 +22,8 @@ class RegionalClusterMasterAuth attr_reader :password + attr_reader :client_certificate_config + attr_reader :cluster_ca_certificate attr_reader :client_certificate @@ -32,6 +35,7 @@ def initialize(args = nil, parent_identifier = nil) @parent_identifier = parent_identifier @username = args['username'] @password = args['password'] + @client_certificate_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthClientCertificateConfig.new(args['clientCertificateConfig'], to_s) @cluster_ca_certificate = args['clusterCaCertificate'] @client_certificate = args['clientCertificate'] @client_key = args['clientKey'] diff --git a/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb b/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb new file mode 100644 index 000000000..12b0f074e --- /dev/null +++ b/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterMasterAuthClientCertificateConfig + attr_reader :issue_client_certificate + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @issue_client_certificate = args['issueClientCertificate'] + end + + def to_s + "#{@parent_identifier} RegionalClusterMasterAuthClientCertificateConfig" + end + end + end + end +end diff --git a/libraries/google/container/property/regionalcluster_network_policy.rb b/libraries/google/container/property/regionalcluster_network_policy.rb new file mode 100644 index 000000000..c9b632348 --- /dev/null +++ b/libraries/google/container/property/regionalcluster_network_policy.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterNetworkPolicy + attr_reader :provider + + attr_reader :enabled + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @provider = args['provider'] + @enabled = args['enabled'] + end + + def to_s + "#{@parent_identifier} RegionalClusterNetworkPolicy" + end + end + end + end +end diff --git a/libraries/google/container/property/regionalcluster_node_config.rb b/libraries/google/container/property/regionalcluster_node_config.rb index 70e3ae76e..0d357543a 100644 --- a/libraries/google/container/property/regionalcluster_node_config.rb +++ b/libraries/google/container/property/regionalcluster_node_config.rb @@ -13,6 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- +require 'google/container/property/regionalcluster_node_config_accelerators' +require 'google/container/property/regionalcluster_node_config_taints' module GoogleInSpec module Container module Property @@ -37,6 +39,14 @@ class RegionalClusterNodeConfig attr_reader :preemptible + attr_reader :accelerators + + attr_reader :disk_type + + attr_reader :min_cpu_platform + + attr_reader :taints + def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @@ -50,6 +60,10 @@ def initialize(args = nil, parent_identifier = nil) @local_ssd_count = args['localSsdCount'] @tags = args['tags'] @preemptible = args['preemptible'] + @accelerators = GoogleInSpec::Container::Property::RegionalClusterNodeConfigAcceleratorsArray.parse(args['accelerators'], to_s) + @disk_type = args['diskType'] + @min_cpu_platform = args['minCpuPlatform'] + @taints = GoogleInSpec::Container::Property::RegionalClusterNodeConfigTaintsArray.parse(args['taints'], to_s) end def to_s diff --git a/libraries/google/container/property/regionalcluster_node_config_accelerators.rb b/libraries/google/container/property/regionalcluster_node_config_accelerators.rb new file mode 100644 index 000000000..66f3f6841 --- /dev/null +++ b/libraries/google/container/property/regionalcluster_node_config_accelerators.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterNodeConfigAccelerators + attr_reader :accelerator_count + + attr_reader :accelerator_type + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @accelerator_count = args['acceleratorCount'] + @accelerator_type = args['acceleratorType'] + end + + def to_s + "#{@parent_identifier} RegionalClusterNodeConfigAccelerators" + end + end + + class RegionalClusterNodeConfigAcceleratorsArray + def self.parse(value, parent_identifier) + return if value.nil? + return RegionalClusterNodeConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| RegionalClusterNodeConfigAccelerators.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/container/property/regionalcluster_node_config_taints.rb b/libraries/google/container/property/regionalcluster_node_config_taints.rb new file mode 100644 index 000000000..bf4807c42 --- /dev/null +++ b/libraries/google/container/property/regionalcluster_node_config_taints.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Container + module Property + class RegionalClusterNodeConfigTaints + attr_reader :key + + attr_reader :value + + attr_reader :effect + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @key = args['key'] + @value = args['value'] + @effect = args['effect'] + end + + def to_s + "#{@parent_identifier} RegionalClusterNodeConfigTaints" + end + end + + class RegionalClusterNodeConfigTaintsArray + def self.parse(value, parent_identifier) + return if value.nil? + return RegionalClusterNodeConfigTaints.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| RegionalClusterNodeConfigTaints.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google_container_regional_cluster.rb b/libraries/google_container_regional_cluster.rb index d0ba383ce..c4d965f90 100644 --- a/libraries/google_container_regional_cluster.rb +++ b/libraries/google_container_regional_cluster.rb @@ -17,8 +17,16 @@ require 'google/container/property/regionalcluster_addons_config' require 'google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling' require 'google/container/property/regionalcluster_addons_config_http_load_balancing' +require 'google/container/property/regionalcluster_addons_config_network_policy_config' +require 'google/container/property/regionalcluster_conditions' +require 'google/container/property/regionalcluster_default_max_pods_constraint' +require 'google/container/property/regionalcluster_legacy_abac' require 'google/container/property/regionalcluster_master_auth' +require 'google/container/property/regionalcluster_master_auth_client_certificate_config' +require 'google/container/property/regionalcluster_network_policy' require 'google/container/property/regionalcluster_node_config' +require 'google/container/property/regionalcluster_node_config_accelerators' +require 'google/container/property/regionalcluster_node_config_taints' require 'google/container/property/regionalcluster_private_cluster_config' # A provider to manage Google Kubernetes Engine resources. @@ -40,15 +48,26 @@ class RegionalCluster < GcpResourceBase attr_reader :cluster_ipv4_cidr attr_reader :addons_config attr_reader :subnetwork + attr_reader :locations + attr_reader :resource_labels + attr_reader :label_fingerprint + attr_reader :legacy_abac + attr_reader :network_policy + attr_reader :default_max_pods_constraint attr_reader :endpoint attr_reader :initial_cluster_version attr_reader :current_master_version attr_reader :current_node_version attr_reader :create_time + attr_reader :status + attr_reader :status_message attr_reader :node_ipv4_cidr_size attr_reader :services_ipv4_cidr attr_reader :current_node_count attr_reader :expire_time + attr_reader :enable_tpu + attr_reader :tpu_ipv4_cidr_block + attr_reader :conditions attr_reader :location def initialize(params) @@ -71,15 +90,26 @@ def parse @cluster_ipv4_cidr = @fetched['clusterIpv4Cidr'] @addons_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(@fetched['addonsConfig'], to_s) @subnetwork = @fetched['subnetwork'] + @locations = @fetched['locations'] + @resource_labels = @fetched['resourceLabels'] + @label_fingerprint = @fetched['labelFingerprint'] + @legacy_abac = GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(@fetched['legacyAbac'], to_s) + @network_policy = GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(@fetched['networkPolicy'], to_s) + @default_max_pods_constraint = GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(@fetched['defaultMaxPodsConstraint'], to_s) @endpoint = @fetched['endpoint'] @initial_cluster_version = @fetched['initialClusterVersion'] @current_master_version = @fetched['currentMasterVersion'] @current_node_version = @fetched['currentNodeVersion'] @create_time = parse_time_string(@fetched['createTime']) + @status = @fetched['status'] + @status_message = @fetched['statusMessage'] @node_ipv4_cidr_size = @fetched['nodeIpv4CidrSize'] @services_ipv4_cidr = @fetched['servicesIpv4Cidr'] @current_node_count = @fetched['currentNodeCount'] @expire_time = parse_time_string(@fetched['expireTime']) + @enable_tpu = @fetched['enableTpu'] + @tpu_ipv4_cidr_block = @fetched['tpuIpv4CidrBlock'] + @conditions = GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(@fetched['conditions'], to_s) @location = @fetched['location'] end diff --git a/libraries/google_container_regional_clusters.rb b/libraries/google_container_regional_clusters.rb index 8ee1e30de..aa3488854 100644 --- a/libraries/google_container_regional_clusters.rb +++ b/libraries/google_container_regional_clusters.rb @@ -35,15 +35,26 @@ class RegionalClusters < GcpResourceBase filter_table_config.add(:cluster_ipv4_cidrs, field: :cluster_ipv4_cidr) filter_table_config.add(:addons_configs, field: :addons_config) filter_table_config.add(:subnetworks, field: :subnetwork) + filter_table_config.add(:locations, field: :locations) + filter_table_config.add(:resource_labels, field: :resource_labels) + filter_table_config.add(:label_fingerprints, field: :label_fingerprint) + filter_table_config.add(:legacy_abacs, field: :legacy_abac) + filter_table_config.add(:network_policies, field: :network_policy) + filter_table_config.add(:default_max_pods_constraints, field: :default_max_pods_constraint) filter_table_config.add(:endpoints, field: :endpoint) filter_table_config.add(:initial_cluster_versions, field: :initial_cluster_version) filter_table_config.add(:current_master_versions, field: :current_master_version) filter_table_config.add(:current_node_versions, field: :current_node_version) filter_table_config.add(:create_times, field: :create_time) + filter_table_config.add(:statuses, field: :status) + filter_table_config.add(:status_messages, field: :status_message) filter_table_config.add(:node_ipv4_cidr_sizes, field: :node_ipv4_cidr_size) filter_table_config.add(:services_ipv4_cidrs, field: :services_ipv4_cidr) filter_table_config.add(:current_node_counts, field: :current_node_count) filter_table_config.add(:expire_times, field: :expire_time) + filter_table_config.add(:enable_tpus, field: :enable_tpu) + filter_table_config.add(:tpu_ipv4_cidr_blocks, field: :tpu_ipv4_cidr_block) + filter_table_config.add(:conditions, field: :conditions) filter_table_config.add(:locations, field: :location) filter_table_config.connect(self, :table) @@ -96,15 +107,26 @@ def transformers 'clusterIpv4Cidr' => ->(obj) { return :cluster_ipv4_cidr, obj['clusterIpv4Cidr'] }, 'addonsConfig' => ->(obj) { return :addons_config, GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(obj['addonsConfig'], to_s) }, 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, + 'locations' => ->(obj) { return :locations, obj['locations'] }, + 'resourceLabels' => ->(obj) { return :resource_labels, obj['resourceLabels'] }, + 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, + 'legacyAbac' => ->(obj) { return :legacy_abac, GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(obj['legacyAbac'], to_s) }, + 'networkPolicy' => ->(obj) { return :network_policy, GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(obj['networkPolicy'], to_s) }, + 'defaultMaxPodsConstraint' => ->(obj) { return :default_max_pods_constraint, GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(obj['defaultMaxPodsConstraint'], to_s) }, 'endpoint' => ->(obj) { return :endpoint, obj['endpoint'] }, 'initialClusterVersion' => ->(obj) { return :initial_cluster_version, obj['initialClusterVersion'] }, 'currentMasterVersion' => ->(obj) { return :current_master_version, obj['currentMasterVersion'] }, 'currentNodeVersion' => ->(obj) { return :current_node_version, obj['currentNodeVersion'] }, 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, + 'status' => ->(obj) { return :status, obj['status'] }, + 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, 'nodeIpv4CidrSize' => ->(obj) { return :node_ipv4_cidr_size, obj['nodeIpv4CidrSize'] }, 'servicesIpv4Cidr' => ->(obj) { return :services_ipv4_cidr, obj['servicesIpv4Cidr'] }, 'currentNodeCount' => ->(obj) { return :current_node_count, obj['currentNodeCount'] }, 'expireTime' => ->(obj) { return :expire_time, parse_time_string(obj['expireTime']) }, + 'enableTpu' => ->(obj) { return :enable_tpu, obj['enableTpu'] }, + 'tpuIpv4CidrBlock' => ->(obj) { return :tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock'] }, + 'conditions' => ->(obj) { return :conditions, GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(obj['conditions'], to_s) }, 'location' => ->(obj) { return :location, obj['location'] }, } end