Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [gkehub] add monitoring_config field #4194

Merged
merged 2 commits into from
Apr 20, 2023
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,7 @@ import "google/api/resource.proto";
import "google/cloud/gkehub/v1/feature.proto";
import "google/cloud/gkehub/v1/membership.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

Expand All @@ -43,17 +44,22 @@ option ruby_package = "Google::Cloud::GkeHub::V1";
// * [Membership][google.cloud.gkehub.v1.Membership]
// * [Feature][google.cloud.gkehub.v1.Feature]
//
// GKE Hub is currently only available in the global region.
// GKE Hub is currently available in the global region and all regions in
// https://cloud.google.com/compute/docs/regions-zones. Feature is only
// available in global region while membership is global region and all the
// regions.
//
// **Membership management may be non-trivial:** it is recommended to use one
// of the Google-provided client libraries or tools where possible when working
// with Membership resources.
service GkeHub {
option (google.api.default_host) = "gkehub.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Lists Memberships in a given project and location.
rpc ListMemberships(ListMembershipsRequest) returns (ListMembershipsResponse) {
rpc ListMemberships(ListMembershipsRequest)
returns (ListMembershipsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/memberships"
};
Expand Down Expand Up @@ -89,7 +95,8 @@ service GkeHub {
// **This is currently only supported for GKE clusters on Google Cloud**.
// To register other clusters, follow the instructions at
// https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
rpc CreateMembership(CreateMembershipRequest) returns (google.longrunning.Operation) {
rpc CreateMembership(CreateMembershipRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/memberships"
body: "resource"
Expand All @@ -102,7 +109,8 @@ service GkeHub {
}

// Adds a new Feature.
rpc CreateFeature(CreateFeatureRequest) returns (google.longrunning.Operation) {
rpc CreateFeature(CreateFeatureRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/features"
body: "resource"
Expand All @@ -119,7 +127,8 @@ service GkeHub {
// **This is currently only supported for GKE clusters on Google Cloud**.
// To unregister other clusters, follow the instructions at
// https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
rpc DeleteMembership(DeleteMembershipRequest) returns (google.longrunning.Operation) {
rpc DeleteMembership(DeleteMembershipRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/memberships/*}"
};
Expand All @@ -131,7 +140,8 @@ service GkeHub {
}

// Removes a Feature.
rpc DeleteFeature(DeleteFeatureRequest) returns (google.longrunning.Operation) {
rpc DeleteFeature(DeleteFeatureRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/features/*}"
};
Expand All @@ -143,7 +153,8 @@ service GkeHub {
}

// Updates an existing Membership.
rpc UpdateMembership(UpdateMembershipRequest) returns (google.longrunning.Operation) {
rpc UpdateMembership(UpdateMembershipRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{name=projects/*/locations/*/memberships/*}"
body: "resource"
Expand All @@ -156,7 +167,8 @@ service GkeHub {
}

// Updates an existing Feature.
rpc UpdateFeature(UpdateFeatureRequest) returns (google.longrunning.Operation) {
rpc UpdateFeature(UpdateFeatureRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{name=projects/*/locations/*/features/*}"
body: "resource"
Expand All @@ -172,7 +184,8 @@ service GkeHub {
//
// **This method is used internally by Google-provided libraries.**
// Most clients should not need to call this method directly.
rpc GenerateConnectManifest(GenerateConnectManifestRequest) returns (GenerateConnectManifestResponse) {
rpc GenerateConnectManifest(GenerateConnectManifestRequest)
returns (GenerateConnectManifestResponse) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest"
};
Expand All @@ -181,27 +194,28 @@ service GkeHub {

// Request message for `GkeHub.ListMemberships` method.
message ListMembershipsRequest {
// Required. The parent (project and location) where the Memberships will be listed.
// Specified in the format `projects/*/locations/*`.
// Required. The parent (project and location) where the Memberships will be
// listed. Specified in the format `projects/*/locations/*`.
// `projects/*/locations/-` list memberships in all the regions.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "gkehub.googleapis.com/Membership"
}
];

// Optional. When requesting a 'page' of resources, `page_size` specifies number of
// resources to return. If unspecified or set to 0, all resources will
// be returned.
// Optional. When requesting a 'page' of resources, `page_size` specifies
// number of resources to return. If unspecified or set to 0, all resources
// will be returned.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Token returned by previous call to `ListMemberships` which
// specifies the position in the list from where to continue listing the
// resources.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. Lists Memberships that match the filter expression, following the syntax
// outlined in https://google.aip.dev/160.
// Optional. Lists Memberships that match the filter expression, following the
// syntax outlined in https://google.aip.dev/160.
//
// Examples:
//
Expand Down Expand Up @@ -255,17 +269,17 @@ message GetMembershipRequest {

// Request message for the `GkeHub.CreateMembership` method.
message CreateMembershipRequest {
// Required. The parent (project and location) where the Memberships will be created.
// Specified in the format `projects/*/locations/*`.
// Required. The parent (project and location) where the Memberships will be
// created. Specified in the format `projects/*/locations/*`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "gkehub.googleapis.com/Membership"
}
];

// Required. Client chosen ID for the membership. `membership_id` must be a valid RFC
// 1123 compliant DNS label:
// Required. Client chosen ID for the membership. `membership_id` must be a
// valid RFC 1123 compliant DNS label:
//
// 1. At most 63 characters in length
// 2. It must consist of lower case alphanumeric characters or `-`
Expand Down Expand Up @@ -319,6 +333,11 @@ message DeleteMembershipRequest {
// The request ID must be a valid UUID with the exception that zero UUID is
// not supported (00000000-0000-0000-0000-000000000000).
string request_id = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. If set to true, any subresource from this Membership will also be
// deleted. Otherwise, the request will only work if the Membership has no
// subresource.
bool force = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for `GkeHub.UpdateMembership` method.
Expand All @@ -333,7 +352,8 @@ message UpdateMembershipRequest {
];

// Required. Mask of fields to update.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];

// 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
Expand Down Expand Up @@ -365,30 +385,32 @@ message UpdateMembershipRequest {
// method.
// .
message GenerateConnectManifestRequest {
// Required. The Membership resource name the Agent will associate with, in the format
// `projects/*/locations/*/memberships/*`.
// Required. The Membership resource name the Agent will associate with, in
// the format `projects/*/locations/*/memberships/*`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "gkehub.googleapis.com/Membership"
}
];

// Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
// Optional. Namespace for GKE Connect agent resources. Defaults to
// `gke-connect`.
//
// The Connect Agent is authorized automatically when run in the default
// namespace. Otherwise, explicit authorization must be granted with an
// additional IAM binding.
string namespace = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com
// requires the use of a proxy. Format must be in the form
// `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
// Optional. URI of a proxy if connectivity from the agent to
// gkeconnect.googleapis.com requires the use of a proxy. Format must be in
// the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
// supported by the proxy. This will direct the connect agent's outbound
// traffic through a HTTP(S) proxy.
bytes proxy = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. The Connect agent version to use. Defaults to the most current version.
// Optional. The Connect agent version to use. Defaults to the most current
// version.
string version = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. If true, generate the resources for upgrade only. Some resources
Expand Down
Loading