Skip to content

Commit

Permalink
feat: [gke-multi-cloud] added proxy support for Attached Clusters (#1…
Browse files Browse the repository at this point in the history
…0161)

* 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: googleapis/googleapis-gen@afb34ad
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 2, 2024
1 parent 16f75a7 commit b8cd6a3
Show file tree
Hide file tree
Showing 191 changed files with 48,324 additions and 1,267 deletions.
2 changes: 1 addition & 1 deletion java-gke-multi-cloud/README.md
Expand Up @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-gke-multi-cloud.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-multi-cloud/0.29.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-multi-cloud/0.31.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Expand Up @@ -453,9 +453,11 @@ public final OperationFuture<AttachedCluster, OperationMetadata> createAttachedC
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
* this field. The elements of the repeated paths field can only include these fields from
* [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]:
* <p>&#42; `description`. &#42; `annotations`. &#42; `platform_version`. &#42;
* `authorization.admin_users`. &#42; `logging_config.component_config.enable_components`.
* &#42; `monitoring_config.managed_prometheus_config.enabled`.
* <p>&#42; `annotations`. &#42; `authorization.admin_groups`. &#42;
* `authorization.admin_users`. &#42; `binary_authorization.evaluation_mode`. &#42;
* `description`. &#42; `logging_config.component_config.enable_components`. &#42;
* `monitoring_config.managed_prometheus_config.enabled`. &#42; `platform_version`. &#42;
* `proxy_config.kubernetes_secret.name`. &#42; `proxy_config.kubernetes_secret.namespace`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<AttachedCluster, OperationMetadata> updateAttachedClusterAsync(
Expand Down Expand Up @@ -681,6 +683,7 @@ public final OperationFuture<AttachedCluster, OperationMetadata> importAttachedC
* .setFleetMembership("fleetMembership-665479228")
* .setPlatformVersion("platformVersion1848800485")
* .setDistribution("distribution-1580708220")
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
* .build();
* AttachedCluster response = attachedClustersClient.importAttachedClusterAsync(request).get();
* }
Expand Down Expand Up @@ -722,6 +725,7 @@ public final OperationFuture<AttachedCluster, OperationMetadata> importAttachedC
* .setFleetMembership("fleetMembership-665479228")
* .setPlatformVersion("platformVersion1848800485")
* .setDistribution("distribution-1580708220")
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
* .build();
* OperationFuture<AttachedCluster, OperationMetadata> future =
* attachedClustersClient.importAttachedClusterOperationCallable().futureCall(request);
Expand Down Expand Up @@ -763,6 +767,7 @@ public final OperationFuture<AttachedCluster, OperationMetadata> importAttachedC
* .setFleetMembership("fleetMembership-665479228")
* .setPlatformVersion("platformVersion1848800485")
* .setDistribution("distribution-1580708220")
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
* .build();
* ApiFuture<Operation> future =
* attachedClustersClient.importAttachedClusterCallable().futureCall(request);
Expand Down Expand Up @@ -1519,6 +1524,7 @@ public final AttachedServerConfig getAttachedServerConfig(
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAttachedClusterId("attachedClusterId865943409")
* .setPlatformVersion("platformVersion1848800485")
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
* .build();
* GenerateAttachedClusterInstallManifestResponse response =
* attachedClustersClient.generateAttachedClusterInstallManifest(request);
Expand Down Expand Up @@ -1552,6 +1558,7 @@ public final AttachedServerConfig getAttachedServerConfig(
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setAttachedClusterId("attachedClusterId865943409")
* .setPlatformVersion("platformVersion1848800485")
* .setProxyConfig(AttachedProxyConfig.newBuilder().build())
* .build();
* ApiFuture<GenerateAttachedClusterInstallManifestResponse> future =
* attachedClustersClient
Expand All @@ -1569,6 +1576,86 @@ public final AttachedServerConfig getAttachedServerConfig(
return stub.generateAttachedClusterInstallManifestCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates an access token for a cluster agent.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
* GenerateAttachedClusterAgentTokenRequest request =
* GenerateAttachedClusterAgentTokenRequest.newBuilder()
* .setAttachedCluster(
* AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
* .toString())
* .setSubjectToken("subjectToken-1519661011")
* .setSubjectTokenType("subjectTokenType1839592711")
* .setVersion("version351608024")
* .setGrantType("grantType-1219832202")
* .setAudience("audience975628804")
* .setScope("scope109264468")
* .setRequestedTokenType("requestedTokenType1733106949")
* .setOptions("options-1249474914")
* .build();
* GenerateAttachedClusterAgentTokenResponse response =
* attachedClustersClient.generateAttachedClusterAgentToken(request);
* }
* }</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 GenerateAttachedClusterAgentTokenResponse generateAttachedClusterAgentToken(
GenerateAttachedClusterAgentTokenRequest request) {
return generateAttachedClusterAgentTokenCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates an access token for a cluster agent.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
* GenerateAttachedClusterAgentTokenRequest request =
* GenerateAttachedClusterAgentTokenRequest.newBuilder()
* .setAttachedCluster(
* AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
* .toString())
* .setSubjectToken("subjectToken-1519661011")
* .setSubjectTokenType("subjectTokenType1839592711")
* .setVersion("version351608024")
* .setGrantType("grantType-1219832202")
* .setAudience("audience975628804")
* .setScope("scope109264468")
* .setRequestedTokenType("requestedTokenType1733106949")
* .setOptions("options-1249474914")
* .build();
* ApiFuture<GenerateAttachedClusterAgentTokenResponse> future =
* attachedClustersClient.generateAttachedClusterAgentTokenCallable().futureCall(request);
* // Do something.
* GenerateAttachedClusterAgentTokenResponse response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<
GenerateAttachedClusterAgentTokenRequest, GenerateAttachedClusterAgentTokenResponse>
generateAttachedClusterAgentTokenCallable() {
return stub.generateAttachedClusterAgentTokenCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
Expand Up @@ -162,6 +162,14 @@ public class AttachedClustersSettings extends ClientSettings<AttachedClustersSet
.generateAttachedClusterInstallManifestSettings();
}

/** Returns the object with the settings used for calls to generateAttachedClusterAgentToken. */
public UnaryCallSettings<
GenerateAttachedClusterAgentTokenRequest, GenerateAttachedClusterAgentTokenResponse>
generateAttachedClusterAgentTokenSettings() {
return ((AttachedClustersStubSettings) getStubSettings())
.generateAttachedClusterAgentTokenSettings();
}

public static final AttachedClustersSettings create(AttachedClustersStubSettings stub)
throws IOException {
return new AttachedClustersSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -360,6 +368,13 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().generateAttachedClusterInstallManifestSettings();
}

/** Returns the builder for the settings used for calls to generateAttachedClusterAgentToken. */
public UnaryCallSettings.Builder<
GenerateAttachedClusterAgentTokenRequest, GenerateAttachedClusterAgentTokenResponse>
generateAttachedClusterAgentTokenSettings() {
return getStubSettingsBuilder().generateAttachedClusterAgentTokenSettings();
}

@Override
public AttachedClustersSettings build() throws IOException {
return new AttachedClustersSettings(this);
Expand Down

0 comments on commit b8cd6a3

Please sign in to comment.