Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat: sync v1 GKE API fix: deprecate SetLocations; use UpdateCluster …
Browse files Browse the repository at this point in the history
…refactor: provide name alias for GetOperation (as method signature annotation) feat: support for GetJSONWebKeys feat: support for Workload Identity feat: support for Gvisor in nodes feat: support for node reservation affinity feat: support for Customer Managed Encryption in nodes fix: deprecate basic auth fields (removed in 1.19 clusters) feat: support for NodeLocalDNS feat: support for ConfigConnector feat: support for private cluster VPC peering feat: support for CloudRun load balancers feat: support using routes for pod IPs feat: support for Shielded Nodes feat: support for release channels fix: deprecated Cluster/NodePool.status_message; use conditions feat: support for disabling default sNAT feat: operations now store more granular progress feat: support for node Surge Upgrades feat: support for updating node pool locations. feat: support for Node Auto Provisioning feat: support for specifying node disk size and type docs: many minor documentation clarifications

PiperOrigin-RevId: 342116206

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Nov 12 13:17:04 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 75d1324fff65abad6435e6d501e050439b5a616b
Source-Link: googleapis/googleapis@75d1324
  • Loading branch information
yoshi-automation committed Nov 12, 2020
1 parent b063786 commit 54f7921
Show file tree
Hide file tree
Showing 140 changed files with 35,621 additions and 3,227 deletions.
Expand Up @@ -38,6 +38,8 @@
import com.google.container.v1.DeleteClusterRequest;
import com.google.container.v1.DeleteNodePoolRequest;
import com.google.container.v1.GetClusterRequest;
import com.google.container.v1.GetJSONWebKeysRequest;
import com.google.container.v1.GetJSONWebKeysResponse;
import com.google.container.v1.GetNodePoolRequest;
import com.google.container.v1.GetOperationRequest;
import com.google.container.v1.GetServerConfigRequest;
Expand Down Expand Up @@ -418,7 +420,7 @@ public final UnaryCallable<GetClusterRequest, Cluster> getClusterCallable() {
* [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides.
* This field has been deprecated and replaced by the parent field.
* @param cluster Required. A [cluster
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters)
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation createCluster(String projectId, String zone, Cluster cluster) {
Expand Down Expand Up @@ -459,7 +461,7 @@ public final Operation createCluster(String projectId, String zone, Cluster clus
* @param parent The parent (project and location) where the cluster will be created. Specified in
* the format `projects/&#42;/locations/&#42;`.
* @param cluster Required. A [cluster
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters)
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation createCluster(String parent, Cluster cluster) {
Expand Down Expand Up @@ -763,10 +765,14 @@ public final Operation setNodePoolAutoscaling(SetNodePoolAutoscalingRequest requ
* This field has been deprecated and replaced by the name field.
* @param clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated
* and replaced by the name field.
* @param loggingService Required. The logging service the cluster should use to write metrics.
* @param loggingService Required. The logging service the cluster should use to write logs.
* Currently available options:
* <p>&#42; "logging.googleapis.com" - the Google Cloud Logging service &#42; "none" - no
* metrics will be exported from the cluster
* <p>&#42; `logging.googleapis.com/kubernetes` - The Cloud Logging service with a
* Kubernetes-native resource model &#42; `logging.googleapis.com` - The legacy Cloud Logging
* service (no longer available as of GKE 1.15). &#42; `none` - no logs will be exported from
* the cluster.
* <p>If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `logging.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setLoggingService(
Expand Down Expand Up @@ -797,10 +803,14 @@ public final Operation setLoggingService(
*
* @param name The name (project, location, cluster) of the cluster to set logging. Specified in
* the format `projects/&#42;/locations/&#42;/clusters/&#42;`.
* @param loggingService Required. The logging service the cluster should use to write metrics.
* @param loggingService Required. The logging service the cluster should use to write logs.
* Currently available options:
* <p>&#42; "logging.googleapis.com" - the Google Cloud Logging service &#42; "none" - no
* metrics will be exported from the cluster
* <p>&#42; `logging.googleapis.com/kubernetes` - The Cloud Logging service with a
* Kubernetes-native resource model &#42; `logging.googleapis.com` - The legacy Cloud Logging
* service (no longer available as of GKE 1.15). &#42; `none` - no logs will be exported from
* the cluster.
* <p>If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `logging.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setLoggingService(String name, String loggingService) {
Expand Down Expand Up @@ -883,9 +893,12 @@ public final UnaryCallable<SetLoggingServiceRequest, Operation> setLoggingServic
* and replaced by the name field.
* @param monitoringService Required. The monitoring service the cluster should use to write
* metrics. Currently available options:
* <p>&#42; "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring service with
* Kubernetes-native resource model &#42; "monitoring.googleapis.com" - the Google Cloud
* Monitoring service &#42; "none" - no metrics will be exported from the cluster
* <p>&#42; "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a
* Kubernetes-native resource model &#42; `monitoring.googleapis.com` - The legacy Cloud
* Monitoring service (no longer available as of GKE 1.15). &#42; `none` - No metrics will be
* exported from the cluster.
* <p>If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `monitoring.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setMonitoringService(
Expand Down Expand Up @@ -918,9 +931,12 @@ public final Operation setMonitoringService(
* in the format `projects/&#42;/locations/&#42;/clusters/&#42;`.
* @param monitoringService Required. The monitoring service the cluster should use to write
* metrics. Currently available options:
* <p>&#42; "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring service with
* Kubernetes-native resource model &#42; "monitoring.googleapis.com" - the Google Cloud
* Monitoring service &#42; "none" - no metrics will be exported from the cluster
* <p>&#42; "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a
* Kubernetes-native resource model &#42; `monitoring.googleapis.com` - The legacy Cloud
* Monitoring service (no longer available as of GKE 1.15). &#42; `none` - No metrics will be
* exported from the cluster.
* <p>If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE
* 1.14+ or `monitoring.googleapis.com` for earlier versions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation setMonitoringService(String name, String monitoringService) {
Expand Down Expand Up @@ -1091,7 +1107,9 @@ public final UnaryCallable<SetAddonsConfigRequest, Operation> setAddonsConfigCal

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* 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.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1135,7 +1153,9 @@ public final Operation setLocations(

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* 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.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1165,7 +1185,9 @@ public final Operation setLocations(String name, List<String> locations) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* 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.
*
* <p>Sample code:
*
Expand All @@ -1188,7 +1210,9 @@ public final Operation setLocations(SetLocationsRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the locations for a specific cluster.
* 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.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1603,6 +1627,28 @@ public final Operation getOperation(String projectId, String zone, String operat
return getOperation(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the specified operation.
*
* <p>Sample code:
*
* <pre><code>
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
* String name = "";
* Operation response = clusterManagerClient.getOperation(name);
* }
* </code></pre>
*
* @param name The name (project, location, operation id) of the operation to get. Specified in
* the format `projects/&#42;/locations/&#42;/operations/&#42;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Operation getOperation(String name) {
GetOperationRequest request = GetOperationRequest.newBuilder().setName(name).build();
return getOperation(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the specified operation.
Expand Down Expand Up @@ -1827,6 +1873,48 @@ public final UnaryCallable<GetServerConfigRequest, ServerConfig> getServerConfig
return stub.getServerConfigCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the public component of the cluster signing keys in JSON Web Key format. This API is not
* yet intended for general use, and is not available for all clusters.
*
* <p>Sample code:
*
* <pre><code>
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
* GetJSONWebKeysRequest request = GetJSONWebKeysRequest.newBuilder().build();
* GetJSONWebKeysResponse response = clusterManagerClient.getJSONWebKeys(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final GetJSONWebKeysResponse getJSONWebKeys(GetJSONWebKeysRequest request) {
return getJSONWebKeysCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the public component of the cluster signing keys in JSON Web Key format. This API is not
* yet intended for general use, and is not available for all clusters.
*
* <p>Sample code:
*
* <pre><code>
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
* GetJSONWebKeysRequest request = GetJSONWebKeysRequest.newBuilder().build();
* ApiFuture&lt;GetJSONWebKeysResponse&gt; future = clusterManagerClient.getJSONWebKeysCallable().futureCall(request);
* // Do something
* GetJSONWebKeysResponse response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
getJSONWebKeysCallable() {
return stub.getJSONWebKeysCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the node pools for a cluster.
Expand Down
Expand Up @@ -37,6 +37,8 @@
import com.google.container.v1.DeleteClusterRequest;
import com.google.container.v1.DeleteNodePoolRequest;
import com.google.container.v1.GetClusterRequest;
import com.google.container.v1.GetJSONWebKeysRequest;
import com.google.container.v1.GetJSONWebKeysResponse;
import com.google.container.v1.GetNodePoolRequest;
import com.google.container.v1.GetOperationRequest;
import com.google.container.v1.GetServerConfigRequest;
Expand Down Expand Up @@ -193,6 +195,11 @@ public UnaryCallSettings<GetServerConfigRequest, ServerConfig> getServerConfigSe
return ((ClusterManagerStubSettings) getStubSettings()).getServerConfigSettings();
}

/** Returns the object with the settings used for calls to getJSONWebKeys. */
public UnaryCallSettings<GetJSONWebKeysRequest, GetJSONWebKeysResponse> getJSONWebKeysSettings() {
return ((ClusterManagerStubSettings) getStubSettings()).getJSONWebKeysSettings();
}

/** Returns the object with the settings used for calls to listNodePools. */
public UnaryCallSettings<ListNodePoolsRequest, ListNodePoolsResponse> listNodePoolsSettings() {
return ((ClusterManagerStubSettings) getStubSettings()).listNodePoolsSettings();
Expand Down Expand Up @@ -457,6 +464,12 @@ public UnaryCallSettings.Builder<CancelOperationRequest, Empty> cancelOperationS
return getStubSettingsBuilder().getServerConfigSettings();
}

/** Returns the builder for the settings used for calls to getJSONWebKeys. */
public UnaryCallSettings.Builder<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
getJSONWebKeysSettings() {
return getStubSettingsBuilder().getJSONWebKeysSettings();
}

/** Returns the builder for the settings used for calls to listNodePools. */
public UnaryCallSettings.Builder<ListNodePoolsRequest, ListNodePoolsResponse>
listNodePoolsSettings() {
Expand Down
Expand Up @@ -28,6 +28,8 @@
import com.google.container.v1.DeleteClusterRequest;
import com.google.container.v1.DeleteNodePoolRequest;
import com.google.container.v1.GetClusterRequest;
import com.google.container.v1.GetJSONWebKeysRequest;
import com.google.container.v1.GetJSONWebKeysResponse;
import com.google.container.v1.GetNodePoolRequest;
import com.google.container.v1.GetOperationRequest;
import com.google.container.v1.GetServerConfigRequest;
Expand Down Expand Up @@ -140,6 +142,10 @@ public UnaryCallable<GetServerConfigRequest, ServerConfig> getServerConfigCallab
throw new UnsupportedOperationException("Not implemented: getServerConfigCallable()");
}

public UnaryCallable<GetJSONWebKeysRequest, GetJSONWebKeysResponse> getJSONWebKeysCallable() {
throw new UnsupportedOperationException("Not implemented: getJSONWebKeysCallable()");
}

public UnaryCallable<ListNodePoolsRequest, ListNodePoolsResponse> listNodePoolsCallable() {
throw new UnsupportedOperationException("Not implemented: listNodePoolsCallable()");
}
Expand Down
Expand Up @@ -51,6 +51,8 @@
import com.google.container.v1.DeleteClusterRequest;
import com.google.container.v1.DeleteNodePoolRequest;
import com.google.container.v1.GetClusterRequest;
import com.google.container.v1.GetJSONWebKeysRequest;
import com.google.container.v1.GetJSONWebKeysResponse;
import com.google.container.v1.GetNodePoolRequest;
import com.google.container.v1.GetOperationRequest;
import com.google.container.v1.GetServerConfigRequest;
Expand Down Expand Up @@ -147,6 +149,8 @@ public class ClusterManagerStubSettings extends StubSettings<ClusterManagerStubS
private final UnaryCallSettings<GetOperationRequest, Operation> getOperationSettings;
private final UnaryCallSettings<CancelOperationRequest, Empty> cancelOperationSettings;
private final UnaryCallSettings<GetServerConfigRequest, ServerConfig> getServerConfigSettings;
private final UnaryCallSettings<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
getJSONWebKeysSettings;
private final UnaryCallSettings<ListNodePoolsRequest, ListNodePoolsResponse>
listNodePoolsSettings;
private final UnaryCallSettings<GetNodePoolRequest, NodePool> getNodePoolSettings;
Expand Down Expand Up @@ -256,6 +260,11 @@ public UnaryCallSettings<GetServerConfigRequest, ServerConfig> getServerConfigSe
return getServerConfigSettings;
}

/** Returns the object with the settings used for calls to getJSONWebKeys. */
public UnaryCallSettings<GetJSONWebKeysRequest, GetJSONWebKeysResponse> getJSONWebKeysSettings() {
return getJSONWebKeysSettings;
}

/** Returns the object with the settings used for calls to listNodePools. */
public UnaryCallSettings<ListNodePoolsRequest, ListNodePoolsResponse> listNodePoolsSettings() {
return listNodePoolsSettings;
Expand Down Expand Up @@ -418,6 +427,7 @@ protected ClusterManagerStubSettings(Builder settingsBuilder) throws IOException
getOperationSettings = settingsBuilder.getOperationSettings().build();
cancelOperationSettings = settingsBuilder.cancelOperationSettings().build();
getServerConfigSettings = settingsBuilder.getServerConfigSettings().build();
getJSONWebKeysSettings = settingsBuilder.getJSONWebKeysSettings().build();
listNodePoolsSettings = settingsBuilder.listNodePoolsSettings().build();
getNodePoolSettings = settingsBuilder.getNodePoolSettings().build();
createNodePoolSettings = settingsBuilder.createNodePoolSettings().build();
Expand Down Expand Up @@ -528,6 +538,8 @@ public static class Builder extends StubSettings.Builder<ClusterManagerStubSetti
private final UnaryCallSettings.Builder<CancelOperationRequest, Empty> cancelOperationSettings;
private final UnaryCallSettings.Builder<GetServerConfigRequest, ServerConfig>
getServerConfigSettings;
private final UnaryCallSettings.Builder<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
getJSONWebKeysSettings;
private final UnaryCallSettings.Builder<ListNodePoolsRequest, ListNodePoolsResponse>
listNodePoolsSettings;
private final UnaryCallSettings.Builder<GetNodePoolRequest, NodePool> getNodePoolSettings;
Expand Down Expand Up @@ -644,6 +656,8 @@ protected Builder(ClientContext clientContext) {

getServerConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();

getJSONWebKeysSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();

listNodePoolsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();

getNodePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
Expand Down Expand Up @@ -692,6 +706,7 @@ protected Builder(ClientContext clientContext) {
getOperationSettings,
cancelOperationSettings,
getServerConfigSettings,
getJSONWebKeysSettings,
listNodePoolsSettings,
getNodePoolSettings,
createNodePoolSettings,
Expand Down Expand Up @@ -806,6 +821,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));

builder
.getJSONWebKeysSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.listNodePoolsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
Expand Down Expand Up @@ -899,6 +919,7 @@ protected Builder(ClusterManagerStubSettings settings) {
getOperationSettings = settings.getOperationSettings.toBuilder();
cancelOperationSettings = settings.cancelOperationSettings.toBuilder();
getServerConfigSettings = settings.getServerConfigSettings.toBuilder();
getJSONWebKeysSettings = settings.getJSONWebKeysSettings.toBuilder();
listNodePoolsSettings = settings.listNodePoolsSettings.toBuilder();
getNodePoolSettings = settings.getNodePoolSettings.toBuilder();
createNodePoolSettings = settings.createNodePoolSettings.toBuilder();
Expand Down Expand Up @@ -933,6 +954,7 @@ protected Builder(ClusterManagerStubSettings settings) {
getOperationSettings,
cancelOperationSettings,
getServerConfigSettings,
getJSONWebKeysSettings,
listNodePoolsSettings,
getNodePoolSettings,
createNodePoolSettings,
Expand Down Expand Up @@ -1056,6 +1078,12 @@ public UnaryCallSettings.Builder<CancelOperationRequest, Empty> cancelOperationS
return getServerConfigSettings;
}

/** Returns the builder for the settings used for calls to getJSONWebKeys. */
public UnaryCallSettings.Builder<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
getJSONWebKeysSettings() {
return getJSONWebKeysSettings;
}

/** Returns the builder for the settings used for calls to listNodePools. */
public UnaryCallSettings.Builder<ListNodePoolsRequest, ListNodePoolsResponse>
listNodePoolsSettings() {
Expand Down

0 comments on commit 54f7921

Please sign in to comment.