Skip to content

Commit

Permalink
feat: [gkeconnect] removed the nonfunctional GatewayService and repla…
Browse files Browse the repository at this point in the history
…ced it with the GatewayControl service (#5632)

* feat: removed the nonfunctional GatewayService and replaced it with the GatewayControl service

BREAKING CHANGE: existing client libraries are being regenerated to remove unused functionality and introduce new features.

PiperOrigin-RevId: 665485495

Source-Link: googleapis/googleapis@5e76753

Source-Link: googleapis/googleapis-gen@565ebdf
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZWNvbm5lY3QtZ2F0ZXdheS8uT3dsQm90LnlhbWwiLCJoIjoiNTY1ZWJkZjhiMzNjZWVhYWVkOTcyZTBkOWZiZTRhYTA2M2U1MjkyZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat!: removed the nonfunctional GatewayService and replaced it with the GatewayControl service

BREAKING CHANGE: existing client libraries are being regenerated to remove unused functionality and introduce new features.

PiperOrigin-RevId: 665564055

Source-Link: googleapis/googleapis@71434fd

Source-Link: googleapis/googleapis-gen@3fcf6a6
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZWNvbm5lY3QtZ2F0ZXdheS8uT3dsQm90LnlhbWwiLCJoIjoiM2ZjZjZhNjk0M2E5MzBjYmE5MDkwZjhiODhhNmNhZjcxYzhmYjY5NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* removing test for deprecated service

* update quickstart to use new service

* 🦉 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>
Co-authored-by: Sofia Leon <[email protected]>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
4 people authored Aug 29, 2024
1 parent b03f419 commit c03e3a5
Show file tree
Hide file tree
Showing 29 changed files with 4,571 additions and 876 deletions.
6 changes: 4 additions & 2 deletions packages/google-cloud-gkeconnect-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ npm install @google-cloud/gke-connect-gateway
```javascript
// Imports the Google Cloud client library

const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway');
const {GatewayControlClient} = require('@google-cloud/gke-connect-gateway');

// Creates a client
new GatewayServiceClient();
new GatewayControlClient();

```

Expand All @@ -74,6 +74,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Gateway_control.generate_credentials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1/gateway_control.generate_credentials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1/gateway_control.generate_credentials.js,packages/google-cloud-gkeconnect-gateway/samples/README.md) |
| Gateway_control.generate_credentials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_control.generate_credentials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_control.generate_credentials.js,packages/google-cloud-gkeconnect-gateway/samples/README.md) |
| Gateway_service.delete_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js,packages/google-cloud-gkeconnect-gateway/samples/README.md) |
| Gateway_service.get_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js,packages/google-cloud-gkeconnect-gateway/samples/README.md) |
| Gateway_service.patch_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js,packages/google-cloud-gkeconnect-gateway/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.gkeconnect.gateway.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.GkeConnect.Gateway.V1";
option go_package = "cloud.google.com/go/gkeconnect/gateway/apiv1/gatewaypb;gatewaypb";
option java_multiple_files = true;
option java_outer_classname = "ControlProto";
option java_package = "com.google.cloud.gkeconnect.gateway.v1";
option php_namespace = "Google\\Cloud\\GkeConnect\\Gateway\\V1";
option ruby_package = "Google::Cloud::GkeConnect::Gateway::V1";

// GatewayControl is the control plane API for Connect Gateway.
service GatewayControl {
option (google.api.default_host) = "connectgateway.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// GenerateCredentials provides connection information that allows a user to
// access the specified membership using Connect Gateway.
rpc GenerateCredentials(GenerateCredentialsRequest)
returns (GenerateCredentialsResponse) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/memberships/*}:generateCredentials"
};
}
}

// A request for connection information for a particular membership.
message GenerateCredentialsRequest {
// Operating systems requiring specialized kubeconfigs.
enum OperatingSystem {
// Generates a kubeconfig that works for all operating systems not defined
// below.
OPERATING_SYSTEM_UNSPECIFIED = 0;

// Generates a kubeconfig that is specifically designed to work with
// Windows.
OPERATING_SYSTEM_WINDOWS = 1;
}

// Required. The Fleet membership resource.
string name = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. Whether to force the use of Connect Agent-based transport.
//
// This will return a configuration that uses Connect Agent as the underlying
// transport mechanism for cluster types that would otherwise have used a
// different transport. Requires that Connect Agent be installed on the
// cluster. Setting this field to false is equivalent to not setting it.
bool force_use_agent = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The Connect Gateway version to be used in the resulting
// configuration.
//
// Leave this field blank to let the server choose the version (recommended).
string version = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. The namespace to use in the kubeconfig context.
//
// If this field is specified, the server will set the `namespace` field in
// kubeconfig context. If not specified, the `namespace` field is omitted.
string kubernetes_namespace = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. The operating system where the kubeconfig will be used.
OperatingSystem operating_system = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Connection information for a particular membership.
message GenerateCredentialsResponse {
// A full YAML kubeconfig in serialized format.
bytes kubeconfig = 1;

// The generated URI of the cluster as accessed through the Connect Gateway
// API.
string endpoint = 2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.gkeconnect.gateway.v1beta1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.GkeConnect.Gateway.V1Beta1";
option go_package = "cloud.google.com/go/gkeconnect/gateway/apiv1beta1/gatewaypb;gatewaypb";
option java_multiple_files = true;
option java_outer_classname = "ControlProto";
option java_package = "com.google.cloud.gkeconnect.gateway.v1beta1";
option php_namespace = "Google\\Cloud\\GkeConnect\\Gateway\\V1beta1";
option ruby_package = "Google::Cloud::GkeConnect::Gateway::V1beta1";

// GatewayControl is the control plane API for Connect Gateway.
service GatewayControl {
option (google.api.default_host) = "connectgateway.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// GenerateCredentials provides connection information that allows a user to
// access the specified membership using Connect Gateway.
rpc GenerateCredentials(GenerateCredentialsRequest)
returns (GenerateCredentialsResponse) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/memberships/*}:generateCredentials"
};
}
}

// A request for connection information for a particular membership.
message GenerateCredentialsRequest {
// Operating systems requiring specialized kubeconfigs.
enum OperatingSystem {
// Generates a kubeconfig that works for all operating systems not defined
// below.
OPERATING_SYSTEM_UNSPECIFIED = 0;

// Generates a kubeconfig that is specifically designed to work with
// Windows.
OPERATING_SYSTEM_WINDOWS = 1;
}

// Required. The Fleet membership resource.
string name = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. Whether to force the use of Connect Agent-based transport.
//
// This will return a configuration that uses Connect Agent as the underlying
// transport mechanism for cluster types that would otherwise have used a
// different transport. Requires that Connect Agent be installed on the
// cluster. Setting this field to false is equivalent to not setting it.
bool force_use_agent = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The Connect Gateway version to be used in the resulting
// configuration.
//
// Leave this field blank to let the server choose the version (recommended).
string version = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. The namespace to use in the kubeconfig context.
//
// If this field is specified, the server will set the `namespace` field in
// kubeconfig context. If not specified, the `namespace` field is omitted.
string kubernetes_namespace = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. The operating system where the kubeconfig will be used.
OperatingSystem operating_system = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Connection information for a particular membership.
message GenerateCredentialsResponse {
// A full YAML kubeconfig in serialized format.
bytes kubeconfig = 1;

// The generated URI of the cluster as accessed through the Connect Gateway
// API.
string endpoint = 2;
}
Loading

0 comments on commit c03e3a5

Please sign in to comment.