@@ -32,8 +32,14 @@ option java_package = "com.google.cloud.gkehub.v1alpha2";
3232option php_namespace = "Google\\Cloud\\GkeHub\\V1alpha2" ;
3333option ruby_package = "Google::Cloud::GkeHub::V1alpha2" ;
3434
35- // GKE Hub CRUD API for the Membership resource.
36- // The Membership service is currently only available in the global location.
35+ // The GKE Hub service handles the registration of many Kubernetes
36+ // clusters to Google Cloud, represented with the [Membership][google.cloud.gkehub.v1alpha2.Membership] resource.
37+ //
38+ // GKE Hub is currently only available in the global region.
39+ //
40+ // **Membership management may be non-trivial:** it is recommended to use one
41+ // of the Google-provided client libraries or tools where possible when working
42+ // with Membership resources.
3743service GkeHub {
3844 option (google.api.default_host ) = "gkehub.googleapis.com" ;
3945 option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
@@ -54,7 +60,11 @@ service GkeHub {
5460 option (google.api.method_signature ) = "name" ;
5561 }
5662
57- // Adds a new Membership.
63+ // Creates a new Membership.
64+ //
65+ // **This is currently only supported for GKE clusters on Google Cloud**.
66+ // To register other clusters, follow the instructions at
67+ // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
5868 rpc CreateMembership (CreateMembershipRequest ) returns (google.longrunning.Operation ) {
5969 option (google.api.http ) = {
6070 post : "/v1alpha2/{parent=projects/*/locations/*}/memberships"
@@ -68,6 +78,10 @@ service GkeHub {
6878 }
6979
7080 // Removes a Membership.
81+ //
82+ // **This is currently only supported for GKE clusters on Google Cloud**.
83+ // To unregister other clusters, follow the instructions at
84+ // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
7185 rpc DeleteMembership (DeleteMembershipRequest ) returns (google.longrunning.Operation ) {
7286 option (google.api.http ) = {
7387 delete : "/v1alpha2/{name=projects/*/locations/*/memberships/*}"
@@ -93,6 +107,9 @@ service GkeHub {
93107 }
94108
95109 // Generates the manifest for deployment of the GKE connect agent.
110+ //
111+ // **This method is used internally by Google-provided libraries.**
112+ // Most clients should not need to call this method directly.
96113 rpc GenerateConnectManifest (GenerateConnectManifestRequest ) returns (GenerateConnectManifestResponse ) {
97114 option (google.api.http ) = {
98115 get : "/v1alpha2/{name=projects/*/locations/*/memberships/*}:generateConnectManifest"
@@ -214,8 +231,17 @@ message Membership {
214231// MembershipEndpoint contains information needed to contact a Kubernetes API,
215232// endpoint and any additional Kubernetes metadata.
216233message MembershipEndpoint {
217- // Optional. GKE-specific information. Only present if this Membership is a GKE cluster.
218- GkeCluster gke_cluster = 1 [(google.api.field_behavior ) = OPTIONAL ];
234+ // Cluster information of the registered cluster.
235+ oneof type {
236+ // Optional. Specific information for a GKE-on-GCP cluster.
237+ GkeCluster gke_cluster = 1 [(google.api.field_behavior ) = OPTIONAL ];
238+
239+ // Optional. Specific information for a GKE On-Prem cluster.
240+ OnPremCluster on_prem_cluster = 4 [(google.api.field_behavior ) = OPTIONAL ];
241+
242+ // Optional. Specific information for a GKE Multi-Cloud cluster.
243+ MultiCloudCluster multi_cloud_cluster = 5 [(google.api.field_behavior ) = OPTIONAL ];
244+ }
219245
220246 // Output only. Useful Kubernetes-specific metadata.
221247 KubernetesMetadata kubernetes_metadata = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
@@ -289,6 +315,42 @@ message GkeCluster {
289315 //
290316 // Zonal clusters are also supported.
291317 string resource_link = 1 [(google.api.field_behavior ) = IMMUTABLE ];
318+
319+ // Output only. If cluster_missing is set then it denotes that the GKE cluster no longer
320+ // exists in the GKE Control Plane.
321+ bool cluster_missing = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
322+ }
323+
324+ // OnPremCluster contains information specific to GKE On-Prem clusters.
325+ message OnPremCluster {
326+ // Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example:
327+ //
328+ // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster
329+ // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster
330+ string resource_link = 1 [(google.api.field_behavior ) = IMMUTABLE ];
331+
332+ // Output only. If cluster_missing is set then it denotes that
333+ // API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no
334+ // longer exists.
335+ bool cluster_missing = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
336+
337+ // Immutable. Whether the cluster is an admin cluster.
338+ bool admin_cluster = 3 [(google.api.field_behavior ) = IMMUTABLE ];
339+ }
340+
341+ // MultiCloudCluster contains information specific to GKE Multi-Cloud clusters.
342+ message MultiCloudCluster {
343+ // Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For
344+ // example:
345+ //
346+ // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster
347+ // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster
348+ string resource_link = 1 [(google.api.field_behavior ) = IMMUTABLE ];
349+
350+ // Output only. If cluster_missing is set then it denotes that
351+ // API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster
352+ // no longer exists.
353+ bool cluster_missing = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
292354}
293355
294356// KubernetesMetadata provides informational metadata for Memberships
@@ -511,6 +573,8 @@ message UpdateMembershipRequest {
511573 // If you are updating a map field, set the value of a key to null or empty
512574 // string to delete the key from the map. It's not possible to update a key's
513575 // value to the empty string.
576+ // If you specify the update_mask to be a special path "*", fully replaces all
577+ // user-modifiable fields to match `resource`.
514578 Membership resource = 3 [(google.api.field_behavior ) = REQUIRED ];
515579}
516580
0 commit comments