Skip to content

Commit b8cd6a3

Browse files
feat: [gke-multi-cloud] added proxy support for Attached Clusters (#10161)
* feat: added proxy support for Attached Clusters feat: added Binary Authorization support which is a deploy-time security control that ensures only trusted container images are deployed feat: added support for a new admin-groups flag in the create and update APIs feat: added Surge Update and Rollback support for AWS Node Pools feat: added support for per-node-pool subnet security group rules for AWS Node Pools feat: added support for EC2 Spot instance types for AWS Node Pools feat: added force-deletion support for AWS Clusters & Node Pools feat: expanded Kubernetes version info docs: updated comments of existing fields PiperOrigin-RevId: 591286857 Source-Link: googleapis/googleapis@91bd792 Source-Link: https://github.com/googleapis/googleapis-gen/commit/afb34ad26ec637c1d5f983dd1d92ee5d4b5bd64f Copy-Tag: eyJwIjoiamF2YS1na2UtbXVsdGktY2xvdWQvLk93bEJvdC55YW1sIiwiaCI6ImFmYjM0YWQyNmVjNjM3YzFkNWY5ODNkZDFkOTJlZTVkNGI1YmQ2NGYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 16f75a7 commit b8cd6a3

191 files changed

Lines changed: 48324 additions & 1267 deletions

File tree

Some content is hidden

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

java-gke-multi-cloud/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
201201
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
202202
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
203203
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-gke-multi-cloud.svg
204-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-multi-cloud/0.29.0
204+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-multi-cloud/0.31.0
205205
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
206206
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
207207
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersClient.java

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,11 @@ public final OperationFuture<AttachedCluster, OperationMetadata> createAttachedC
453453
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
454454
* this field. The elements of the repeated paths field can only include these fields from
455455
* [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]:
456-
* <p>&#42; `description`. &#42; `annotations`. &#42; `platform_version`. &#42;
457-
* `authorization.admin_users`. &#42; `logging_config.component_config.enable_components`.
458-
* &#42; `monitoring_config.managed_prometheus_config.enabled`.
456+
* <p>&#42; `annotations`. &#42; `authorization.admin_groups`. &#42;
457+
* `authorization.admin_users`. &#42; `binary_authorization.evaluation_mode`. &#42;
458+
* `description`. &#42; `logging_config.component_config.enable_components`. &#42;
459+
* `monitoring_config.managed_prometheus_config.enabled`. &#42; `platform_version`. &#42;
460+
* `proxy_config.kubernetes_secret.name`. &#42; `proxy_config.kubernetes_secret.namespace`.
459461
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
460462
*/
461463
public final OperationFuture<AttachedCluster, OperationMetadata> updateAttachedClusterAsync(
@@ -681,6 +683,7 @@ public final OperationFuture<AttachedCluster, OperationMetadata> importAttachedC
681683
* .setFleetMembership("fleetMembership-665479228")
682684
* .setPlatformVersion("platformVersion1848800485")
683685
* .setDistribution("distribution-1580708220")
686+
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
684687
* .build();
685688
* AttachedCluster response = attachedClustersClient.importAttachedClusterAsync(request).get();
686689
* }
@@ -722,6 +725,7 @@ public final OperationFuture<AttachedCluster, OperationMetadata> importAttachedC
722725
* .setFleetMembership("fleetMembership-665479228")
723726
* .setPlatformVersion("platformVersion1848800485")
724727
* .setDistribution("distribution-1580708220")
728+
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
725729
* .build();
726730
* OperationFuture<AttachedCluster, OperationMetadata> future =
727731
* attachedClustersClient.importAttachedClusterOperationCallable().futureCall(request);
@@ -763,6 +767,7 @@ public final OperationFuture<AttachedCluster, OperationMetadata> importAttachedC
763767
* .setFleetMembership("fleetMembership-665479228")
764768
* .setPlatformVersion("platformVersion1848800485")
765769
* .setDistribution("distribution-1580708220")
770+
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
766771
* .build();
767772
* ApiFuture<Operation> future =
768773
* attachedClustersClient.importAttachedClusterCallable().futureCall(request);
@@ -1519,6 +1524,7 @@ public final AttachedServerConfig getAttachedServerConfig(
15191524
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
15201525
* .setAttachedClusterId("attachedClusterId865943409")
15211526
* .setPlatformVersion("platformVersion1848800485")
1527+
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
15221528
* .build();
15231529
* GenerateAttachedClusterInstallManifestResponse response =
15241530
* attachedClustersClient.generateAttachedClusterInstallManifest(request);
@@ -1552,6 +1558,7 @@ public final AttachedServerConfig getAttachedServerConfig(
15521558
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
15531559
* .setAttachedClusterId("attachedClusterId865943409")
15541560
* .setPlatformVersion("platformVersion1848800485")
1561+
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
15551562
* .build();
15561563
* ApiFuture<GenerateAttachedClusterInstallManifestResponse> future =
15571564
* attachedClustersClient
@@ -1569,6 +1576,86 @@ public final AttachedServerConfig getAttachedServerConfig(
15691576
return stub.generateAttachedClusterInstallManifestCallable();
15701577
}
15711578

1579+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1580+
/**
1581+
* Generates an access token for a cluster agent.
1582+
*
1583+
* <p>Sample code:
1584+
*
1585+
* <pre>{@code
1586+
* // This snippet has been automatically generated and should be regarded as a code template only.
1587+
* // It will require modifications to work:
1588+
* // - It may require correct/in-range values for request initialization.
1589+
* // - It may require specifying regional endpoints when creating the service client as shown in
1590+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1591+
* try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
1592+
* GenerateAttachedClusterAgentTokenRequest request =
1593+
* GenerateAttachedClusterAgentTokenRequest.newBuilder()
1594+
* .setAttachedCluster(
1595+
* AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
1596+
* .toString())
1597+
* .setSubjectToken("subjectToken-1519661011")
1598+
* .setSubjectTokenType("subjectTokenType1839592711")
1599+
* .setVersion("version351608024")
1600+
* .setGrantType("grantType-1219832202")
1601+
* .setAudience("audience975628804")
1602+
* .setScope("scope109264468")
1603+
* .setRequestedTokenType("requestedTokenType1733106949")
1604+
* .setOptions("options-1249474914")
1605+
* .build();
1606+
* GenerateAttachedClusterAgentTokenResponse response =
1607+
* attachedClustersClient.generateAttachedClusterAgentToken(request);
1608+
* }
1609+
* }</pre>
1610+
*
1611+
* @param request The request object containing all of the parameters for the API call.
1612+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1613+
*/
1614+
public final GenerateAttachedClusterAgentTokenResponse generateAttachedClusterAgentToken(
1615+
GenerateAttachedClusterAgentTokenRequest request) {
1616+
return generateAttachedClusterAgentTokenCallable().call(request);
1617+
}
1618+
1619+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1620+
/**
1621+
* Generates an access token for a cluster agent.
1622+
*
1623+
* <p>Sample code:
1624+
*
1625+
* <pre>{@code
1626+
* // This snippet has been automatically generated and should be regarded as a code template only.
1627+
* // It will require modifications to work:
1628+
* // - It may require correct/in-range values for request initialization.
1629+
* // - It may require specifying regional endpoints when creating the service client as shown in
1630+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1631+
* try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
1632+
* GenerateAttachedClusterAgentTokenRequest request =
1633+
* GenerateAttachedClusterAgentTokenRequest.newBuilder()
1634+
* .setAttachedCluster(
1635+
* AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
1636+
* .toString())
1637+
* .setSubjectToken("subjectToken-1519661011")
1638+
* .setSubjectTokenType("subjectTokenType1839592711")
1639+
* .setVersion("version351608024")
1640+
* .setGrantType("grantType-1219832202")
1641+
* .setAudience("audience975628804")
1642+
* .setScope("scope109264468")
1643+
* .setRequestedTokenType("requestedTokenType1733106949")
1644+
* .setOptions("options-1249474914")
1645+
* .build();
1646+
* ApiFuture<GenerateAttachedClusterAgentTokenResponse> future =
1647+
* attachedClustersClient.generateAttachedClusterAgentTokenCallable().futureCall(request);
1648+
* // Do something.
1649+
* GenerateAttachedClusterAgentTokenResponse response = future.get();
1650+
* }
1651+
* }</pre>
1652+
*/
1653+
public final UnaryCallable<
1654+
GenerateAttachedClusterAgentTokenRequest, GenerateAttachedClusterAgentTokenResponse>
1655+
generateAttachedClusterAgentTokenCallable() {
1656+
return stub.generateAttachedClusterAgentTokenCallable();
1657+
}
1658+
15721659
@Override
15731660
public final void close() {
15741661
stub.close();

java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersSettings.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ public class AttachedClustersSettings extends ClientSettings<AttachedClustersSet
162162
.generateAttachedClusterInstallManifestSettings();
163163
}
164164

165+
/** Returns the object with the settings used for calls to generateAttachedClusterAgentToken. */
166+
public UnaryCallSettings<
167+
GenerateAttachedClusterAgentTokenRequest, GenerateAttachedClusterAgentTokenResponse>
168+
generateAttachedClusterAgentTokenSettings() {
169+
return ((AttachedClustersStubSettings) getStubSettings())
170+
.generateAttachedClusterAgentTokenSettings();
171+
}
172+
165173
public static final AttachedClustersSettings create(AttachedClustersStubSettings stub)
166174
throws IOException {
167175
return new AttachedClustersSettings.Builder(stub.toBuilder()).build();
@@ -360,6 +368,13 @@ public Builder applyToAllUnaryMethods(
360368
return getStubSettingsBuilder().generateAttachedClusterInstallManifestSettings();
361369
}
362370

371+
/** Returns the builder for the settings used for calls to generateAttachedClusterAgentToken. */
372+
public UnaryCallSettings.Builder<
373+
GenerateAttachedClusterAgentTokenRequest, GenerateAttachedClusterAgentTokenResponse>
374+
generateAttachedClusterAgentTokenSettings() {
375+
return getStubSettingsBuilder().generateAttachedClusterAgentTokenSettings();
376+
}
377+
363378
@Override
364379
public AttachedClustersSettings build() throws IOException {
365380
return new AttachedClustersSettings(this);

0 commit comments

Comments
 (0)