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

Commit 8882a96

Browse files
feat(v1): sync v1 GKE API (#289)
* 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 This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/c20efb24-7a7c-45d4-9989-31379a77571d/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 342116206 Source-Link: googleapis/googleapis@75d1324 Source-Link: googleapis/synthtool@7d65281
1 parent f09673f commit 8882a96

File tree

141 files changed

+35623
-3229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+35623
-3229
lines changed

.github/workflows/formatting.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
java-version: 11
2020
- run: "mvn com.coveo:fmt-maven-plugin:format"
21-
- uses: googleapis/code-suggester@v1.8.0
21+
- uses: googleapis/code-suggester@v1
2222
with:
2323
command: review
2424
pull_number: ${{ github.event.pull_request.number }}

google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java

+106-18
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
import com.google.container.v1.DeleteClusterRequest;
3939
import com.google.container.v1.DeleteNodePoolRequest;
4040
import com.google.container.v1.GetClusterRequest;
41+
import com.google.container.v1.GetJSONWebKeysRequest;
42+
import com.google.container.v1.GetJSONWebKeysResponse;
4143
import com.google.container.v1.GetNodePoolRequest;
4244
import com.google.container.v1.GetOperationRequest;
4345
import com.google.container.v1.GetServerConfigRequest;
@@ -418,7 +420,7 @@ public final UnaryCallable<GetClusterRequest, Cluster> getClusterCallable() {
418420
* [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides.
419421
* This field has been deprecated and replaced by the parent field.
420422
* @param cluster Required. A [cluster
421-
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters)
423+
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
422424
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
423425
*/
424426
public final Operation createCluster(String projectId, String zone, Cluster cluster) {
@@ -459,7 +461,7 @@ public final Operation createCluster(String projectId, String zone, Cluster clus
459461
* @param parent The parent (project and location) where the cluster will be created. Specified in
460462
* the format `projects/&#42;/locations/&#42;`.
461463
* @param cluster Required. A [cluster
462-
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters)
464+
* resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
463465
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
464466
*/
465467
public final Operation createCluster(String parent, Cluster cluster) {
@@ -763,10 +765,14 @@ public final Operation setNodePoolAutoscaling(SetNodePoolAutoscalingRequest requ
763765
* This field has been deprecated and replaced by the name field.
764766
* @param clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated
765767
* and replaced by the name field.
766-
* @param loggingService Required. The logging service the cluster should use to write metrics.
768+
* @param loggingService Required. The logging service the cluster should use to write logs.
767769
* Currently available options:
768-
* <p>&#42; "logging.googleapis.com" - the Google Cloud Logging service &#42; "none" - no
769-
* metrics will be exported from the cluster
770+
* <p>&#42; `logging.googleapis.com/kubernetes` - The Cloud Logging service with a
771+
* Kubernetes-native resource model &#42; `logging.googleapis.com` - The legacy Cloud Logging
772+
* service (no longer available as of GKE 1.15). &#42; `none` - no logs will be exported from
773+
* the cluster.
774+
* <p>If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE
775+
* 1.14+ or `logging.googleapis.com` for earlier versions.
770776
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
771777
*/
772778
public final Operation setLoggingService(
@@ -797,10 +803,14 @@ public final Operation setLoggingService(
797803
*
798804
* @param name The name (project, location, cluster) of the cluster to set logging. Specified in
799805
* the format `projects/&#42;/locations/&#42;/clusters/&#42;`.
800-
* @param loggingService Required. The logging service the cluster should use to write metrics.
806+
* @param loggingService Required. The logging service the cluster should use to write logs.
801807
* Currently available options:
802-
* <p>&#42; "logging.googleapis.com" - the Google Cloud Logging service &#42; "none" - no
803-
* metrics will be exported from the cluster
808+
* <p>&#42; `logging.googleapis.com/kubernetes` - The Cloud Logging service with a
809+
* Kubernetes-native resource model &#42; `logging.googleapis.com` - The legacy Cloud Logging
810+
* service (no longer available as of GKE 1.15). &#42; `none` - no logs will be exported from
811+
* the cluster.
812+
* <p>If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE
813+
* 1.14+ or `logging.googleapis.com` for earlier versions.
804814
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
805815
*/
806816
public final Operation setLoggingService(String name, String loggingService) {
@@ -883,9 +893,12 @@ public final UnaryCallable<SetLoggingServiceRequest, Operation> setLoggingServic
883893
* and replaced by the name field.
884894
* @param monitoringService Required. The monitoring service the cluster should use to write
885895
* metrics. Currently available options:
886-
* <p>&#42; "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring service with
887-
* Kubernetes-native resource model &#42; "monitoring.googleapis.com" - the Google Cloud
888-
* Monitoring service &#42; "none" - no metrics will be exported from the cluster
896+
* <p>&#42; "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a
897+
* Kubernetes-native resource model &#42; `monitoring.googleapis.com` - The legacy Cloud
898+
* Monitoring service (no longer available as of GKE 1.15). &#42; `none` - No metrics will be
899+
* exported from the cluster.
900+
* <p>If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE
901+
* 1.14+ or `monitoring.googleapis.com` for earlier versions.
889902
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
890903
*/
891904
public final Operation setMonitoringService(
@@ -918,9 +931,12 @@ public final Operation setMonitoringService(
918931
* in the format `projects/&#42;/locations/&#42;/clusters/&#42;`.
919932
* @param monitoringService Required. The monitoring service the cluster should use to write
920933
* metrics. Currently available options:
921-
* <p>&#42; "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring service with
922-
* Kubernetes-native resource model &#42; "monitoring.googleapis.com" - the Google Cloud
923-
* Monitoring service &#42; "none" - no metrics will be exported from the cluster
934+
* <p>&#42; "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a
935+
* Kubernetes-native resource model &#42; `monitoring.googleapis.com` - The legacy Cloud
936+
* Monitoring service (no longer available as of GKE 1.15). &#42; `none` - No metrics will be
937+
* exported from the cluster.
938+
* <p>If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE
939+
* 1.14+ or `monitoring.googleapis.com` for earlier versions.
924940
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
925941
*/
926942
public final Operation setMonitoringService(String name, String monitoringService) {
@@ -1091,7 +1107,9 @@ public final UnaryCallable<SetAddonsConfigRequest, Operation> setAddonsConfigCal
10911107

10921108
// AUTO-GENERATED DOCUMENTATION AND METHOD
10931109
/**
1094-
* Sets the locations for a specific cluster.
1110+
* Sets the locations for a specific cluster. Deprecated. Use
1111+
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
1112+
* instead.
10951113
*
10961114
* <p>Sample code:
10971115
*
@@ -1135,7 +1153,9 @@ public final Operation setLocations(
11351153

11361154
// AUTO-GENERATED DOCUMENTATION AND METHOD
11371155
/**
1138-
* Sets the locations for a specific cluster.
1156+
* Sets the locations for a specific cluster. Deprecated. Use
1157+
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
1158+
* instead.
11391159
*
11401160
* <p>Sample code:
11411161
*
@@ -1165,7 +1185,9 @@ public final Operation setLocations(String name, List<String> locations) {
11651185

11661186
// AUTO-GENERATED DOCUMENTATION AND METHOD
11671187
/**
1168-
* Sets the locations for a specific cluster.
1188+
* Sets the locations for a specific cluster. Deprecated. Use
1189+
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
1190+
* instead.
11691191
*
11701192
* <p>Sample code:
11711193
*
@@ -1188,7 +1210,9 @@ public final Operation setLocations(SetLocationsRequest request) {
11881210

11891211
// AUTO-GENERATED DOCUMENTATION AND METHOD
11901212
/**
1191-
* Sets the locations for a specific cluster.
1213+
* Sets the locations for a specific cluster. Deprecated. Use
1214+
* [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
1215+
* instead.
11921216
*
11931217
* <p>Sample code:
11941218
*
@@ -1603,6 +1627,28 @@ public final Operation getOperation(String projectId, String zone, String operat
16031627
return getOperation(request);
16041628
}
16051629

1630+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1631+
/**
1632+
* Gets the specified operation.
1633+
*
1634+
* <p>Sample code:
1635+
*
1636+
* <pre><code>
1637+
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
1638+
* String name = "";
1639+
* Operation response = clusterManagerClient.getOperation(name);
1640+
* }
1641+
* </code></pre>
1642+
*
1643+
* @param name The name (project, location, operation id) of the operation to get. Specified in
1644+
* the format `projects/&#42;/locations/&#42;/operations/&#42;`.
1645+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1646+
*/
1647+
public final Operation getOperation(String name) {
1648+
GetOperationRequest request = GetOperationRequest.newBuilder().setName(name).build();
1649+
return getOperation(request);
1650+
}
1651+
16061652
// AUTO-GENERATED DOCUMENTATION AND METHOD
16071653
/**
16081654
* Gets the specified operation.
@@ -1827,6 +1873,48 @@ public final UnaryCallable<GetServerConfigRequest, ServerConfig> getServerConfig
18271873
return stub.getServerConfigCallable();
18281874
}
18291875

1876+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1877+
/**
1878+
* Gets the public component of the cluster signing keys in JSON Web Key format. This API is not
1879+
* yet intended for general use, and is not available for all clusters.
1880+
*
1881+
* <p>Sample code:
1882+
*
1883+
* <pre><code>
1884+
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
1885+
* GetJSONWebKeysRequest request = GetJSONWebKeysRequest.newBuilder().build();
1886+
* GetJSONWebKeysResponse response = clusterManagerClient.getJSONWebKeys(request);
1887+
* }
1888+
* </code></pre>
1889+
*
1890+
* @param request The request object containing all of the parameters for the API call.
1891+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1892+
*/
1893+
public final GetJSONWebKeysResponse getJSONWebKeys(GetJSONWebKeysRequest request) {
1894+
return getJSONWebKeysCallable().call(request);
1895+
}
1896+
1897+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1898+
/**
1899+
* Gets the public component of the cluster signing keys in JSON Web Key format. This API is not
1900+
* yet intended for general use, and is not available for all clusters.
1901+
*
1902+
* <p>Sample code:
1903+
*
1904+
* <pre><code>
1905+
* try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
1906+
* GetJSONWebKeysRequest request = GetJSONWebKeysRequest.newBuilder().build();
1907+
* ApiFuture&lt;GetJSONWebKeysResponse&gt; future = clusterManagerClient.getJSONWebKeysCallable().futureCall(request);
1908+
* // Do something
1909+
* GetJSONWebKeysResponse response = future.get();
1910+
* }
1911+
* </code></pre>
1912+
*/
1913+
public final UnaryCallable<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
1914+
getJSONWebKeysCallable() {
1915+
return stub.getJSONWebKeysCallable();
1916+
}
1917+
18301918
// AUTO-GENERATED DOCUMENTATION AND METHOD
18311919
/**
18321920
* Lists the node pools for a cluster.

google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java

+13
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
import com.google.container.v1.DeleteClusterRequest;
3838
import com.google.container.v1.DeleteNodePoolRequest;
3939
import com.google.container.v1.GetClusterRequest;
40+
import com.google.container.v1.GetJSONWebKeysRequest;
41+
import com.google.container.v1.GetJSONWebKeysResponse;
4042
import com.google.container.v1.GetNodePoolRequest;
4143
import com.google.container.v1.GetOperationRequest;
4244
import com.google.container.v1.GetServerConfigRequest;
@@ -193,6 +195,11 @@ public UnaryCallSettings<GetServerConfigRequest, ServerConfig> getServerConfigSe
193195
return ((ClusterManagerStubSettings) getStubSettings()).getServerConfigSettings();
194196
}
195197

198+
/** Returns the object with the settings used for calls to getJSONWebKeys. */
199+
public UnaryCallSettings<GetJSONWebKeysRequest, GetJSONWebKeysResponse> getJSONWebKeysSettings() {
200+
return ((ClusterManagerStubSettings) getStubSettings()).getJSONWebKeysSettings();
201+
}
202+
196203
/** Returns the object with the settings used for calls to listNodePools. */
197204
public UnaryCallSettings<ListNodePoolsRequest, ListNodePoolsResponse> listNodePoolsSettings() {
198205
return ((ClusterManagerStubSettings) getStubSettings()).listNodePoolsSettings();
@@ -457,6 +464,12 @@ public UnaryCallSettings.Builder<CancelOperationRequest, Empty> cancelOperationS
457464
return getStubSettingsBuilder().getServerConfigSettings();
458465
}
459466

467+
/** Returns the builder for the settings used for calls to getJSONWebKeys. */
468+
public UnaryCallSettings.Builder<GetJSONWebKeysRequest, GetJSONWebKeysResponse>
469+
getJSONWebKeysSettings() {
470+
return getStubSettingsBuilder().getJSONWebKeysSettings();
471+
}
472+
460473
/** Returns the builder for the settings used for calls to listNodePools. */
461474
public UnaryCallSettings.Builder<ListNodePoolsRequest, ListNodePoolsResponse>
462475
listNodePoolsSettings() {

google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStub.java

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
import com.google.container.v1.DeleteClusterRequest;
2929
import com.google.container.v1.DeleteNodePoolRequest;
3030
import com.google.container.v1.GetClusterRequest;
31+
import com.google.container.v1.GetJSONWebKeysRequest;
32+
import com.google.container.v1.GetJSONWebKeysResponse;
3133
import com.google.container.v1.GetNodePoolRequest;
3234
import com.google.container.v1.GetOperationRequest;
3335
import com.google.container.v1.GetServerConfigRequest;
@@ -140,6 +142,10 @@ public UnaryCallable<GetServerConfigRequest, ServerConfig> getServerConfigCallab
140142
throw new UnsupportedOperationException("Not implemented: getServerConfigCallable()");
141143
}
142144

145+
public UnaryCallable<GetJSONWebKeysRequest, GetJSONWebKeysResponse> getJSONWebKeysCallable() {
146+
throw new UnsupportedOperationException("Not implemented: getJSONWebKeysCallable()");
147+
}
148+
143149
public UnaryCallable<ListNodePoolsRequest, ListNodePoolsResponse> listNodePoolsCallable() {
144150
throw new UnsupportedOperationException("Not implemented: listNodePoolsCallable()");
145151
}

0 commit comments

Comments
 (0)