working-config-otel
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
2103
vendor/google.golang.org/api/compute/v0.alpha/compute-api.json
generated
vendored
2103
vendor/google.golang.org/api/compute/v0.alpha/compute-api.json
generated
vendored
File diff suppressed because it is too large
Load Diff
5516
vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go
generated
vendored
5516
vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
3436
vendor/google.golang.org/api/compute/v0.beta/compute-api.json
generated
vendored
3436
vendor/google.golang.org/api/compute/v0.beta/compute-api.json
generated
vendored
File diff suppressed because it is too large
Load Diff
10192
vendor/google.golang.org/api/compute/v0.beta/compute-gen.go
generated
vendored
10192
vendor/google.golang.org/api/compute/v0.beta/compute-gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
1099
vendor/google.golang.org/api/compute/v1/compute-api.json
generated
vendored
1099
vendor/google.golang.org/api/compute/v1/compute-api.json
generated
vendored
File diff suppressed because it is too large
Load Diff
2500
vendor/google.golang.org/api/compute/v1/compute-gen.go
generated
vendored
2500
vendor/google.golang.org/api/compute/v1/compute-gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
317
vendor/google.golang.org/api/container/v1/container-api.json
generated
vendored
317
vendor/google.golang.org/api/container/v1/container-api.json
generated
vendored
@@ -197,6 +197,31 @@
|
||||
"resources": {
|
||||
"clusters": {
|
||||
"methods": {
|
||||
"checkAutopilotCompatibility": {
|
||||
"description": "Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:checkAutopilotCompatibility",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.locations.clusters.checkAutopilotCompatibility",
|
||||
"parameterOrder": [
|
||||
"name"
|
||||
],
|
||||
"parameters": {
|
||||
"name": {
|
||||
"description": "The name (project, location, cluster) of the cluster to retrieve. Specified in the format `projects/*/locations/*/clusters/*`.",
|
||||
"location": "path",
|
||||
"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "v1/{+name}:checkAutopilotCompatibility",
|
||||
"response": {
|
||||
"$ref": "CheckAutopilotCompatibilityResponse"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform"
|
||||
]
|
||||
},
|
||||
"completeIpRotation": {
|
||||
"description": "Completes master IP rotation.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation",
|
||||
@@ -447,6 +472,7 @@
|
||||
]
|
||||
},
|
||||
"setLocations": {
|
||||
"deprecated": true,
|
||||
"description": "Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLocations",
|
||||
"httpMethod": "POST",
|
||||
@@ -1517,6 +1543,7 @@
|
||||
]
|
||||
},
|
||||
"locations": {
|
||||
"deprecated": true,
|
||||
"description": "Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations",
|
||||
"httpMethod": "POST",
|
||||
@@ -2487,7 +2514,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20230222",
|
||||
"revision": "20230519",
|
||||
"rootUrl": "https://container.googleapis.com/",
|
||||
"schemas": {
|
||||
"AcceleratorConfig": {
|
||||
@@ -2514,6 +2541,20 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AdditionalPodRangesConfig": {
|
||||
"description": "AdditionalPodRangesConfig is the configuration for additional pod secondary ranges supporting the ClusterUpdate message.",
|
||||
"id": "AdditionalPodRangesConfig",
|
||||
"properties": {
|
||||
"podRangeNames": {
|
||||
"description": "Name for pod secondary ipv4 range which has the actual range defined ahead.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AddonsConfig": {
|
||||
"description": "Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality.",
|
||||
"id": "AddonsConfig",
|
||||
@@ -2614,6 +2655,53 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AutopilotCompatibilityIssue": {
|
||||
"description": "AutopilotCompatibilityIssue contains information about a specific compatibility issue with Autopilot mode.",
|
||||
"id": "AutopilotCompatibilityIssue",
|
||||
"properties": {
|
||||
"constraintType": {
|
||||
"description": "The constraint type of the issue.",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "The description of the issue.",
|
||||
"type": "string"
|
||||
},
|
||||
"documentationUrl": {
|
||||
"description": "A URL to a public documnetation, which addresses resolving this issue.",
|
||||
"type": "string"
|
||||
},
|
||||
"incompatibilityType": {
|
||||
"description": "The incompatibility type of this issue.",
|
||||
"enum": [
|
||||
"UNSPECIFIED",
|
||||
"INCOMPATIBILITY",
|
||||
"ADDITIONAL_CONFIG_REQUIRED",
|
||||
"PASSED_WITH_OPTIONAL_CONFIG"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Default value, should not be used.",
|
||||
"Indicates that the issue is a known incompatibility between the cluster and Autopilot mode.",
|
||||
"Indicates the issue is an incompatibility if customers take no further action to resolve.",
|
||||
"Indicates the issue is not an incompatibility, but depending on the workloads business logic, there is a potential that they won't work on Autopilot."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"lastObservation": {
|
||||
"description": "The last time when this issue was observed.",
|
||||
"format": "google-datetime",
|
||||
"type": "string"
|
||||
},
|
||||
"subjects": {
|
||||
"description": "The name of the resources which are subject to this issue.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AutoprovisioningNodePoolDefaults": {
|
||||
"description": "AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.",
|
||||
"id": "AutoprovisioningNodePoolDefaults",
|
||||
@@ -2665,6 +2753,22 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"BestEffortProvisioning": {
|
||||
"description": "Best effort provisioning.",
|
||||
"id": "BestEffortProvisioning",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"description": "When this is enabled, cluster/node pool creations will ignore non-fatal errors like stockout to best provision as many nodes as possible right now and eventually bring up all target number of nodes",
|
||||
"type": "boolean"
|
||||
},
|
||||
"minProvisionNodes": {
|
||||
"description": "Minimum number of nodes to be provisioned to be considered as succeeded, and the rest of nodes will be provisioned gradually and eventually when stockout issue has been resolved.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"BigQueryDestination": {
|
||||
"description": "Parameters for using BigQuery as the destination of resource usage export.",
|
||||
"id": "BigQueryDestination",
|
||||
@@ -2793,6 +2897,24 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"CheckAutopilotCompatibilityResponse": {
|
||||
"description": "CheckAutopilotCompatibilityResponse has a list of compatibility issues.",
|
||||
"id": "CheckAutopilotCompatibilityResponse",
|
||||
"properties": {
|
||||
"issues": {
|
||||
"description": "The list of issues for the given operation.",
|
||||
"items": {
|
||||
"$ref": "AutopilotCompatibilityIssue"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"summary": {
|
||||
"description": "The summary of the autopilot compatibility response.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"CidrBlock": {
|
||||
"description": "CidrBlock contains an optional name and one CIDR block.",
|
||||
"id": "CidrBlock",
|
||||
@@ -2916,6 +3038,10 @@
|
||||
"description": "An optional description of this cluster.",
|
||||
"type": "string"
|
||||
},
|
||||
"enableK8sBetaApis": {
|
||||
"$ref": "K8sBetaAPIConfig",
|
||||
"description": "Beta APIs Config"
|
||||
},
|
||||
"enableKubernetesAlpha": {
|
||||
"description": "Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. The cluster has no SLA for uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation.",
|
||||
"type": "boolean"
|
||||
@@ -2936,6 +3062,10 @@
|
||||
"description": "[Output only] The time the cluster will be automatically deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.",
|
||||
"type": "string"
|
||||
},
|
||||
"fleet": {
|
||||
"$ref": "Fleet",
|
||||
"description": "Fleet information for the cluster."
|
||||
},
|
||||
"id": {
|
||||
"description": "Output only. Unique id for the cluster.",
|
||||
"readOnly": true,
|
||||
@@ -3066,7 +3196,7 @@
|
||||
},
|
||||
"releaseChannel": {
|
||||
"$ref": "ReleaseChannel",
|
||||
"description": "Release channel configuration."
|
||||
"description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version."
|
||||
},
|
||||
"resourceLabels": {
|
||||
"additionalProperties": {
|
||||
@@ -3187,6 +3317,10 @@
|
||||
"description": "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.",
|
||||
"id": "ClusterUpdate",
|
||||
"properties": {
|
||||
"additionalPodRangesConfig": {
|
||||
"$ref": "AdditionalPodRangesConfig",
|
||||
"description": "The additional pod ranges to be added to the cluster. These pod ranges can be used by node pools to allocate pod IPs."
|
||||
},
|
||||
"desiredAddonsConfig": {
|
||||
"$ref": "AddonsConfig",
|
||||
"description": "Configurations for the various addons available to run in the cluster."
|
||||
@@ -3233,10 +3367,18 @@
|
||||
"$ref": "DNSConfig",
|
||||
"description": "DNSConfig contains clusterDNS config for this cluster."
|
||||
},
|
||||
"desiredEnableFqdnNetworkPolicy": {
|
||||
"description": "Enable/Disable FQDN Network Policy for the cluster.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"desiredEnablePrivateEndpoint": {
|
||||
"description": "Enable/Disable private endpoint for the cluster's master.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"desiredFleet": {
|
||||
"$ref": "Fleet",
|
||||
"description": "The desired fleet configuration for the cluster."
|
||||
},
|
||||
"desiredGatewayApiConfig": {
|
||||
"$ref": "GatewayAPIConfig",
|
||||
"description": "The desired config of Gateway API on this cluster."
|
||||
@@ -3257,6 +3399,10 @@
|
||||
"$ref": "IntraNodeVisibilityConfig",
|
||||
"description": "The desired config of Intra-node visibility."
|
||||
},
|
||||
"desiredK8sBetaApis": {
|
||||
"$ref": "K8sBetaAPIConfig",
|
||||
"description": "Desired Beta APIs to be enabled for cluster."
|
||||
},
|
||||
"desiredL4ilbSubsettingConfig": {
|
||||
"$ref": "ILBSubsettingConfig",
|
||||
"description": "The desired L4 Internal Load Balancer Subsetting configuration."
|
||||
@@ -3378,9 +3524,17 @@
|
||||
"$ref": "WorkloadIdentityConfig",
|
||||
"description": "Configuration for Workload Identity."
|
||||
},
|
||||
"enableK8sBetaApis": {
|
||||
"$ref": "K8sBetaAPIConfig",
|
||||
"description": "Kubernetes open source beta apis enabled on the cluster. Only beta apis"
|
||||
},
|
||||
"etag": {
|
||||
"description": "The current etag of the cluster. If an etag is provided and does not match the current etag of the cluster, update will be blocked and an ABORTED error will be returned.",
|
||||
"type": "string"
|
||||
},
|
||||
"removedAdditionalPodRangesConfig": {
|
||||
"$ref": "AdditionalPodRangesConfig",
|
||||
"description": "The additional pod ranges that are to be removed from the cluster. The pod ranges specified here must have been specified earlier in the 'additional_pod_ranges_config' argument."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -3571,7 +3725,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "Denotes the state of etcd encryption.",
|
||||
"description": "The desired state of etcd encryption.",
|
||||
"enum": [
|
||||
"UNKNOWN",
|
||||
"ENCRYPTED",
|
||||
@@ -3664,6 +3818,25 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Fleet": {
|
||||
"description": "Fleet is the fleet configuration for the cluster.",
|
||||
"id": "Fleet",
|
||||
"properties": {
|
||||
"membership": {
|
||||
"description": "[Output only] The full resource name of the registered fleet membership of the cluster, in the format `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.",
|
||||
"type": "string"
|
||||
},
|
||||
"preRegistered": {
|
||||
"description": "[Output only] Whether the cluster has been registered through the fleet API.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"project": {
|
||||
"description": "The Fleet host project(project ID or project number) where this cluster will be registered to. This field cannot be changed after the cluster has been registered.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GPUSharingConfig": {
|
||||
"description": "GPUSharingConfig represents the GPU sharing configuration for Hardware Accelerators.",
|
||||
"id": "GPUSharingConfig",
|
||||
@@ -3884,6 +4057,11 @@
|
||||
"description": "Configuration for controlling how IPs are allocated in the cluster.",
|
||||
"id": "IPAllocationPolicy",
|
||||
"properties": {
|
||||
"additionalPodRangesConfig": {
|
||||
"$ref": "AdditionalPodRangesConfig",
|
||||
"description": "Output only. [Output only] The additional pod ranges that are added to the cluster. These pod ranges can be used by new node pools to allocate pod IPs automatically. Once the range is removed it will not show up in IPAllocationPolicy.",
|
||||
"readOnly": true
|
||||
},
|
||||
"clusterIpv4Cidr": {
|
||||
"description": "This field is deprecated, use cluster_ipv4_cidr_block.",
|
||||
"type": "string"
|
||||
@@ -3922,6 +4100,10 @@
|
||||
"description": "The IP address range of the instance IPs in this cluster. This is applicable only if `create_subnetwork` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use.",
|
||||
"type": "string"
|
||||
},
|
||||
"podCidrOverprovisionConfig": {
|
||||
"$ref": "PodCIDROverprovisionConfig",
|
||||
"description": "[PRIVATE FIELD] Pod CIDR size overprovisioning config for the cluster. Pod CIDR size per node depends on max_pods_per_node. By default, the value of max_pods_per_node is doubled and then rounded off to next power of 2 to get the size of pod CIDR block per node. Example: max_pods_per_node of 30 would result in 64 IPs (/26). This config can disable the doubling of IPs (we still round off to next power of 2) Example: max_pods_per_node of 30 will result in 32 IPs (/27) when overprovisioning is disabled."
|
||||
},
|
||||
"servicesIpv4Cidr": {
|
||||
"description": "This field is deprecated, use services_ipv4_cidr_block.",
|
||||
"type": "string"
|
||||
@@ -4042,6 +4224,20 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"K8sBetaAPIConfig": {
|
||||
"description": "K8sBetaAPIConfig , configuration for beta APIs",
|
||||
"id": "K8sBetaAPIConfig",
|
||||
"properties": {
|
||||
"enabledApis": {
|
||||
"description": "Enabled k8s beta APIs.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"KubernetesDashboard": {
|
||||
"description": "Configuration for the Kubernetes Dashboard.",
|
||||
"id": "KubernetesDashboard",
|
||||
@@ -4479,6 +4675,10 @@
|
||||
"$ref": "DNSConfig",
|
||||
"description": "DNSConfig contains clusterDNS config for this cluster."
|
||||
},
|
||||
"enableFqdnNetworkPolicy": {
|
||||
"description": "Whether FQDN Network Policy is enabled on this cluster.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enableIntraNodeVisibility": {
|
||||
"description": "Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network.",
|
||||
"type": "boolean"
|
||||
@@ -4589,6 +4789,38 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"NodeAffinity": {
|
||||
"description": "Specifies the NodeAffinity key, values, and affinity operator according to [shared sole tenant node group affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity).",
|
||||
"id": "NodeAffinity",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "Key for NodeAffinity.",
|
||||
"type": "string"
|
||||
},
|
||||
"operator": {
|
||||
"description": "Operator for NodeAffinity.",
|
||||
"enum": [
|
||||
"OPERATOR_UNSPECIFIED",
|
||||
"IN",
|
||||
"NOT_IN"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Invalid or unspecified affinity operator.",
|
||||
"Affinity operator.",
|
||||
"Anti-affinity operator."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"values": {
|
||||
"description": "Values for NodeAffinity.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"NodeConfig": {
|
||||
"description": "Parameters that describe the nodes in a cluster. GKE Autopilot clusters do not recognize parameters in `NodeConfig`. Use AutoprovisioningNodePoolDefaults instead.",
|
||||
"id": "NodeConfig",
|
||||
@@ -4722,6 +4954,10 @@
|
||||
"$ref": "ShieldedInstanceConfig",
|
||||
"description": "Shielded Instance options."
|
||||
},
|
||||
"soleTenantConfig": {
|
||||
"$ref": "SoleTenantConfig",
|
||||
"description": "Parameters for node pools to be backed by shared sole tenant node groups."
|
||||
},
|
||||
"spot": {
|
||||
"description": "Spot flag for enabling Spot VM, which is a rebrand of the existing preemptible flag.",
|
||||
"type": "boolean"
|
||||
@@ -4839,6 +5075,10 @@
|
||||
"$ref": "NetworkPerformanceConfig",
|
||||
"description": "Network bandwidth tier configuration."
|
||||
},
|
||||
"podCidrOverprovisionConfig": {
|
||||
"$ref": "PodCIDROverprovisionConfig",
|
||||
"description": "[PRIVATE FIELD] Pod CIDR size overprovisioning config for the nodepool. Pod CIDR size per node depends on max_pods_per_node. By default, the value of max_pods_per_node is rounded off to next power of 2 and we then double that to get the size of pod CIDR block per node. Example: max_pods_per_node of 30 would result in 64 IPs (/26). This config can disable the doubling of IPs (we still round off to next power of 2) Example: max_pods_per_node of 30 will result in 32 IPs (/27) when overprovisioning is disabled."
|
||||
},
|
||||
"podIpv4CidrBlock": {
|
||||
"description": "The IP address range for pod IPs in this node pool. Only applicable if `create_pod_range` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) to pick a specific range to use. Only applicable if `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed after the node pool has been created.",
|
||||
"type": "string"
|
||||
@@ -4858,6 +5098,10 @@
|
||||
"$ref": "NodePoolAutoscaling",
|
||||
"description": "Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present."
|
||||
},
|
||||
"bestEffortProvisioning": {
|
||||
"$ref": "BestEffortProvisioning",
|
||||
"description": "Enable best effort provisioning for nodes"
|
||||
},
|
||||
"conditions": {
|
||||
"description": "Which conditions caused the current node pool state.",
|
||||
"items": {
|
||||
@@ -5158,26 +5402,28 @@
|
||||
"SET_MASTER_AUTH",
|
||||
"SET_NODE_POOL_SIZE",
|
||||
"SET_NETWORK_POLICY",
|
||||
"SET_MAINTENANCE_POLICY"
|
||||
"SET_MAINTENANCE_POLICY",
|
||||
"RESIZE_CLUSTER"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Not set.",
|
||||
"Cluster create.",
|
||||
"Cluster delete.",
|
||||
"A master upgrade.",
|
||||
"A node upgrade.",
|
||||
"Cluster repair.",
|
||||
"Cluster update.",
|
||||
"Node pool create.",
|
||||
"Node pool delete.",
|
||||
"Set node pool management.",
|
||||
"Automatic node pool repair.",
|
||||
"Automatic node upgrade.",
|
||||
"Set labels.",
|
||||
"Set/generate master auth materials",
|
||||
"Set node pool size.",
|
||||
"Updates network policy for a cluster.",
|
||||
"Set the maintenance policy."
|
||||
"The cluster is being created. The cluster should be assumed to be unusable until the operation finishes. In the event of the operation failing, the cluster will enter the ERROR state and eventually be deleted.",
|
||||
"The cluster is being deleted. The cluster should be assumed to be unusable as soon as this operation starts. In the event of the operation failing, the cluster will enter the ERROR state and the deletion will be automatically retried until completed.",
|
||||
"The cluster version is being updated. Note that this includes \"upgrades\" to the same version, which are simply a recreation. This also includes [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). For more details, see [documentation on cluster upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades).",
|
||||
"A node pool is being updated. Despite calling this an \"upgrade\", this includes most forms of updates to node pools. This also includes [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). This operation sets the progress field and may be canceled. The upgrade strategy depends on [node pool configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). The nodes are generally still usable during this operation.",
|
||||
"A problem has been detected with the control plane and is being repaired. This operation type is initiated by GKE. For more details, see [documentation on repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).",
|
||||
"The cluster is being updated. This is a broad category of operations and includes operations that only change metadata as well as those that must recreate the entire cluster. If the control plane must be recreated, this will cause temporary downtime for zonal clusters. Some features require recreating the nodes as well. Those will be recreated as separate operations and the update may not be completely functional until the node pools recreations finish. Node recreations will generally follow [maintenance policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). Some GKE-initiated operations use this type. This includes certain types of auto-upgrades and incident mitigations.",
|
||||
"A node pool is being created. The node pool should be assumed to be unusable until this operation finishes. In the event of an error, the node pool may be partially created. If enabled, [node autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) may have automatically initiated such operations.",
|
||||
"The node pool is being deleted. The node pool should be assumed to be unusable as soon as this operation starts.",
|
||||
"The node pool's manamagent field is being updated. These operations only update metadata and may be concurrent with most other operations.",
|
||||
"A problem has been detected with nodes and [they are being repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). This operation type is initiated by GKE, typically automatically. This operation may be concurrent with other operations and there may be multiple repairs occurring on the same node pool.",
|
||||
"Unused. Automatic node upgrade uses UPGRADE_NODES.",
|
||||
"Unused. Updating labels uses UPDATE_CLUSTER.",
|
||||
"Unused. Updating master auth uses UPDATE_CLUSTER.",
|
||||
"The node pool is being resized. With the exception of resizing to or from size zero, the node pool is generally usable during this operation.",
|
||||
"Unused. Updating network policy uses UPDATE_CLUSTER.",
|
||||
"Unused. Updating maintenance policy uses UPDATE_CLUSTER.",
|
||||
"The control plane is being resized. This operation type is initiated by GKE. These operations are often performed preemptively to ensure that the control plane has sufficient resources and is not typically an indication of issues. For more details, see [documentation on resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs)."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@@ -5187,7 +5433,7 @@
|
||||
"readOnly": true
|
||||
},
|
||||
"selfLink": {
|
||||
"description": "Server-defined URL for the resource.",
|
||||
"description": "Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.",
|
||||
"type": "string"
|
||||
},
|
||||
"startTime": {
|
||||
@@ -5218,7 +5464,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"targetLink": {
|
||||
"description": "Server-defined URL for the target of the operation.",
|
||||
"description": "Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`",
|
||||
"type": "string"
|
||||
},
|
||||
"zone": {
|
||||
@@ -5290,6 +5536,17 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"PodCIDROverprovisionConfig": {
|
||||
"description": "[PRIVATE FIELD] Config for pod CIDR size overprovisioning.",
|
||||
"id": "PodCIDROverprovisionConfig",
|
||||
"properties": {
|
||||
"disable": {
|
||||
"description": "Whether Pod CIDR overprovisioning is disabled. Note: Pod CIDR overprovisioning is enabled by default.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"PrivateClusterConfig": {
|
||||
"description": "Configuration options for private clusters.",
|
||||
"id": "PrivateClusterConfig",
|
||||
@@ -6068,6 +6325,20 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"SoleTenantConfig": {
|
||||
"description": "SoleTenantConfig contains the NodeAffinities to specify what shared sole tenant node groups should back the node pool.",
|
||||
"id": "SoleTenantConfig",
|
||||
"properties": {
|
||||
"nodeAffinities": {
|
||||
"description": "NodeAffinities used to match to a shared sole tenant node group.",
|
||||
"items": {
|
||||
"$ref": "NodeAffinity"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"StandardRolloutPolicy": {
|
||||
"description": "Standard rollout policy is the default policy for blue-green.",
|
||||
"id": "StandardRolloutPolicy",
|
||||
@@ -6575,7 +6846,7 @@
|
||||
"enumDescriptions": [
|
||||
"UNKNOWN is the zero value of the Status enum. It's not a valid status.",
|
||||
"UNUSED denotes that this range is unclaimed by any cluster.",
|
||||
"IN_USE_SERVICE denotes that this range is claimed by a cluster for services. It cannot be used for other clusters.",
|
||||
"IN_USE_SERVICE denotes that this range is claimed by cluster(s) for services. User-managed services range can be shared between clusters within the same subnetwork.",
|
||||
"IN_USE_SHAREABLE_POD denotes this range was created by the network admin and is currently claimed by a cluster for pods. It can only be used by other clusters as a pod range.",
|
||||
"IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed for pods. It cannot be used for other clusters."
|
||||
],
|
||||
|
732
vendor/google.golang.org/api/container/v1/container-gen.go
generated
vendored
732
vendor/google.golang.org/api/container/v1/container-gen.go
generated
vendored
@@ -71,6 +71,7 @@ var _ = errors.New
|
||||
var _ = strings.Replace
|
||||
var _ = context.Canceled
|
||||
var _ = internaloption.WithDefaultEndpoint
|
||||
var _ = internal.Version
|
||||
|
||||
const apiId = "container:v1"
|
||||
const apiName = "container"
|
||||
@@ -322,6 +323,37 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// AdditionalPodRangesConfig: AdditionalPodRangesConfig is the
|
||||
// configuration for additional pod secondary ranges supporting the
|
||||
// ClusterUpdate message.
|
||||
type AdditionalPodRangesConfig struct {
|
||||
// PodRangeNames: Name for pod secondary ipv4 range which has the actual
|
||||
// range defined ahead.
|
||||
PodRangeNames []string `json:"podRangeNames,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "PodRangeNames") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "PodRangeNames") to include
|
||||
// in API requests with the JSON null value. By default, fields with
|
||||
// empty values are omitted from API requests. However, any field with
|
||||
// an empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *AdditionalPodRangesConfig) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod AdditionalPodRangesConfig
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// AddonsConfig: Configuration for the addons that can be automatically
|
||||
// spun up in the cluster, enabling additional functionality.
|
||||
type AddonsConfig struct {
|
||||
@@ -531,6 +563,62 @@ func (s *Autopilot) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// AutopilotCompatibilityIssue: AutopilotCompatibilityIssue contains
|
||||
// information about a specific compatibility issue with Autopilot mode.
|
||||
type AutopilotCompatibilityIssue struct {
|
||||
// ConstraintType: The constraint type of the issue.
|
||||
ConstraintType string `json:"constraintType,omitempty"`
|
||||
|
||||
// Description: The description of the issue.
|
||||
Description string `json:"description,omitempty"`
|
||||
|
||||
// DocumentationUrl: A URL to a public documnetation, which addresses
|
||||
// resolving this issue.
|
||||
DocumentationUrl string `json:"documentationUrl,omitempty"`
|
||||
|
||||
// IncompatibilityType: The incompatibility type of this issue.
|
||||
//
|
||||
// Possible values:
|
||||
// "UNSPECIFIED" - Default value, should not be used.
|
||||
// "INCOMPATIBILITY" - Indicates that the issue is a known
|
||||
// incompatibility between the cluster and Autopilot mode.
|
||||
// "ADDITIONAL_CONFIG_REQUIRED" - Indicates the issue is an
|
||||
// incompatibility if customers take no further action to resolve.
|
||||
// "PASSED_WITH_OPTIONAL_CONFIG" - Indicates the issue is not an
|
||||
// incompatibility, but depending on the workloads business logic, there
|
||||
// is a potential that they won't work on Autopilot.
|
||||
IncompatibilityType string `json:"incompatibilityType,omitempty"`
|
||||
|
||||
// LastObservation: The last time when this issue was observed.
|
||||
LastObservation string `json:"lastObservation,omitempty"`
|
||||
|
||||
// Subjects: The name of the resources which are subject to this issue.
|
||||
Subjects []string `json:"subjects,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "ConstraintType") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "ConstraintType") to
|
||||
// include in API requests with the JSON null value. By default, fields
|
||||
// with empty values are omitted from API requests. However, any field
|
||||
// with an empty value appearing in NullFields will be sent to the
|
||||
// server as null. It is an error if a field in this list has a
|
||||
// non-empty value. This may be used to include null fields in Patch
|
||||
// requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *AutopilotCompatibilityIssue) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod AutopilotCompatibilityIssue
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults
|
||||
// contains defaults for a node pool created by NAP.
|
||||
type AutoprovisioningNodePoolDefaults struct {
|
||||
@@ -613,6 +701,42 @@ func (s *AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// BestEffortProvisioning: Best effort provisioning.
|
||||
type BestEffortProvisioning struct {
|
||||
// Enabled: When this is enabled, cluster/node pool creations will
|
||||
// ignore non-fatal errors like stockout to best provision as many nodes
|
||||
// as possible right now and eventually bring up all target number of
|
||||
// nodes
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
|
||||
// MinProvisionNodes: Minimum number of nodes to be provisioned to be
|
||||
// considered as succeeded, and the rest of nodes will be provisioned
|
||||
// gradually and eventually when stockout issue has been resolved.
|
||||
MinProvisionNodes int64 `json:"minProvisionNodes,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Enabled") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Enabled") to include in
|
||||
// API requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *BestEffortProvisioning) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod BestEffortProvisioning
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// BigQueryDestination: Parameters for using BigQuery as the destination
|
||||
// of resource usage export.
|
||||
type BigQueryDestination struct {
|
||||
@@ -826,6 +950,43 @@ func (s *CancelOperationRequest) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// CheckAutopilotCompatibilityResponse:
|
||||
// CheckAutopilotCompatibilityResponse has a list of compatibility
|
||||
// issues.
|
||||
type CheckAutopilotCompatibilityResponse struct {
|
||||
// Issues: The list of issues for the given operation.
|
||||
Issues []*AutopilotCompatibilityIssue `json:"issues,omitempty"`
|
||||
|
||||
// Summary: The summary of the autopilot compatibility response.
|
||||
Summary string `json:"summary,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Issues") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Issues") to include in API
|
||||
// requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *CheckAutopilotCompatibilityResponse) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod CheckAutopilotCompatibilityResponse
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// CidrBlock: CidrBlock contains an optional name and one CIDR block.
|
||||
type CidrBlock struct {
|
||||
// CidrBlock: cidr_block must be specified in CIDR notation.
|
||||
@@ -998,6 +1159,9 @@ type Cluster struct {
|
||||
// Description: An optional description of this cluster.
|
||||
Description string `json:"description,omitempty"`
|
||||
|
||||
// EnableK8sBetaApis: Beta APIs Config
|
||||
EnableK8sBetaApis *K8sBetaAPIConfig `json:"enableK8sBetaApis,omitempty"`
|
||||
|
||||
// EnableKubernetesAlpha: Kubernetes alpha features are enabled on this
|
||||
// cluster. This includes alpha API groups (e.g. v1alpha1) and features
|
||||
// that may not be production ready in the kubernetes version of the
|
||||
@@ -1025,6 +1189,9 @@ type Cluster struct {
|
||||
// format.
|
||||
ExpireTime string `json:"expireTime,omitempty"`
|
||||
|
||||
// Fleet: Fleet information for the cluster.
|
||||
Fleet *Fleet `json:"fleet,omitempty"`
|
||||
|
||||
// Id: Output only. Unique id for the cluster.
|
||||
Id string `json:"id,omitempty"`
|
||||
|
||||
@@ -1190,7 +1357,12 @@ type Cluster struct {
|
||||
// PrivateClusterConfig: Configuration for private cluster.
|
||||
PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"`
|
||||
|
||||
// ReleaseChannel: Release channel configuration.
|
||||
// ReleaseChannel: Release channel configuration. If left unspecified on
|
||||
// cluster creation and a version is specified, the cluster is enrolled
|
||||
// in the most mature release channel where the version is available
|
||||
// (first checking STABLE, then REGULAR, and finally RAPID). Otherwise,
|
||||
// if no release channel configuration and no version is specified, the
|
||||
// cluster is enrolled in the REGULAR channel with its default version.
|
||||
ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"`
|
||||
|
||||
// ResourceLabels: The resource labels for the cluster to use to
|
||||
@@ -1352,6 +1524,11 @@ func (s *ClusterAutoscaling) MarshalJSON() ([]byte, error) {
|
||||
// Exactly one update can be applied to a cluster with each request, so
|
||||
// at most one field can be provided.
|
||||
type ClusterUpdate struct {
|
||||
// AdditionalPodRangesConfig: The additional pod ranges to be added to
|
||||
// the cluster. These pod ranges can be used by node pools to allocate
|
||||
// pod IPs.
|
||||
AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"`
|
||||
|
||||
// DesiredAddonsConfig: Configurations for the various addons available
|
||||
// to run in the cluster.
|
||||
DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"`
|
||||
@@ -1395,10 +1572,17 @@ type ClusterUpdate struct {
|
||||
// cluster.
|
||||
DesiredDnsConfig *DNSConfig `json:"desiredDnsConfig,omitempty"`
|
||||
|
||||
// DesiredEnableFqdnNetworkPolicy: Enable/Disable FQDN Network Policy
|
||||
// for the cluster.
|
||||
DesiredEnableFqdnNetworkPolicy bool `json:"desiredEnableFqdnNetworkPolicy,omitempty"`
|
||||
|
||||
// DesiredEnablePrivateEndpoint: Enable/Disable private endpoint for the
|
||||
// cluster's master.
|
||||
DesiredEnablePrivateEndpoint bool `json:"desiredEnablePrivateEndpoint,omitempty"`
|
||||
|
||||
// DesiredFleet: The desired fleet configuration for the cluster.
|
||||
DesiredFleet *Fleet `json:"desiredFleet,omitempty"`
|
||||
|
||||
// DesiredGatewayApiConfig: The desired config of Gateway API on this
|
||||
// cluster.
|
||||
DesiredGatewayApiConfig *GatewayAPIConfig `json:"desiredGatewayApiConfig,omitempty"`
|
||||
@@ -1418,6 +1602,9 @@ type ClusterUpdate struct {
|
||||
// visibility.
|
||||
DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `json:"desiredIntraNodeVisibilityConfig,omitempty"`
|
||||
|
||||
// DesiredK8sBetaApis: Desired Beta APIs to be enabled for cluster.
|
||||
DesiredK8sBetaApis *K8sBetaAPIConfig `json:"desiredK8sBetaApis,omitempty"`
|
||||
|
||||
// DesiredL4ilbSubsettingConfig: The desired L4 Internal Load Balancer
|
||||
// Subsetting configuration.
|
||||
DesiredL4ilbSubsettingConfig *ILBSubsettingConfig `json:"desiredL4ilbSubsettingConfig,omitempty"`
|
||||
@@ -1560,26 +1747,37 @@ type ClusterUpdate struct {
|
||||
// DesiredWorkloadIdentityConfig: Configuration for Workload Identity.
|
||||
DesiredWorkloadIdentityConfig *WorkloadIdentityConfig `json:"desiredWorkloadIdentityConfig,omitempty"`
|
||||
|
||||
// EnableK8sBetaApis: Kubernetes open source beta apis enabled on the
|
||||
// cluster. Only beta apis
|
||||
EnableK8sBetaApis *K8sBetaAPIConfig `json:"enableK8sBetaApis,omitempty"`
|
||||
|
||||
// Etag: The current etag of the cluster. If an etag is provided and
|
||||
// does not match the current etag of the cluster, update will be
|
||||
// blocked and an ABORTED error will be returned.
|
||||
Etag string `json:"etag,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig")
|
||||
// to unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
// RemovedAdditionalPodRangesConfig: The additional pod ranges that are
|
||||
// to be removed from the cluster. The pod ranges specified here must
|
||||
// have been specified earlier in the 'additional_pod_ranges_config'
|
||||
// argument.
|
||||
RemovedAdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"removedAdditionalPodRangesConfig,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g.
|
||||
// "AdditionalPodRangesConfig") to unconditionally include in API
|
||||
// requests. By default, fields with empty or default values are omitted
|
||||
// from API requests. However, any non-pointer, non-interface field
|
||||
// appearing in ForceSendFields will be sent to the server regardless of
|
||||
// whether the field is empty or not. This may be used to include empty
|
||||
// fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "DesiredAddonsConfig") to
|
||||
// include in API requests with the JSON null value. By default, fields
|
||||
// with empty values are omitted from API requests. However, any field
|
||||
// with an empty value appearing in NullFields will be sent to the
|
||||
// server as null. It is an error if a field in this list has a
|
||||
// non-empty value. This may be used to include null fields in Patch
|
||||
// requests.
|
||||
// NullFields is a list of field names (e.g.
|
||||
// "AdditionalPodRangesConfig") to include in API requests with the JSON
|
||||
// null value. By default, fields with empty values are omitted from API
|
||||
// requests. However, any field with an empty value appearing in
|
||||
// NullFields will be sent to the server as null. It is an error if a
|
||||
// field in this list has a non-empty value. This may be used to include
|
||||
// null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
@@ -1952,7 +2150,7 @@ type DatabaseEncryption struct {
|
||||
// y
|
||||
KeyName string `json:"keyName,omitempty"`
|
||||
|
||||
// State: Denotes the state of etcd encryption.
|
||||
// State: The desired state of etcd encryption.
|
||||
//
|
||||
// Possible values:
|
||||
// "UNKNOWN" - Should never be set
|
||||
@@ -2155,6 +2353,45 @@ func (s *Filter) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// Fleet: Fleet is the fleet configuration for the cluster.
|
||||
type Fleet struct {
|
||||
// Membership: [Output only] The full resource name of the registered
|
||||
// fleet membership of the cluster, in the format
|
||||
// `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.
|
||||
Membership string `json:"membership,omitempty"`
|
||||
|
||||
// PreRegistered: [Output only] Whether the cluster has been registered
|
||||
// through the fleet API.
|
||||
PreRegistered bool `json:"preRegistered,omitempty"`
|
||||
|
||||
// Project: The Fleet host project(project ID or project number) where
|
||||
// this cluster will be registered to. This field cannot be changed
|
||||
// after the cluster has been registered.
|
||||
Project string `json:"project,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Membership") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Membership") to include in
|
||||
// API requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *Fleet) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod Fleet
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// GPUSharingConfig: GPUSharingConfig represents the GPU sharing
|
||||
// configuration for Hardware Accelerators.
|
||||
type GPUSharingConfig struct {
|
||||
@@ -2576,6 +2813,12 @@ func (s *ILBSubsettingConfig) MarshalJSON() ([]byte, error) {
|
||||
// IPAllocationPolicy: Configuration for controlling how IPs are
|
||||
// allocated in the cluster.
|
||||
type IPAllocationPolicy struct {
|
||||
// AdditionalPodRangesConfig: Output only. [Output only] The additional
|
||||
// pod ranges that are added to the cluster. These pod ranges can be
|
||||
// used by new node pools to allocate pod IPs automatically. Once the
|
||||
// range is removed it will not show up in IPAllocationPolicy.
|
||||
AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"`
|
||||
|
||||
// ClusterIpv4Cidr: This field is deprecated, use
|
||||
// cluster_ipv4_cidr_block.
|
||||
ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"`
|
||||
@@ -2630,6 +2873,17 @@ type IPAllocationPolicy struct {
|
||||
// specific range to use.
|
||||
NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"`
|
||||
|
||||
// PodCidrOverprovisionConfig: [PRIVATE FIELD] Pod CIDR size
|
||||
// overprovisioning config for the cluster. Pod CIDR size per node
|
||||
// depends on max_pods_per_node. By default, the value of
|
||||
// max_pods_per_node is doubled and then rounded off to next power of 2
|
||||
// to get the size of pod CIDR block per node. Example:
|
||||
// max_pods_per_node of 30 would result in 64 IPs (/26). This config can
|
||||
// disable the doubling of IPs (we still round off to next power of 2)
|
||||
// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
|
||||
// overprovisioning is disabled.
|
||||
PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `json:"podCidrOverprovisionConfig,omitempty"`
|
||||
|
||||
// ServicesIpv4Cidr: This field is deprecated, use
|
||||
// services_ipv4_cidr_block.
|
||||
ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"`
|
||||
@@ -2699,21 +2953,22 @@ type IPAllocationPolicy struct {
|
||||
// false, then the server picks the default IP allocation mode
|
||||
UseRoutes bool `json:"useRoutes,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "ClusterIpv4Cidr") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
// ForceSendFields is a list of field names (e.g.
|
||||
// "AdditionalPodRangesConfig") to unconditionally include in API
|
||||
// requests. By default, fields with empty or default values are omitted
|
||||
// from API requests. However, any non-pointer, non-interface field
|
||||
// appearing in ForceSendFields will be sent to the server regardless of
|
||||
// whether the field is empty or not. This may be used to include empty
|
||||
// fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "ClusterIpv4Cidr") to
|
||||
// include in API requests with the JSON null value. By default, fields
|
||||
// with empty values are omitted from API requests. However, any field
|
||||
// with an empty value appearing in NullFields will be sent to the
|
||||
// server as null. It is an error if a field in this list has a
|
||||
// non-empty value. This may be used to include null fields in Patch
|
||||
// requests.
|
||||
// NullFields is a list of field names (e.g.
|
||||
// "AdditionalPodRangesConfig") to include in API requests with the JSON
|
||||
// null value. By default, fields with empty values are omitted from API
|
||||
// requests. However, any field with an empty value appearing in
|
||||
// NullFields will be sent to the server as null. It is an error if a
|
||||
// field in this list has a non-empty value. This may be used to include
|
||||
// null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
@@ -2834,6 +3089,34 @@ func (s *Jwk) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// K8sBetaAPIConfig: K8sBetaAPIConfig , configuration for beta APIs
|
||||
type K8sBetaAPIConfig struct {
|
||||
// EnabledApis: Enabled k8s beta APIs.
|
||||
EnabledApis []string `json:"enabledApis,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "EnabledApis") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "EnabledApis") to include
|
||||
// in API requests with the JSON null value. By default, fields with
|
||||
// empty values are omitted from API requests. However, any field with
|
||||
// an empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *K8sBetaAPIConfig) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod K8sBetaAPIConfig
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// KubernetesDashboard: Configuration for the Kubernetes Dashboard.
|
||||
type KubernetesDashboard struct {
|
||||
// Disabled: Whether the Kubernetes Dashboard is enabled for this
|
||||
@@ -3696,6 +3979,10 @@ type NetworkConfig struct {
|
||||
// DnsConfig: DNSConfig contains clusterDNS config for this cluster.
|
||||
DnsConfig *DNSConfig `json:"dnsConfig,omitempty"`
|
||||
|
||||
// EnableFqdnNetworkPolicy: Whether FQDN Network Policy is enabled on
|
||||
// this cluster.
|
||||
EnableFqdnNetworkPolicy bool `json:"enableFqdnNetworkPolicy,omitempty"`
|
||||
|
||||
// EnableIntraNodeVisibility: Whether Intra-node visibility is enabled
|
||||
// for this cluster. This makes same node pod to pod traffic visible for
|
||||
// VPC network.
|
||||
@@ -3895,6 +4182,47 @@ func (s *NetworkTags) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// NodeAffinity: Specifies the NodeAffinity key, values, and affinity
|
||||
// operator according to shared sole tenant node group affinities
|
||||
// (https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity).
|
||||
type NodeAffinity struct {
|
||||
// Key: Key for NodeAffinity.
|
||||
Key string `json:"key,omitempty"`
|
||||
|
||||
// Operator: Operator for NodeAffinity.
|
||||
//
|
||||
// Possible values:
|
||||
// "OPERATOR_UNSPECIFIED" - Invalid or unspecified affinity operator.
|
||||
// "IN" - Affinity operator.
|
||||
// "NOT_IN" - Anti-affinity operator.
|
||||
Operator string `json:"operator,omitempty"`
|
||||
|
||||
// Values: Values for NodeAffinity.
|
||||
Values []string `json:"values,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Key") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Key") to include in API
|
||||
// requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *NodeAffinity) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod NodeAffinity
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// NodeConfig: Parameters that describe the nodes in a cluster. GKE
|
||||
// Autopilot clusters do not recognize parameters in `NodeConfig`. Use
|
||||
// AutoprovisioningNodePoolDefaults instead.
|
||||
@@ -4057,6 +4385,10 @@ type NodeConfig struct {
|
||||
// ShieldedInstanceConfig: Shielded Instance options.
|
||||
ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
|
||||
|
||||
// SoleTenantConfig: Parameters for node pools to be backed by shared
|
||||
// sole tenant node groups.
|
||||
SoleTenantConfig *SoleTenantConfig `json:"soleTenantConfig,omitempty"`
|
||||
|
||||
// Spot: Spot flag for enabling Spot VM, which is a rebrand of the
|
||||
// existing preemptible flag.
|
||||
Spot bool `json:"spot,omitempty"`
|
||||
@@ -4282,6 +4614,17 @@ type NodeNetworkConfig struct {
|
||||
// NetworkPerformanceConfig: Network bandwidth tier configuration.
|
||||
NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"`
|
||||
|
||||
// PodCidrOverprovisionConfig: [PRIVATE FIELD] Pod CIDR size
|
||||
// overprovisioning config for the nodepool. Pod CIDR size per node
|
||||
// depends on max_pods_per_node. By default, the value of
|
||||
// max_pods_per_node is rounded off to next power of 2 and we then
|
||||
// double that to get the size of pod CIDR block per node. Example:
|
||||
// max_pods_per_node of 30 would result in 64 IPs (/26). This config can
|
||||
// disable the doubling of IPs (we still round off to next power of 2)
|
||||
// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
|
||||
// overprovisioning is disabled.
|
||||
PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `json:"podCidrOverprovisionConfig,omitempty"`
|
||||
|
||||
// PodIpv4CidrBlock: The IP address range for pod IPs in this node pool.
|
||||
// Only applicable if `create_pod_range` is true. Set to blank to have a
|
||||
// range chosen with the default size. Set to /netmask (e.g. `/14`) to
|
||||
@@ -4335,6 +4678,9 @@ type NodePool struct {
|
||||
// is enabled only if a valid configuration is present.
|
||||
Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"`
|
||||
|
||||
// BestEffortProvisioning: Enable best effort provisioning for nodes
|
||||
BestEffortProvisioning *BestEffortProvisioning `json:"bestEffortProvisioning,omitempty"`
|
||||
|
||||
// Conditions: Which conditions caused the current node pool state.
|
||||
Conditions []*StatusCondition `json:"conditions,omitempty"`
|
||||
|
||||
@@ -4752,29 +5098,95 @@ type Operation struct {
|
||||
//
|
||||
// Possible values:
|
||||
// "TYPE_UNSPECIFIED" - Not set.
|
||||
// "CREATE_CLUSTER" - Cluster create.
|
||||
// "DELETE_CLUSTER" - Cluster delete.
|
||||
// "UPGRADE_MASTER" - A master upgrade.
|
||||
// "UPGRADE_NODES" - A node upgrade.
|
||||
// "REPAIR_CLUSTER" - Cluster repair.
|
||||
// "UPDATE_CLUSTER" - Cluster update.
|
||||
// "CREATE_NODE_POOL" - Node pool create.
|
||||
// "DELETE_NODE_POOL" - Node pool delete.
|
||||
// "SET_NODE_POOL_MANAGEMENT" - Set node pool management.
|
||||
// "AUTO_REPAIR_NODES" - Automatic node pool repair.
|
||||
// "AUTO_UPGRADE_NODES" - Automatic node upgrade.
|
||||
// "SET_LABELS" - Set labels.
|
||||
// "SET_MASTER_AUTH" - Set/generate master auth materials
|
||||
// "SET_NODE_POOL_SIZE" - Set node pool size.
|
||||
// "SET_NETWORK_POLICY" - Updates network policy for a cluster.
|
||||
// "SET_MAINTENANCE_POLICY" - Set the maintenance policy.
|
||||
// "CREATE_CLUSTER" - The cluster is being created. The cluster should
|
||||
// be assumed to be unusable until the operation finishes. In the event
|
||||
// of the operation failing, the cluster will enter the ERROR state and
|
||||
// eventually be deleted.
|
||||
// "DELETE_CLUSTER" - The cluster is being deleted. The cluster should
|
||||
// be assumed to be unusable as soon as this operation starts. In the
|
||||
// event of the operation failing, the cluster will enter the ERROR
|
||||
// state and the deletion will be automatically retried until completed.
|
||||
// "UPGRADE_MASTER" - The cluster version is being updated. Note that
|
||||
// this includes "upgrades" to the same version, which are simply a
|
||||
// recreation. This also includes
|
||||
// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concep
|
||||
// ts/cluster-upgrades#upgrading_automatically). For more details, see
|
||||
// [documentation on cluster
|
||||
// upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/clu
|
||||
// ster-upgrades#cluster_upgrades).
|
||||
// "UPGRADE_NODES" - A node pool is being updated. Despite calling
|
||||
// this an "upgrade", this includes most forms of updates to node pools.
|
||||
// This also includes
|
||||
// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to
|
||||
// /node-auto-upgrades). This operation sets the progress field and may
|
||||
// be canceled. The upgrade strategy depends on [node pool
|
||||
// configuration](https://cloud.google.com/kubernetes-engine/docs/concept
|
||||
// s/node-pool-upgrade-strategies). The nodes are generally still usable
|
||||
// during this operation.
|
||||
// "REPAIR_CLUSTER" - A problem has been detected with the control
|
||||
// plane and is being repaired. This operation type is initiated by GKE.
|
||||
// For more details, see [documentation on
|
||||
// repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/main
|
||||
// tenance-windows-and-exclusions#repairs).
|
||||
// "UPDATE_CLUSTER" - The cluster is being updated. This is a broad
|
||||
// category of operations and includes operations that only change
|
||||
// metadata as well as those that must recreate the entire cluster. If
|
||||
// the control plane must be recreated, this will cause temporary
|
||||
// downtime for zonal clusters. Some features require recreating the
|
||||
// nodes as well. Those will be recreated as separate operations and the
|
||||
// update may not be completely functional until the node pools
|
||||
// recreations finish. Node recreations will generally follow
|
||||
// [maintenance
|
||||
// policies](https://cloud.google.com/kubernetes-engine/docs/concepts/mai
|
||||
// ntenance-windows-and-exclusions). Some GKE-initiated operations use
|
||||
// this type. This includes certain types of auto-upgrades and incident
|
||||
// mitigations.
|
||||
// "CREATE_NODE_POOL" - A node pool is being created. The node pool
|
||||
// should be assumed to be unusable until this operation finishes. In
|
||||
// the event of an error, the node pool may be partially created. If
|
||||
// enabled, [node
|
||||
// autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-
|
||||
// to/node-auto-provisioning) may have automatically initiated such
|
||||
// operations.
|
||||
// "DELETE_NODE_POOL" - The node pool is being deleted. The node pool
|
||||
// should be assumed to be unusable as soon as this operation starts.
|
||||
// "SET_NODE_POOL_MANAGEMENT" - The node pool's manamagent field is
|
||||
// being updated. These operations only update metadata and may be
|
||||
// concurrent with most other operations.
|
||||
// "AUTO_REPAIR_NODES" - A problem has been detected with nodes and
|
||||
// [they are being
|
||||
// repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-
|
||||
// auto-repair). This operation type is initiated by GKE, typically
|
||||
// automatically. This operation may be concurrent with other operations
|
||||
// and there may be multiple repairs occurring on the same node pool.
|
||||
// "AUTO_UPGRADE_NODES" - Unused. Automatic node upgrade uses
|
||||
// UPGRADE_NODES.
|
||||
// "SET_LABELS" - Unused. Updating labels uses UPDATE_CLUSTER.
|
||||
// "SET_MASTER_AUTH" - Unused. Updating master auth uses
|
||||
// UPDATE_CLUSTER.
|
||||
// "SET_NODE_POOL_SIZE" - The node pool is being resized. With the
|
||||
// exception of resizing to or from size zero, the node pool is
|
||||
// generally usable during this operation.
|
||||
// "SET_NETWORK_POLICY" - Unused. Updating network policy uses
|
||||
// UPDATE_CLUSTER.
|
||||
// "SET_MAINTENANCE_POLICY" - Unused. Updating maintenance policy uses
|
||||
// UPDATE_CLUSTER.
|
||||
// "RESIZE_CLUSTER" - The control plane is being resized. This
|
||||
// operation type is initiated by GKE. These operations are often
|
||||
// performed preemptively to ensure that the control plane has
|
||||
// sufficient resources and is not typically an indication of issues.
|
||||
// For more details, see [documentation on
|
||||
// resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/main
|
||||
// tenance-windows-and-exclusions#repairs).
|
||||
OperationType string `json:"operationType,omitempty"`
|
||||
|
||||
// Progress: Output only. [Output only] Progress information for an
|
||||
// operation.
|
||||
Progress *OperationProgress `json:"progress,omitempty"`
|
||||
|
||||
// SelfLink: Server-defined URL for the resource.
|
||||
// SelfLink: Server-defined URI for the operation. Example:
|
||||
// `https://container.googleapis.com/v1alpha1/projects/123/locations/us-c
|
||||
// entral1/operations/operation-123`.
|
||||
SelfLink string `json:"selfLink,omitempty"`
|
||||
|
||||
// StartTime: [Output only] The time the operation started, in RFC3339
|
||||
@@ -4795,7 +5207,17 @@ type Operation struct {
|
||||
// description of the error. Deprecated. Use the field error instead.
|
||||
StatusMessage string `json:"statusMessage,omitempty"`
|
||||
|
||||
// TargetLink: Server-defined URL for the target of the operation.
|
||||
// TargetLink: Server-defined URI for the target of the operation. The
|
||||
// format of this is a URI to the resource being modified (such as a
|
||||
// cluster, node pool, or node). For node pool repairs, there may be
|
||||
// multiple nodes being repaired, but only one will be the target.
|
||||
// Examples: - ##
|
||||
// `https://container.googleapis.com/v1/projects/123/locations/us-central
|
||||
// 1/clusters/my-cluster` ##
|
||||
// `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/
|
||||
// clusters/my-cluster/nodePools/my-np`
|
||||
// `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/
|
||||
// clusters/my-cluster/nodePools/my-np/node/my-node`
|
||||
TargetLink string `json:"targetLink,omitempty"`
|
||||
|
||||
// Zone: The name of the Google Compute Engine zone
|
||||
@@ -4917,6 +5339,36 @@ func (s *PlacementPolicy) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// PodCIDROverprovisionConfig: [PRIVATE FIELD] Config for pod CIDR size
|
||||
// overprovisioning.
|
||||
type PodCIDROverprovisionConfig struct {
|
||||
// Disable: Whether Pod CIDR overprovisioning is disabled. Note: Pod
|
||||
// CIDR overprovisioning is enabled by default.
|
||||
Disable bool `json:"disable,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Disable") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Disable") to include in
|
||||
// API requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *PodCIDROverprovisionConfig) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod PodCIDROverprovisionConfig
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// PrivateClusterConfig: Configuration options for private clusters.
|
||||
type PrivateClusterConfig struct {
|
||||
// EnablePrivateEndpoint: Whether the master's internal IP address is
|
||||
@@ -6306,6 +6758,38 @@ func (s *ShieldedNodes) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// SoleTenantConfig: SoleTenantConfig contains the NodeAffinities to
|
||||
// specify what shared sole tenant node groups should back the node
|
||||
// pool.
|
||||
type SoleTenantConfig struct {
|
||||
// NodeAffinities: NodeAffinities used to match to a shared sole tenant
|
||||
// node group.
|
||||
NodeAffinities []*NodeAffinity `json:"nodeAffinities,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "NodeAffinities") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
// sent to the server regardless of whether the field is empty or not.
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "NodeAffinities") to
|
||||
// include in API requests with the JSON null value. By default, fields
|
||||
// with empty values are omitted from API requests. However, any field
|
||||
// with an empty value appearing in NullFields will be sent to the
|
||||
// server as null. It is an error if a field in this list has a
|
||||
// non-empty value. This may be used to include null fields in Patch
|
||||
// requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *SoleTenantConfig) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod SoleTenantConfig
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// StandardRolloutPolicy: Standard rollout policy is the default policy
|
||||
// for blue-green.
|
||||
type StandardRolloutPolicy struct {
|
||||
@@ -7153,8 +7637,8 @@ type UsableSubnetworkSecondaryRange struct {
|
||||
// "UNUSED" - UNUSED denotes that this range is unclaimed by any
|
||||
// cluster.
|
||||
// "IN_USE_SERVICE" - IN_USE_SERVICE denotes that this range is
|
||||
// claimed by a cluster for services. It cannot be used for other
|
||||
// clusters.
|
||||
// claimed by cluster(s) for services. User-managed services range can
|
||||
// be shared between clusters within the same subnetwork.
|
||||
// "IN_USE_SHAREABLE_POD" - IN_USE_SHAREABLE_POD denotes this range
|
||||
// was created by the network admin and is currently claimed by a
|
||||
// cluster for pods. It can only be used by other clusters as a pod
|
||||
@@ -7742,6 +8226,156 @@ func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption)
|
||||
|
||||
}
|
||||
|
||||
// method id "container.projects.locations.clusters.checkAutopilotCompatibility":
|
||||
|
||||
type ProjectsLocationsClustersCheckAutopilotCompatibilityCall struct {
|
||||
s *Service
|
||||
name string
|
||||
urlParams_ gensupport.URLParams
|
||||
ifNoneMatch_ string
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// CheckAutopilotCompatibility: Checks the cluster compatibility with
|
||||
// Autopilot mode, and returns a list of compatibility issues.
|
||||
//
|
||||
// - name: The name (project, location, cluster) of the cluster to
|
||||
// retrieve. Specified in the format
|
||||
// `projects/*/locations/*/clusters/*`.
|
||||
func (r *ProjectsLocationsClustersService) CheckAutopilotCompatibility(name string) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall {
|
||||
c := &ProjectsLocationsClustersCheckAutopilotCompatibilityCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// IfNoneMatch sets the optional parameter which makes the operation
|
||||
// fail if the object's ETag matches the given value. This is useful for
|
||||
// getting updates only after the object has changed since the last
|
||||
// request. Use googleapi.IsNotModified to check whether the response
|
||||
// error from Do is the result of In-None-Match.
|
||||
func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall {
|
||||
c.ifNoneMatch_ = entityTag
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Context(ctx context.Context) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
if c.ifNoneMatch_ != "" {
|
||||
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:checkAutopilotCompatibility")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"name": c.name,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "container.projects.locations.clusters.checkAutopilotCompatibility" call.
|
||||
// Exactly one of *CheckAutopilotCompatibilityResponse or error will be
|
||||
// non-nil. Any non-2xx status code is an error. Response headers are in
|
||||
// either *CheckAutopilotCompatibilityResponse.ServerResponse.Header or
|
||||
// (if a response was returned at all) in
|
||||
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
|
||||
// whether the returned error was because http.StatusNotModified was
|
||||
// returned.
|
||||
func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Do(opts ...googleapi.CallOption) (*CheckAutopilotCompatibilityResponse, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, gensupport.WrapError(&googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, gensupport.WrapError(err)
|
||||
}
|
||||
ret := &CheckAutopilotCompatibilityResponse{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := gensupport.DecodeResponse(target, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.",
|
||||
// "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:checkAutopilotCompatibility",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "container.projects.locations.clusters.checkAutopilotCompatibility",
|
||||
// "parameterOrder": [
|
||||
// "name"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "name": {
|
||||
// "description": "The name (project, location, cluster) of the cluster to retrieve. Specified in the format `projects/*/locations/*/clusters/*`.",
|
||||
// "location": "path",
|
||||
// "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "v1/{+name}:checkAutopilotCompatibility",
|
||||
// "response": {
|
||||
// "$ref": "CheckAutopilotCompatibilityResponse"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "container.projects.locations.clusters.completeIpRotation":
|
||||
|
||||
type ProjectsLocationsClustersCompleteIpRotationCall struct {
|
||||
@@ -9138,6 +9772,7 @@ func (c *ProjectsLocationsClustersSetLocationsCall) Do(opts ...googleapi.CallOpt
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "deprecated": true,
|
||||
// "description": "Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.",
|
||||
// "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLocations",
|
||||
// "httpMethod": "POST",
|
||||
@@ -14247,6 +14882,7 @@ func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (*
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "deprecated": true,
|
||||
// "description": "Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.",
|
||||
// "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations",
|
||||
// "httpMethod": "POST",
|
||||
|
5
vendor/google.golang.org/api/googleapi/googleapi.go
generated
vendored
5
vendor/google.golang.org/api/googleapi/googleapi.go
generated
vendored
@@ -11,7 +11,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
@@ -144,7 +143,7 @@ func CheckResponse(res *http.Response) error {
|
||||
if res.StatusCode >= 200 && res.StatusCode <= 299 {
|
||||
return nil
|
||||
}
|
||||
slurp, err := ioutil.ReadAll(res.Body)
|
||||
slurp, err := io.ReadAll(res.Body)
|
||||
if err == nil {
|
||||
jerr := new(errorReply)
|
||||
err = json.Unmarshal(slurp, jerr)
|
||||
@@ -184,7 +183,7 @@ func CheckMediaResponse(res *http.Response) error {
|
||||
if res.StatusCode >= 200 && res.StatusCode <= 299 {
|
||||
return nil
|
||||
}
|
||||
slurp, _ := ioutil.ReadAll(io.LimitReader(res.Body, 1<<20))
|
||||
slurp, _ := io.ReadAll(io.LimitReader(res.Body, 1<<20))
|
||||
return &Error{
|
||||
Code: res.StatusCode,
|
||||
Body: string(slurp),
|
||||
|
282
vendor/google.golang.org/api/internal/cba.go
generated
vendored
Normal file
282
vendor/google.golang.org/api/internal/cba.go
generated
vendored
Normal file
@@ -0,0 +1,282 @@
|
||||
// Copyright 2020 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// cba.go (certificate-based access) contains utils for implementing Device Certificate
|
||||
// Authentication according to https://google.aip.dev/auth/4114 and Default Credentials
|
||||
// for Google Cloud Virtual Environments according to https://google.aip.dev/auth/4115.
|
||||
//
|
||||
// The overall logic for DCA is as follows:
|
||||
// 1. If both endpoint override and client certificate are specified, use them as is.
|
||||
// 2. If user does not specify client certificate, we will attempt to use default
|
||||
// client certificate.
|
||||
// 3. If user does not specify endpoint override, we will use defaultMtlsEndpoint if
|
||||
// client certificate is available and defaultEndpoint otherwise.
|
||||
//
|
||||
// Implications of the above logic:
|
||||
// 1. If the user specifies a non-mTLS endpoint override but client certificate is
|
||||
// available, we will pass along the cert anyway and let the server decide what to do.
|
||||
// 2. If the user specifies an mTLS endpoint override but client certificate is not
|
||||
// available, we will not fail-fast, but let backend throw error when connecting.
|
||||
//
|
||||
// If running within Google's cloud environment, and client certificate is not specified
|
||||
// and not available through DCA, we will try mTLS with credentials held by
|
||||
// the Secure Session Agent, which is part of Google's cloud infrastructure.
|
||||
//
|
||||
// We would like to avoid introducing client-side logic that parses whether the
|
||||
// endpoint override is an mTLS url, since the url pattern may change at anytime.
|
||||
//
|
||||
// This package is not intended for use by end developers. Use the
|
||||
// google.golang.org/api/option package to configure API clients.
|
||||
|
||||
// Package internal supports the options and transport packages.
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"net"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/google/s2a-go"
|
||||
"github.com/google/s2a-go/fallback"
|
||||
"google.golang.org/api/internal/cert"
|
||||
"google.golang.org/grpc/credentials"
|
||||
)
|
||||
|
||||
const (
|
||||
mTLSModeAlways = "always"
|
||||
mTLSModeNever = "never"
|
||||
mTLSModeAuto = "auto"
|
||||
|
||||
// Experimental: if true, the code will try MTLS with S2A as the default for transport security. Default value is false.
|
||||
googleAPIUseS2AEnv = "EXPERIMENTAL_GOOGLE_API_USE_S2A"
|
||||
)
|
||||
|
||||
// getClientCertificateSourceAndEndpoint is a convenience function that invokes
|
||||
// getClientCertificateSource and getEndpoint sequentially and returns the client
|
||||
// cert source and endpoint as a tuple.
|
||||
func getClientCertificateSourceAndEndpoint(settings *DialSettings) (cert.Source, string, error) {
|
||||
clientCertSource, err := getClientCertificateSource(settings)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
endpoint, err := getEndpoint(settings, clientCertSource)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
return clientCertSource, endpoint, nil
|
||||
}
|
||||
|
||||
type transportConfig struct {
|
||||
clientCertSource cert.Source // The client certificate source.
|
||||
endpoint string // The corresponding endpoint to use based on client certificate source.
|
||||
s2aAddress string // The S2A address if it can be used, otherwise an empty string.
|
||||
s2aMTLSEndpoint string // The MTLS endpoint to use with S2A.
|
||||
}
|
||||
|
||||
func getTransportConfig(settings *DialSettings) (*transportConfig, error) {
|
||||
clientCertSource, endpoint, err := getClientCertificateSourceAndEndpoint(settings)
|
||||
if err != nil {
|
||||
return &transportConfig{
|
||||
clientCertSource: nil, endpoint: "", s2aAddress: "", s2aMTLSEndpoint: "",
|
||||
}, err
|
||||
}
|
||||
defaultTransportConfig := transportConfig{
|
||||
clientCertSource: clientCertSource,
|
||||
endpoint: endpoint,
|
||||
s2aAddress: "",
|
||||
s2aMTLSEndpoint: "",
|
||||
}
|
||||
|
||||
// Check the env to determine whether to use S2A.
|
||||
if !isGoogleS2AEnabled() {
|
||||
return &defaultTransportConfig, nil
|
||||
}
|
||||
|
||||
// If client cert is found, use that over S2A.
|
||||
// If MTLS is not enabled for the endpoint, skip S2A.
|
||||
if clientCertSource != nil || !mtlsEndpointEnabledForS2A() {
|
||||
return &defaultTransportConfig, nil
|
||||
}
|
||||
s2aMTLSEndpoint := settings.DefaultMTLSEndpoint
|
||||
// If there is endpoint override, honor it.
|
||||
if settings.Endpoint != "" {
|
||||
s2aMTLSEndpoint = endpoint
|
||||
}
|
||||
s2aAddress := GetS2AAddress()
|
||||
if s2aAddress == "" {
|
||||
return &defaultTransportConfig, nil
|
||||
}
|
||||
return &transportConfig{
|
||||
clientCertSource: clientCertSource,
|
||||
endpoint: endpoint,
|
||||
s2aAddress: s2aAddress,
|
||||
s2aMTLSEndpoint: s2aMTLSEndpoint,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func isGoogleS2AEnabled() bool {
|
||||
return strings.ToLower(os.Getenv(googleAPIUseS2AEnv)) == "true"
|
||||
}
|
||||
|
||||
// getClientCertificateSource returns a default client certificate source, if
|
||||
// not provided by the user.
|
||||
//
|
||||
// A nil default source can be returned if the source does not exist. Any exceptions
|
||||
// encountered while initializing the default source will be reported as client
|
||||
// error (ex. corrupt metadata file).
|
||||
//
|
||||
// Important Note: For now, the environment variable GOOGLE_API_USE_CLIENT_CERTIFICATE
|
||||
// must be set to "true" to allow certificate to be used (including user provided
|
||||
// certificates). For details, see AIP-4114.
|
||||
func getClientCertificateSource(settings *DialSettings) (cert.Source, error) {
|
||||
if !isClientCertificateEnabled() {
|
||||
return nil, nil
|
||||
} else if settings.ClientCertSource != nil {
|
||||
return settings.ClientCertSource, nil
|
||||
} else {
|
||||
return cert.DefaultSource()
|
||||
}
|
||||
}
|
||||
|
||||
func isClientCertificateEnabled() bool {
|
||||
useClientCert := os.Getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE")
|
||||
// TODO(andyrzhao): Update default to return "true" after DCA feature is fully released.
|
||||
return strings.ToLower(useClientCert) == "true"
|
||||
}
|
||||
|
||||
// getEndpoint returns the endpoint for the service, taking into account the
|
||||
// user-provided endpoint override "settings.Endpoint".
|
||||
//
|
||||
// If no endpoint override is specified, we will either return the default endpoint or
|
||||
// the default mTLS endpoint if a client certificate is available.
|
||||
//
|
||||
// You can override the default endpoint choice (mtls vs. regular) by setting the
|
||||
// GOOGLE_API_USE_MTLS_ENDPOINT environment variable.
|
||||
//
|
||||
// If the endpoint override is an address (host:port) rather than full base
|
||||
// URL (ex. https://...), then the user-provided address will be merged into
|
||||
// the default endpoint. For example, WithEndpoint("myhost:8000") and
|
||||
// WithDefaultEndpoint("https://foo.com/bar/baz") will return "https://myhost:8080/bar/baz"
|
||||
func getEndpoint(settings *DialSettings, clientCertSource cert.Source) (string, error) {
|
||||
if settings.Endpoint == "" {
|
||||
mtlsMode := getMTLSMode()
|
||||
if mtlsMode == mTLSModeAlways || (clientCertSource != nil && mtlsMode == mTLSModeAuto) {
|
||||
return settings.DefaultMTLSEndpoint, nil
|
||||
}
|
||||
return settings.DefaultEndpoint, nil
|
||||
}
|
||||
if strings.Contains(settings.Endpoint, "://") {
|
||||
// User passed in a full URL path, use it verbatim.
|
||||
return settings.Endpoint, nil
|
||||
}
|
||||
if settings.DefaultEndpoint == "" {
|
||||
// If DefaultEndpoint is not configured, use the user provided endpoint verbatim.
|
||||
// This allows a naked "host[:port]" URL to be used with GRPC Direct Path.
|
||||
return settings.Endpoint, nil
|
||||
}
|
||||
|
||||
// Assume user-provided endpoint is host[:port], merge it with the default endpoint.
|
||||
return mergeEndpoints(settings.DefaultEndpoint, settings.Endpoint)
|
||||
}
|
||||
|
||||
func getMTLSMode() string {
|
||||
mode := os.Getenv("GOOGLE_API_USE_MTLS_ENDPOINT")
|
||||
if mode == "" {
|
||||
mode = os.Getenv("GOOGLE_API_USE_MTLS") // Deprecated.
|
||||
}
|
||||
if mode == "" {
|
||||
return mTLSModeAuto
|
||||
}
|
||||
return strings.ToLower(mode)
|
||||
}
|
||||
|
||||
func mergeEndpoints(baseURL, newHost string) (string, error) {
|
||||
u, err := url.Parse(fixScheme(baseURL))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return strings.Replace(baseURL, u.Host, newHost, 1), nil
|
||||
}
|
||||
|
||||
func fixScheme(baseURL string) string {
|
||||
if !strings.Contains(baseURL, "://") {
|
||||
return "https://" + baseURL
|
||||
}
|
||||
return baseURL
|
||||
}
|
||||
|
||||
// GetGRPCTransportConfigAndEndpoint returns an instance of credentials.TransportCredentials, and the
|
||||
// corresponding endpoint to use for GRPC client.
|
||||
func GetGRPCTransportConfigAndEndpoint(settings *DialSettings) (credentials.TransportCredentials, string, error) {
|
||||
config, err := getTransportConfig(settings)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
defaultTransportCreds := credentials.NewTLS(&tls.Config{
|
||||
GetClientCertificate: config.clientCertSource,
|
||||
})
|
||||
if config.s2aAddress == "" {
|
||||
return defaultTransportCreds, config.endpoint, nil
|
||||
}
|
||||
|
||||
var fallbackOpts *s2a.FallbackOptions
|
||||
// In case of S2A failure, fall back to the endpoint that would've been used without S2A.
|
||||
if fallbackHandshake, err := fallback.DefaultFallbackClientHandshakeFunc(config.endpoint); err == nil {
|
||||
fallbackOpts = &s2a.FallbackOptions{
|
||||
FallbackClientHandshakeFunc: fallbackHandshake,
|
||||
}
|
||||
}
|
||||
|
||||
s2aTransportCreds, err := s2a.NewClientCreds(&s2a.ClientOptions{
|
||||
S2AAddress: config.s2aAddress,
|
||||
FallbackOpts: fallbackOpts,
|
||||
})
|
||||
if err != nil {
|
||||
// Use default if we cannot initialize S2A client transport credentials.
|
||||
return defaultTransportCreds, config.endpoint, nil
|
||||
}
|
||||
return s2aTransportCreds, config.s2aMTLSEndpoint, nil
|
||||
}
|
||||
|
||||
// GetHTTPTransportConfigAndEndpoint returns a client certificate source, a function for dialing MTLS with S2A,
|
||||
// and the endpoint to use for HTTP client.
|
||||
func GetHTTPTransportConfigAndEndpoint(settings *DialSettings) (cert.Source, func(context.Context, string, string) (net.Conn, error), string, error) {
|
||||
config, err := getTransportConfig(settings)
|
||||
if err != nil {
|
||||
return nil, nil, "", err
|
||||
}
|
||||
|
||||
if config.s2aAddress == "" {
|
||||
return config.clientCertSource, nil, config.endpoint, nil
|
||||
}
|
||||
|
||||
var fallbackOpts *s2a.FallbackOptions
|
||||
// In case of S2A failure, fall back to the endpoint that would've been used without S2A.
|
||||
if fallbackURL, err := url.Parse(config.endpoint); err == nil {
|
||||
if fallbackDialer, fallbackServerAddr, err := fallback.DefaultFallbackDialerAndAddress(fallbackURL.Hostname()); err == nil {
|
||||
fallbackOpts = &s2a.FallbackOptions{
|
||||
FallbackDialer: &s2a.FallbackDialer{
|
||||
Dialer: fallbackDialer,
|
||||
ServerAddr: fallbackServerAddr,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dialTLSContextFunc := s2a.NewS2ADialTLSContextFunc(&s2a.ClientOptions{
|
||||
S2AAddress: config.s2aAddress,
|
||||
FallbackOpts: fallbackOpts,
|
||||
})
|
||||
return nil, dialTLSContextFunc, config.s2aMTLSEndpoint, nil
|
||||
}
|
||||
|
||||
// mtlsEndpointEnabledForS2A checks if the endpoint is indeed MTLS-enabled, so that we can use S2A for MTLS connection.
|
||||
var mtlsEndpointEnabledForS2A = func() bool {
|
||||
// TODO(xmenxk): determine this via discovery config.
|
||||
return true
|
||||
}
|
3
vendor/google.golang.org/api/internal/cert/secureconnect_cert.go
generated
vendored
3
vendor/google.golang.org/api/internal/cert/secureconnect_cert.go
generated
vendored
@@ -18,7 +18,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/user"
|
||||
@@ -59,7 +58,7 @@ func NewSecureConnectSource(configFilePath string) (Source, error) {
|
||||
configFilePath = filepath.Join(user.HomeDir, metadataPath, metadataFile)
|
||||
}
|
||||
|
||||
file, err := ioutil.ReadFile(configFilePath)
|
||||
file, err := os.ReadFile(configFilePath)
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
// Config file missing means Secure Connect is not supported.
|
||||
|
5
vendor/google.golang.org/api/internal/creds.go
generated
vendored
5
vendor/google.golang.org/api/internal/creds.go
generated
vendored
@@ -10,7 +10,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -48,7 +47,7 @@ func baseCreds(ctx context.Context, ds *DialSettings) (*google.Credentials, erro
|
||||
return credentialsFromJSON(ctx, ds.CredentialsJSON, ds)
|
||||
}
|
||||
if ds.CredentialsFile != "" {
|
||||
data, err := ioutil.ReadFile(ds.CredentialsFile)
|
||||
data, err := os.ReadFile(ds.CredentialsFile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot read credentials file: %v", err)
|
||||
}
|
||||
@@ -92,7 +91,7 @@ func credentialsFromJSON(ctx context.Context, data []byte, ds *DialSettings) (*g
|
||||
|
||||
// Determine configurations for the OAuth2 transport, which is separate from the API transport.
|
||||
// The OAuth2 transport and endpoint will be configured for mTLS if applicable.
|
||||
clientCertSource, oauth2Endpoint, err := GetClientCertificateSourceAndEndpoint(oauth2DialSettings(ds))
|
||||
clientCertSource, oauth2Endpoint, err := getClientCertificateSourceAndEndpoint(oauth2DialSettings(ds))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
144
vendor/google.golang.org/api/internal/dca.go
generated
vendored
144
vendor/google.golang.org/api/internal/dca.go
generated
vendored
@@ -1,144 +0,0 @@
|
||||
// Copyright 2020 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package dca contains utils for implementing Device Certificate
|
||||
// Authentication according to https://google.aip.dev/auth/4114
|
||||
//
|
||||
// The overall logic for DCA is as follows:
|
||||
// 1. If both endpoint override and client certificate are specified, use them as is.
|
||||
// 2. If user does not specify client certificate, we will attempt to use default
|
||||
// client certificate.
|
||||
// 3. If user does not specify endpoint override, we will use defaultMtlsEndpoint if
|
||||
// client certificate is available and defaultEndpoint otherwise.
|
||||
//
|
||||
// Implications of the above logic:
|
||||
// 1. If the user specifies a non-mTLS endpoint override but client certificate is
|
||||
// available, we will pass along the cert anyway and let the server decide what to do.
|
||||
// 2. If the user specifies an mTLS endpoint override but client certificate is not
|
||||
// available, we will not fail-fast, but let backend throw error when connecting.
|
||||
//
|
||||
// We would like to avoid introducing client-side logic that parses whether the
|
||||
// endpoint override is an mTLS url, since the url pattern may change at anytime.
|
||||
//
|
||||
// This package is not intended for use by end developers. Use the
|
||||
// google.golang.org/api/option package to configure API clients.
|
||||
|
||||
// Package internal supports the options and transport packages.
|
||||
package internal
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/api/internal/cert"
|
||||
)
|
||||
|
||||
const (
|
||||
mTLSModeAlways = "always"
|
||||
mTLSModeNever = "never"
|
||||
mTLSModeAuto = "auto"
|
||||
)
|
||||
|
||||
// GetClientCertificateSourceAndEndpoint is a convenience function that invokes
|
||||
// getClientCertificateSource and getEndpoint sequentially and returns the client
|
||||
// cert source and endpoint as a tuple.
|
||||
func GetClientCertificateSourceAndEndpoint(settings *DialSettings) (cert.Source, string, error) {
|
||||
clientCertSource, err := getClientCertificateSource(settings)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
endpoint, err := getEndpoint(settings, clientCertSource)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
return clientCertSource, endpoint, nil
|
||||
}
|
||||
|
||||
// getClientCertificateSource returns a default client certificate source, if
|
||||
// not provided by the user.
|
||||
//
|
||||
// A nil default source can be returned if the source does not exist. Any exceptions
|
||||
// encountered while initializing the default source will be reported as client
|
||||
// error (ex. corrupt metadata file).
|
||||
//
|
||||
// Important Note: For now, the environment variable GOOGLE_API_USE_CLIENT_CERTIFICATE
|
||||
// must be set to "true" to allow certificate to be used (including user provided
|
||||
// certificates). For details, see AIP-4114.
|
||||
func getClientCertificateSource(settings *DialSettings) (cert.Source, error) {
|
||||
if !isClientCertificateEnabled() {
|
||||
return nil, nil
|
||||
} else if settings.ClientCertSource != nil {
|
||||
return settings.ClientCertSource, nil
|
||||
} else {
|
||||
return cert.DefaultSource()
|
||||
}
|
||||
}
|
||||
|
||||
func isClientCertificateEnabled() bool {
|
||||
useClientCert := os.Getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE")
|
||||
// TODO(andyrzhao): Update default to return "true" after DCA feature is fully released.
|
||||
return strings.ToLower(useClientCert) == "true"
|
||||
}
|
||||
|
||||
// getEndpoint returns the endpoint for the service, taking into account the
|
||||
// user-provided endpoint override "settings.Endpoint".
|
||||
//
|
||||
// If no endpoint override is specified, we will either return the default endpoint or
|
||||
// the default mTLS endpoint if a client certificate is available.
|
||||
//
|
||||
// You can override the default endpoint choice (mtls vs. regular) by setting the
|
||||
// GOOGLE_API_USE_MTLS_ENDPOINT environment variable.
|
||||
//
|
||||
// If the endpoint override is an address (host:port) rather than full base
|
||||
// URL (ex. https://...), then the user-provided address will be merged into
|
||||
// the default endpoint. For example, WithEndpoint("myhost:8000") and
|
||||
// WithDefaultEndpoint("https://foo.com/bar/baz") will return "https://myhost:8080/bar/baz"
|
||||
func getEndpoint(settings *DialSettings, clientCertSource cert.Source) (string, error) {
|
||||
if settings.Endpoint == "" {
|
||||
mtlsMode := getMTLSMode()
|
||||
if mtlsMode == mTLSModeAlways || (clientCertSource != nil && mtlsMode == mTLSModeAuto) {
|
||||
return settings.DefaultMTLSEndpoint, nil
|
||||
}
|
||||
return settings.DefaultEndpoint, nil
|
||||
}
|
||||
if strings.Contains(settings.Endpoint, "://") {
|
||||
// User passed in a full URL path, use it verbatim.
|
||||
return settings.Endpoint, nil
|
||||
}
|
||||
if settings.DefaultEndpoint == "" {
|
||||
// If DefaultEndpoint is not configured, use the user provided endpoint verbatim.
|
||||
// This allows a naked "host[:port]" URL to be used with GRPC Direct Path.
|
||||
return settings.Endpoint, nil
|
||||
}
|
||||
|
||||
// Assume user-provided endpoint is host[:port], merge it with the default endpoint.
|
||||
return mergeEndpoints(settings.DefaultEndpoint, settings.Endpoint)
|
||||
}
|
||||
|
||||
func getMTLSMode() string {
|
||||
mode := os.Getenv("GOOGLE_API_USE_MTLS_ENDPOINT")
|
||||
if mode == "" {
|
||||
mode = os.Getenv("GOOGLE_API_USE_MTLS") // Deprecated.
|
||||
}
|
||||
if mode == "" {
|
||||
return mTLSModeAuto
|
||||
}
|
||||
return strings.ToLower(mode)
|
||||
}
|
||||
|
||||
func mergeEndpoints(baseURL, newHost string) (string, error) {
|
||||
u, err := url.Parse(fixScheme(baseURL))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return strings.Replace(baseURL, u.Host, newHost, 1), nil
|
||||
}
|
||||
|
||||
func fixScheme(baseURL string) string {
|
||||
if !strings.Contains(baseURL, "://") {
|
||||
return "https://" + baseURL
|
||||
}
|
||||
return baseURL
|
||||
}
|
7
vendor/google.golang.org/api/internal/gensupport/media.go
generated
vendored
7
vendor/google.golang.org/api/internal/gensupport/media.go
generated
vendored
@@ -8,7 +8,6 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mime"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
@@ -222,8 +221,8 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB
|
||||
toCleanup = append(toCleanup, combined)
|
||||
if fb != nil && fm != nil {
|
||||
getBody = func() (io.ReadCloser, error) {
|
||||
rb := ioutil.NopCloser(fb())
|
||||
rm := ioutil.NopCloser(fm())
|
||||
rb := io.NopCloser(fb())
|
||||
rm := io.NopCloser(fm())
|
||||
var mimeBoundary string
|
||||
if _, params, err := mime.ParseMediaType(ctype); err == nil {
|
||||
mimeBoundary = params["boundary"]
|
||||
@@ -243,7 +242,7 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB
|
||||
fb := readerFunc(body)
|
||||
if fb != nil {
|
||||
getBody = func() (io.ReadCloser, error) {
|
||||
rb := ioutil.NopCloser(fb())
|
||||
rb := io.NopCloser(fb())
|
||||
toCleanup = append(toCleanup, rb)
|
||||
return rb, nil
|
||||
}
|
||||
|
9
vendor/google.golang.org/api/internal/gensupport/resumable.go
generated
vendored
9
vendor/google.golang.org/api/internal/gensupport/resumable.go
generated
vendored
@@ -43,8 +43,8 @@ type ResumableUpload struct {
|
||||
// retries should happen.
|
||||
ChunkRetryDeadline time.Duration
|
||||
|
||||
// Track current request invocation ID and attempt count for retry metric
|
||||
// headers.
|
||||
// Track current request invocation ID and attempt count for retry metrics
|
||||
// and idempotency headers.
|
||||
invocationID string
|
||||
attempts int
|
||||
}
|
||||
@@ -81,10 +81,15 @@ func (rx *ResumableUpload) doUploadRequest(ctx context.Context, data io.Reader,
|
||||
req.Header.Set("Content-Type", rx.MediaType)
|
||||
req.Header.Set("User-Agent", rx.UserAgent)
|
||||
|
||||
// TODO(b/274504690): Consider dropping gccl-invocation-id key since it
|
||||
// duplicates the X-Goog-Gcs-Idempotency-Token header (added in v0.115.0).
|
||||
baseXGoogHeader := "gl-go/" + GoVersion() + " gdcl/" + internal.Version
|
||||
invocationHeader := fmt.Sprintf("gccl-invocation-id/%s gccl-attempt-count/%d", rx.invocationID, rx.attempts)
|
||||
req.Header.Set("X-Goog-Api-Client", strings.Join([]string{baseXGoogHeader, invocationHeader}, " "))
|
||||
|
||||
// Set idempotency token header which is used by GCS uploads.
|
||||
req.Header.Set("X-Goog-Gcs-Idempotency-Token", rx.invocationID)
|
||||
|
||||
// Google's upload endpoint uses status code 308 for a
|
||||
// different purpose than the "308 Permanent Redirect"
|
||||
// since-standardized in RFC 7238. Because of the conflict in
|
||||
|
5
vendor/google.golang.org/api/internal/gensupport/send.go
generated
vendored
5
vendor/google.golang.org/api/internal/gensupport/send.go
generated
vendored
@@ -138,9 +138,14 @@ func sendAndRetry(ctx context.Context, client *http.Client, req *http.Request, r
|
||||
}
|
||||
return resp, ctx.Err()
|
||||
}
|
||||
|
||||
// Set retry metrics and idempotency headers for GCS.
|
||||
// TODO(b/274504690): Consider dropping gccl-invocation-id key since it
|
||||
// duplicates the X-Goog-Gcs-Idempotency-Token header (added in v0.115.0).
|
||||
invocationHeader := fmt.Sprintf("gccl-invocation-id/%s gccl-attempt-count/%d", invocationID, attempts)
|
||||
xGoogHeader := strings.Join([]string{invocationHeader, baseXGoogHeader}, " ")
|
||||
req.Header.Set("X-Goog-Api-Client", xGoogHeader)
|
||||
req.Header.Set("X-Goog-Gcs-Idempotency-Token", invocationID)
|
||||
|
||||
resp, err = client.Do(req.WithContext(ctx))
|
||||
|
||||
|
3
vendor/google.golang.org/api/internal/impersonate/impersonate.go
generated
vendored
3
vendor/google.golang.org/api/internal/impersonate/impersonate.go
generated
vendored
@@ -11,7 +11,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -105,7 +104,7 @@ func (i impersonatedTokenSource) Token() (*oauth2.Token, error) {
|
||||
return nil, fmt.Errorf("impersonate: unable to generate access token: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(io.LimitReader(resp.Body, 1<<20))
|
||||
body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("impersonate: unable to read body: %v", err)
|
||||
}
|
||||
|
136
vendor/google.golang.org/api/internal/s2a.go
generated
vendored
Normal file
136
vendor/google.golang.org/api/internal/s2a.go
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
// Copyright 2023 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"cloud.google.com/go/compute/metadata"
|
||||
)
|
||||
|
||||
const configEndpointSuffix = "googleAutoMtlsConfiguration"
|
||||
|
||||
// The period an MTLS config can be reused before needing refresh.
|
||||
var configExpiry = time.Hour
|
||||
|
||||
// GetS2AAddress returns the S2A address to be reached via plaintext connection.
|
||||
func GetS2AAddress() string {
|
||||
c, err := getMetadataMTLSAutoConfig().Config()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
if !c.Valid() {
|
||||
return ""
|
||||
}
|
||||
return c.S2A.PlaintextAddress
|
||||
}
|
||||
|
||||
type mtlsConfigSource interface {
|
||||
Config() (*mtlsConfig, error)
|
||||
}
|
||||
|
||||
// mdsMTLSAutoConfigSource is an instance of reuseMTLSConfigSource, with metadataMTLSAutoConfig as its config source.
|
||||
var (
|
||||
mdsMTLSAutoConfigSource mtlsConfigSource
|
||||
once sync.Once
|
||||
)
|
||||
|
||||
// getMetadataMTLSAutoConfig returns mdsMTLSAutoConfigSource, which is backed by config from MDS with auto-refresh.
|
||||
func getMetadataMTLSAutoConfig() mtlsConfigSource {
|
||||
once.Do(func() {
|
||||
mdsMTLSAutoConfigSource = &reuseMTLSConfigSource{
|
||||
src: &metadataMTLSAutoConfig{},
|
||||
}
|
||||
})
|
||||
return mdsMTLSAutoConfigSource
|
||||
}
|
||||
|
||||
// reuseMTLSConfigSource caches a valid version of mtlsConfig, and uses `src` to refresh upon config expiry.
|
||||
// It implements the mtlsConfigSource interface, so calling Config() on it returns an mtlsConfig.
|
||||
type reuseMTLSConfigSource struct {
|
||||
src mtlsConfigSource // src.Config() is called when config is expired
|
||||
mu sync.Mutex // mutex guards config
|
||||
config *mtlsConfig // cached config
|
||||
}
|
||||
|
||||
func (cs *reuseMTLSConfigSource) Config() (*mtlsConfig, error) {
|
||||
cs.mu.Lock()
|
||||
defer cs.mu.Unlock()
|
||||
|
||||
if cs.config.Valid() {
|
||||
return cs.config, nil
|
||||
}
|
||||
c, err := cs.src.Config()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.config = c
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// metadataMTLSAutoConfig is an implementation of the interface mtlsConfigSource
|
||||
// It has the logic to query MDS and return an mtlsConfig
|
||||
type metadataMTLSAutoConfig struct{}
|
||||
|
||||
var httpGetMetadataMTLSConfig = func() (string, error) {
|
||||
return metadata.Get(configEndpointSuffix)
|
||||
}
|
||||
|
||||
func (cs *metadataMTLSAutoConfig) Config() (*mtlsConfig, error) {
|
||||
resp, err := httpGetMetadataMTLSConfig()
|
||||
if err != nil {
|
||||
log.Printf("querying MTLS config from MDS endpoint failed: %v", err)
|
||||
return defaultMTLSConfig(), nil
|
||||
}
|
||||
var config mtlsConfig
|
||||
err = json.Unmarshal([]byte(resp), &config)
|
||||
if err != nil {
|
||||
log.Printf("unmarshalling MTLS config from MDS endpoint failed: %v", err)
|
||||
return defaultMTLSConfig(), nil
|
||||
}
|
||||
|
||||
if config.S2A == nil {
|
||||
log.Printf("returned MTLS config from MDS endpoint is invalid: %v", config)
|
||||
return defaultMTLSConfig(), nil
|
||||
}
|
||||
|
||||
// set new expiry
|
||||
config.Expiry = time.Now().Add(configExpiry)
|
||||
return &config, nil
|
||||
}
|
||||
|
||||
func defaultMTLSConfig() *mtlsConfig {
|
||||
return &mtlsConfig{
|
||||
S2A: &s2aAddresses{
|
||||
PlaintextAddress: "",
|
||||
MTLSAddress: "",
|
||||
},
|
||||
Expiry: time.Now().Add(configExpiry),
|
||||
}
|
||||
}
|
||||
|
||||
// s2aAddresses contains the plaintext and/or MTLS S2A addresses.
|
||||
type s2aAddresses struct {
|
||||
// PlaintextAddress is the plaintext address to reach S2A
|
||||
PlaintextAddress string `json:"plaintext_address"`
|
||||
// MTLSAddress is the MTLS address to reach S2A
|
||||
MTLSAddress string `json:"mtls_address"`
|
||||
}
|
||||
|
||||
// mtlsConfig contains the configuration for establishing MTLS connections with Google APIs.
|
||||
type mtlsConfig struct {
|
||||
S2A *s2aAddresses `json:"s2a"`
|
||||
Expiry time.Time
|
||||
}
|
||||
|
||||
func (c *mtlsConfig) Valid() bool {
|
||||
return c != nil && c.S2A != nil && !c.expired()
|
||||
}
|
||||
func (c *mtlsConfig) expired() bool {
|
||||
return c.Expiry.Before(time.Now())
|
||||
}
|
1
vendor/google.golang.org/api/internal/settings.go
generated
vendored
1
vendor/google.golang.org/api/internal/settings.go
generated
vendored
@@ -46,6 +46,7 @@ type DialSettings struct {
|
||||
SkipValidation bool
|
||||
ImpersonationConfig *impersonate.Config
|
||||
EnableDirectPath bool
|
||||
EnableDirectPathXds bool
|
||||
AllowNonDefaultServiceAccount bool
|
||||
|
||||
// Google API system parameters. For more information please read:
|
||||
|
2
vendor/google.golang.org/api/internal/version.go
generated
vendored
2
vendor/google.golang.org/api/internal/version.go
generated
vendored
@@ -5,4 +5,4 @@
|
||||
package internal
|
||||
|
||||
// Version is the current tagged release of the library.
|
||||
const Version = "0.114.0"
|
||||
const Version = "0.126.0"
|
||||
|
54
vendor/google.golang.org/api/monitoring/v3/monitoring-api.json
generated
vendored
54
vendor/google.golang.org/api/monitoring/v3/monitoring-api.json
generated
vendored
@@ -1217,7 +1217,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"pageSize": {
|
||||
"description": "A positive number that is the maximum number of results to return.",
|
||||
"description": "A positive number that is the maximum number of results to return. The default and maximum value is 10,000. If a page_size \u003c= 0 or \u003e 10,000 is submitted, will instead return a maximum of 10,000 results.",
|
||||
"format": "int32",
|
||||
"location": "query",
|
||||
"type": "integer"
|
||||
@@ -1505,7 +1505,7 @@
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"description": "Lists the notification channels that have been created for the project.",
|
||||
"description": "Lists the notification channels that have been created for the project. To list the types of notification channels that are supported, use the ListNotificationChannelDescriptors method.",
|
||||
"flatPath": "v3/projects/{projectsId}/notificationChannels",
|
||||
"httpMethod": "GET",
|
||||
"id": "monitoring.projects.notificationChannels.list",
|
||||
@@ -2714,7 +2714,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20230212",
|
||||
"revision": "20230531",
|
||||
"rootUrl": "https://monitoring.googleapis.com/",
|
||||
"schemas": {
|
||||
"Aggregation": {
|
||||
@@ -2843,7 +2843,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"conditions": {
|
||||
"description": "A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition_time_series_query_language is present, it must be the only condition.",
|
||||
"description": "A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition_time_series_query_language is present, it must be the only condition. If condition_monitoring_query_language is present, it must be the only condition.",
|
||||
"items": {
|
||||
"$ref": "Condition"
|
||||
},
|
||||
@@ -2854,7 +2854,7 @@
|
||||
"description": "A read-only record of the creation of the alerting policy. If provided in a call to create or update, this field will be ignored."
|
||||
},
|
||||
"displayName": {
|
||||
"description": "A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.",
|
||||
"description": "A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.The convention for the display_name of a PrometheusQueryLanguageCondition is \"/\", where the and should be taken from the corresponding Prometheus configuration file. This convention is not enforced. In any case the display_name is not a unique key of the AlertPolicy.",
|
||||
"type": "string"
|
||||
},
|
||||
"documentation": {
|
||||
@@ -2884,12 +2884,12 @@
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.",
|
||||
"description": "User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus and are valid Prometheus label names (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This means that they cannot be stored as is in user labels, because Prometheus labels may contain upper-case letters.",
|
||||
"type": "object"
|
||||
},
|
||||
"validity": {
|
||||
"$ref": "Status",
|
||||
"description": "Read-only description of how the alert policy is invalid. OK if the alert policy is valid. If not OK, the alert policy will not generate incidents."
|
||||
"description": "Read-only description of how the alert policy is invalid. This field is only set when the alert policy is invalid. An invalid alert policy will not generate incidents."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -2903,6 +2903,13 @@
|
||||
"format": "google-duration",
|
||||
"type": "string"
|
||||
},
|
||||
"notificationChannelStrategy": {
|
||||
"description": "Control how notifications will be sent out, on a per-channel basis.",
|
||||
"items": {
|
||||
"$ref": "NotificationChannelStrategy"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"notificationRateLimit": {
|
||||
"$ref": "NotificationRateLimit",
|
||||
"description": "Required for alert policies with a LogMatch condition.This limit is not implemented for alert policies that are not log-based."
|
||||
@@ -3504,7 +3511,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"Exponential": {
|
||||
"description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i). Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).",
|
||||
"description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i).Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).",
|
||||
"id": "Exponential",
|
||||
"properties": {
|
||||
"growthFactor": {
|
||||
@@ -4033,7 +4040,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"Linear": {
|
||||
"description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): offset + (width * i). Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).",
|
||||
"description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): offset + (width * i).Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).",
|
||||
"id": "Linear",
|
||||
"properties": {
|
||||
"numFiniteBuckets": {
|
||||
@@ -4932,6 +4939,25 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"NotificationChannelStrategy": {
|
||||
"description": "Control over how the notification channels in notification_channels are notified when this alert fires, on a per-channel basis.",
|
||||
"id": "NotificationChannelStrategy",
|
||||
"properties": {
|
||||
"notificationChannelNames": {
|
||||
"description": "The full REST resource name for the notification channels that these settings apply to. Each of these correspond to the name field in one of the NotificationChannel objects referenced in the notification_channels field of this AlertPolicy. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] ",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"renotifyInterval": {
|
||||
"description": "The frequency at which to send reminder notifications for open incidents.",
|
||||
"format": "google-duration",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"NotificationRateLimit": {
|
||||
"description": "Control over the rate of notifications sent to this alert policy's notification channels.",
|
||||
"id": "NotificationRateLimit",
|
||||
@@ -5624,6 +5650,10 @@
|
||||
"description": "A protocol buffer message type.",
|
||||
"id": "Type",
|
||||
"properties": {
|
||||
"edition": {
|
||||
"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.",
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"description": "The list of fields.",
|
||||
"items": {
|
||||
@@ -5657,11 +5687,13 @@
|
||||
"description": "The source syntax.",
|
||||
"enum": [
|
||||
"SYNTAX_PROTO2",
|
||||
"SYNTAX_PROTO3"
|
||||
"SYNTAX_PROTO3",
|
||||
"SYNTAX_EDITIONS"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Syntax proto2.",
|
||||
"Syntax proto3."
|
||||
"Syntax proto3.",
|
||||
"Syntax editions."
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
|
108
vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go
generated
vendored
108
vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go
generated
vendored
@@ -77,6 +77,7 @@ var _ = errors.New
|
||||
var _ = strings.Replace
|
||||
var _ = context.Canceled
|
||||
var _ = internaloption.WithDefaultEndpoint
|
||||
var _ = internal.Version
|
||||
|
||||
const apiId = "monitoring:v3"
|
||||
const apiName = "monitoring"
|
||||
@@ -688,7 +689,8 @@ type AlertPolicy struct {
|
||||
// combined conditions evaluate to true, then an incident is created. A
|
||||
// policy can have from one to six conditions. If
|
||||
// condition_time_series_query_language is present, it must be the only
|
||||
// condition.
|
||||
// condition. If condition_monitoring_query_language is present, it must
|
||||
// be the only condition.
|
||||
Conditions []*Condition `json:"conditions,omitempty"`
|
||||
|
||||
// CreationRecord: A read-only record of the creation of the alerting
|
||||
@@ -699,7 +701,11 @@ type AlertPolicy struct {
|
||||
// DisplayName: A short name or phrase used to identify the policy in
|
||||
// dashboards, notifications, and incidents. To avoid confusion, don't
|
||||
// use the same display name for multiple policies in the same project.
|
||||
// The name is limited to 512 Unicode characters.
|
||||
// The name is limited to 512 Unicode characters.The convention for the
|
||||
// display_name of a PrometheusQueryLanguageCondition is "/", where the
|
||||
// and should be taken from the corresponding Prometheus configuration
|
||||
// file. This convention is not enforced. In any case the display_name
|
||||
// is not a unique key of the AlertPolicy.
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
|
||||
// Documentation: Documentation that is included with notifications and
|
||||
@@ -746,12 +752,16 @@ type AlertPolicy struct {
|
||||
// 64 entries. Each key and value is limited to 63 Unicode characters or
|
||||
// 128 bytes, whichever is smaller. Labels and values can contain only
|
||||
// lowercase letters, numerals, underscores, and dashes. Keys must begin
|
||||
// with a letter.
|
||||
// with a letter.Note that Prometheus and are valid Prometheus label
|
||||
// names
|
||||
// (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
|
||||
// This means that they cannot be stored as is in user labels, because
|
||||
// Prometheus labels may contain upper-case letters.
|
||||
UserLabels map[string]string `json:"userLabels,omitempty"`
|
||||
|
||||
// Validity: Read-only description of how the alert policy is invalid.
|
||||
// OK if the alert policy is valid. If not OK, the alert policy will not
|
||||
// generate incidents.
|
||||
// This field is only set when the alert policy is invalid. An invalid
|
||||
// alert policy will not generate incidents.
|
||||
Validity *Status `json:"validity,omitempty"`
|
||||
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
@@ -788,6 +798,10 @@ type AlertStrategy struct {
|
||||
// long, any open incidents will close
|
||||
AutoClose string `json:"autoClose,omitempty"`
|
||||
|
||||
// NotificationChannelStrategy: Control how notifications will be sent
|
||||
// out, on a per-channel basis.
|
||||
NotificationChannelStrategy []*NotificationChannelStrategy `json:"notificationChannelStrategy,omitempty"`
|
||||
|
||||
// NotificationRateLimit: Required for alert policies with a LogMatch
|
||||
// condition.This limit is not implemented for alert policies that are
|
||||
// not log-based.
|
||||
@@ -2004,12 +2018,29 @@ func (s *Explicit) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
func (s *Explicit) UnmarshalJSON(data []byte) error {
|
||||
type NoMethod Explicit
|
||||
var s1 struct {
|
||||
Bounds []gensupport.JSONFloat64 `json:"bounds"`
|
||||
*NoMethod
|
||||
}
|
||||
s1.NoMethod = (*NoMethod)(s)
|
||||
if err := json.Unmarshal(data, &s1); err != nil {
|
||||
return err
|
||||
}
|
||||
s.Bounds = make([]float64, len(s1.Bounds))
|
||||
for i := range s1.Bounds {
|
||||
s.Bounds[i] = float64(s1.Bounds[i])
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Exponential: Specifies an exponential sequence of buckets that have a
|
||||
// width that is proportional to the value of the lower bound. Each
|
||||
// bucket represents a constant relative uncertainty on a specific value
|
||||
// in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket
|
||||
// i has the following boundaries:Upper bound (0 <= i < N-1): scale *
|
||||
// (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor
|
||||
// (growth_factor ^ i).Lower bound (1 <= i < N): scale * (growth_factor
|
||||
// ^ (i - 1)).
|
||||
type Exponential struct {
|
||||
// GrowthFactor: Must be greater than 1.
|
||||
@@ -2922,7 +2953,7 @@ func (s *LatencyCriteria) MarshalJSON() ([]byte, error) {
|
||||
// constant absolute uncertainty on the specific value in the
|
||||
// bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has
|
||||
// the following boundaries:Upper bound (0 <= i < N-1): offset + (width
|
||||
// * i). Lower bound (1 <= i < N): offset + (width * (i - 1)).
|
||||
// * i).Lower bound (1 <= i < N): offset + (width * (i - 1)).
|
||||
type Linear struct {
|
||||
// NumFiniteBuckets: Must be greater than 0.
|
||||
NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
|
||||
@@ -4679,6 +4710,47 @@ func (s *NotificationChannelDescriptor) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// NotificationChannelStrategy: Control over how the notification
|
||||
// channels in notification_channels are notified when this alert fires,
|
||||
// on a per-channel basis.
|
||||
type NotificationChannelStrategy struct {
|
||||
// NotificationChannelNames: The full REST resource name for the
|
||||
// notification channels that these settings apply to. Each of these
|
||||
// correspond to the name field in one of the NotificationChannel
|
||||
// objects referenced in the notification_channels field of this
|
||||
// AlertPolicy. The format is:
|
||||
// projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
|
||||
NotificationChannelNames []string `json:"notificationChannelNames,omitempty"`
|
||||
|
||||
// RenotifyInterval: The frequency at which to send reminder
|
||||
// notifications for open incidents.
|
||||
RenotifyInterval string `json:"renotifyInterval,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g.
|
||||
// "NotificationChannelNames") to unconditionally include in API
|
||||
// requests. By default, fields with empty or default values are omitted
|
||||
// from API requests. However, any non-pointer, non-interface field
|
||||
// appearing in ForceSendFields will be sent to the server regardless of
|
||||
// whether the field is empty or not. This may be used to include empty
|
||||
// fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "NotificationChannelNames")
|
||||
// to include in API requests with the JSON null value. By default,
|
||||
// fields with empty values are omitted from API requests. However, any
|
||||
// field with an empty value appearing in NullFields will be sent to the
|
||||
// server as null. It is an error if a field in this list has a
|
||||
// non-empty value. This may be used to include null fields in Patch
|
||||
// requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *NotificationChannelStrategy) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod NotificationChannelStrategy
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// NotificationRateLimit: Control over the rate of notifications sent to
|
||||
// this alert policy's notification channels.
|
||||
type NotificationRateLimit struct {
|
||||
@@ -6003,6 +6075,10 @@ func (s *Trigger) UnmarshalJSON(data []byte) error {
|
||||
|
||||
// Type: A protocol buffer message type.
|
||||
type Type struct {
|
||||
// Edition: The source edition string, only valid when syntax is
|
||||
// SYNTAX_EDITIONS.
|
||||
Edition string `json:"edition,omitempty"`
|
||||
|
||||
// Fields: The list of fields.
|
||||
Fields []*Field `json:"fields,omitempty"`
|
||||
|
||||
@@ -6024,9 +6100,10 @@ type Type struct {
|
||||
// Possible values:
|
||||
// "SYNTAX_PROTO2" - Syntax proto2.
|
||||
// "SYNTAX_PROTO3" - Syntax proto3.
|
||||
// "SYNTAX_EDITIONS" - Syntax editions.
|
||||
Syntax string `json:"syntax,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Fields") to
|
||||
// ForceSendFields is a list of field names (e.g. "Edition") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
// non-pointer, non-interface field appearing in ForceSendFields will be
|
||||
@@ -6034,8 +6111,8 @@ type Type struct {
|
||||
// This may be used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Fields") to include in API
|
||||
// requests with the JSON null value. By default, fields with empty
|
||||
// NullFields is a list of field names (e.g. "Edition") to include in
|
||||
// API requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
@@ -11235,7 +11312,9 @@ func (c *ProjectsMetricDescriptorsListCall) Filter(filter string) *ProjectsMetri
|
||||
}
|
||||
|
||||
// PageSize sets the optional parameter "pageSize": A positive number
|
||||
// that is the maximum number of results to return.
|
||||
// that is the maximum number of results to return. The default and
|
||||
// maximum value is 10,000. If a page_size <= 0 or > 10,000 is
|
||||
// submitted, will instead return a maximum of 10,000 results.
|
||||
func (c *ProjectsMetricDescriptorsListCall) PageSize(pageSize int64) *ProjectsMetricDescriptorsListCall {
|
||||
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
|
||||
return c
|
||||
@@ -11370,7 +11449,7 @@ func (c *ProjectsMetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*L
|
||||
// "type": "string"
|
||||
// },
|
||||
// "pageSize": {
|
||||
// "description": "A positive number that is the maximum number of results to return.",
|
||||
// "description": "A positive number that is the maximum number of results to return. The default and maximum value is 10,000. If a page_size \u003c= 0 or \u003e 10,000 is submitted, will instead return a maximum of 10,000 results.",
|
||||
// "format": "int32",
|
||||
// "location": "query",
|
||||
// "type": "integer"
|
||||
@@ -12787,7 +12866,8 @@ type ProjectsNotificationChannelsListCall struct {
|
||||
}
|
||||
|
||||
// List: Lists the notification channels that have been created for the
|
||||
// project.
|
||||
// project. To list the types of notification channels that are
|
||||
// supported, use the ListNotificationChannelDescriptors method.
|
||||
//
|
||||
// - name: The project
|
||||
// (https://cloud.google.com/monitoring/api/v3#project_name) on which
|
||||
@@ -12938,7 +13018,7 @@ func (c *ProjectsNotificationChannelsListCall) Do(opts ...googleapi.CallOption)
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Lists the notification channels that have been created for the project.",
|
||||
// "description": "Lists the notification channels that have been created for the project. To list the types of notification channels that are supported, use the ListNotificationChannelDescriptors method.",
|
||||
// "flatPath": "v3/projects/{projectsId}/notificationChannels",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "monitoring.projects.notificationChannels.list",
|
||||
|
15
vendor/google.golang.org/api/option/internaloption/internaloption.go
generated
vendored
15
vendor/google.golang.org/api/option/internaloption/internaloption.go
generated
vendored
@@ -67,6 +67,21 @@ func (e enableDirectPath) Apply(o *internal.DialSettings) {
|
||||
o.EnableDirectPath = bool(e)
|
||||
}
|
||||
|
||||
// EnableDirectPathXds returns a ClientOption that overrides the default
|
||||
// DirectPath type. It is only valid when DirectPath is enabled.
|
||||
//
|
||||
// It should only be used internally by generated clients.
|
||||
// This is an EXPERIMENTAL API and may be changed or removed in the future.
|
||||
func EnableDirectPathXds() option.ClientOption {
|
||||
return enableDirectPathXds(true)
|
||||
}
|
||||
|
||||
type enableDirectPathXds bool
|
||||
|
||||
func (x enableDirectPathXds) Apply(o *internal.DialSettings) {
|
||||
o.EnableDirectPathXds = bool(x)
|
||||
}
|
||||
|
||||
// AllowNonDefaultServiceAccount returns a ClientOption that overrides the default
|
||||
// requirement for using the default service account for DirectPath.
|
||||
//
|
||||
|
6
vendor/google.golang.org/api/tpu/v1/tpu-api.json
generated
vendored
6
vendor/google.golang.org/api/tpu/v1/tpu-api.json
generated
vendored
@@ -537,7 +537,7 @@
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
|
||||
"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations",
|
||||
"httpMethod": "GET",
|
||||
"id": "tpu.projects.locations.operations.list",
|
||||
@@ -659,7 +659,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20220725",
|
||||
"revision": "20230420",
|
||||
"rootUrl": "https://tpu.googleapis.com/",
|
||||
"schemas": {
|
||||
"AcceleratorType": {
|
||||
@@ -795,7 +795,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"Location": {
|
||||
"description": "A resource that represents Google Cloud Platform location.",
|
||||
"description": "A resource that represents a Google Cloud location.",
|
||||
"id": "Location",
|
||||
"properties": {
|
||||
"displayName": {
|
||||
|
14
vendor/google.golang.org/api/tpu/v1/tpu-gen.go
generated
vendored
14
vendor/google.golang.org/api/tpu/v1/tpu-gen.go
generated
vendored
@@ -71,6 +71,7 @@ var _ = errors.New
|
||||
var _ = strings.Replace
|
||||
var _ = context.Canceled
|
||||
var _ = internaloption.WithDefaultEndpoint
|
||||
var _ = internal.Version
|
||||
|
||||
const apiId = "tpu:v1"
|
||||
const apiName = "tpu"
|
||||
@@ -442,7 +443,7 @@ func (s *ListTensorFlowVersionsResponse) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// Location: A resource that represents Google Cloud Platform location.
|
||||
// Location: A resource that represents a Google Cloud location.
|
||||
type Location struct {
|
||||
// DisplayName: The friendly name for this location, typically a nearby
|
||||
// city name. For example, "Tokyo".
|
||||
@@ -3186,14 +3187,7 @@ type ProjectsLocationsOperationsListCall struct {
|
||||
|
||||
// List: Lists operations that match the specified filter in the
|
||||
// request. If the server doesn't support this method, it returns
|
||||
// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
|
||||
// override the binding to use different resource name schemes, such as
|
||||
// `users/*/operations`. To override the binding, API services can add a
|
||||
// binding such as "/v1/{name=users/*}/operations" to their service
|
||||
// configuration. For backwards compatibility, the default name includes
|
||||
// the operations collection id, however overriding users must ensure
|
||||
// the name binding is the parent resource, without the operations
|
||||
// collection id.
|
||||
// `UNIMPLEMENTED`.
|
||||
//
|
||||
// - name: The name of the operation's parent resource.
|
||||
func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
|
||||
@@ -3322,7 +3316,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
|
||||
// "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
|
||||
// "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "tpu.projects.locations.operations.list",
|
||||
|
11
vendor/google.golang.org/api/transport/http/dial.go
generated
vendored
11
vendor/google.golang.org/api/transport/http/dial.go
generated
vendored
@@ -33,7 +33,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client,
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
clientCertSource, endpoint, err := internal.GetClientCertificateSourceAndEndpoint(settings)
|
||||
clientCertSource, dialTLSContext, endpoint, err := internal.GetHTTPTransportConfigAndEndpoint(settings)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
@@ -41,7 +41,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client,
|
||||
if settings.HTTPClient != nil {
|
||||
return settings.HTTPClient, endpoint, nil
|
||||
}
|
||||
trans, err := newTransport(ctx, defaultBaseTransport(ctx, clientCertSource), settings)
|
||||
|
||||
trans, err := newTransport(ctx, defaultBaseTransport(ctx, clientCertSource, dialTLSContext), settings)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
@@ -152,7 +153,7 @@ var appengineUrlfetchHook func(context.Context) http.RoundTripper
|
||||
// Otherwise, use a default transport, taking most defaults from
|
||||
// http.DefaultTransport.
|
||||
// If TLSCertificate is available, set TLSClientConfig as well.
|
||||
func defaultBaseTransport(ctx context.Context, clientCertSource cert.Source) http.RoundTripper {
|
||||
func defaultBaseTransport(ctx context.Context, clientCertSource cert.Source, dialTLSContext func(context.Context, string, string) (net.Conn, error)) http.RoundTripper {
|
||||
if appengineUrlfetchHook != nil {
|
||||
return appengineUrlfetchHook(ctx)
|
||||
}
|
||||
@@ -171,6 +172,10 @@ func defaultBaseTransport(ctx context.Context, clientCertSource cert.Source) htt
|
||||
GetClientCertificate: clientCertSource,
|
||||
}
|
||||
}
|
||||
if dialTLSContext != nil {
|
||||
// If DialTLSContext is set, TLSClientConfig wil be ignored
|
||||
trans.DialTLSContext = dialTLSContext
|
||||
}
|
||||
|
||||
configureHTTP2(trans)
|
||||
|
||||
|
Reference in New Issue
Block a user