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

feat: Add OnPremCluster and MultiCloudCluster as GkeCluster equivalent field #108

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,15 @@

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: GKE Hub CRUD API for the Membership resource. The Membership service is
* currently only available in the global location.
* Service Description: The GKE Hub service handles the registration of many Kubernetes clusters to
* Google Cloud, represented with the [Membership][google.cloud.gkehub.v1alpha2.Membership]
* resource.
*
* <p>GKE Hub is currently only available in the global region.
*
* <p>&#42;&#42;Membership management may be non-trivial:&#42;&#42; it is recommended to use one of
* the Google-provided client libraries or tools where possible when working with Membership
* resources.
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down Expand Up @@ -400,7 +407,11 @@ public final UnaryCallable<GetMembershipRequest, Membership> getMembershipCallab

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -438,7 +449,11 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -476,7 +491,11 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand All @@ -502,7 +521,11 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand All @@ -528,7 +551,11 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand All @@ -554,6 +581,10 @@ public final UnaryCallable<CreateMembershipRequest, Operation> createMembershipC
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand All @@ -578,6 +609,10 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand All @@ -600,6 +635,10 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(Str
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand All @@ -624,6 +663,10 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand All @@ -648,6 +691,10 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -686,7 +733,9 @@ public final UnaryCallable<DeleteMembershipRequest, Operation> deleteMembershipC
* @param resource Required. Only fields specified in update_mask are updated. If you specify a
* field in the update_mask but don't specify its value here that field will be deleted. If
* you are updating a map field, set the value of a key to null or empty string to delete the
* key from the map. It's not possible to update a key's value to the empty string.
* key from the map. It's not possible to update a key's value to the empty string. If you
* specify the update_mask to be a special path "&#42;", fully replaces all user-modifiable
* fields to match `resource`.
* @param updateMask Required. Mask of fields to update.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand Down Expand Up @@ -781,6 +830,9 @@ public final UnaryCallable<UpdateMembershipRequest, Operation> updateMembershipC
/**
* Generates the manifest for deployment of the GKE connect agent.
*
* <p>&#42;&#42;This method is used internally by Google-provided libraries.&#42;&#42; Most
* clients should not need to call this method directly.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -811,6 +863,9 @@ public final GenerateConnectManifestResponse generateConnectManifest(
/**
* Generates the manifest for deployment of the GKE connect agent.
*
* <p>&#42;&#42;This method is used internally by Google-provided libraries.&#42;&#42; Most
* clients should not need to call this method directly.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to GKE Hub API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= GkeHubClient =======================
*
* <p>Service Description: GKE Hub CRUD API for the Membership resource. The Membership service is
* currently only available in the global location.
* <p>Service Description: The GKE Hub service handles the registration of many Kubernetes clusters
* to Google Cloud, represented with the [Membership][google.cloud.gkehub.v1alpha2.Membership]
* resource.
*
* <p>GKE Hub is currently only available in the global region.
*
* <p>&#42;&#42;Membership management may be non-trivial:&#42;&#42; it is recommended to use one of
* the Google-provided client libraries or tools where possible when working with Membership
* resources.
*
* <p>Sample for GkeHubClient:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Loading