feat: added v1alpha messages and client for gkehub

Clients can now target the v1alpha GKE Hub API to interact with Feature
resources.

PiperOrigin-RevId: 381332895
pull/662/head
Google APIs 4 years ago committed by Copybara-Service
parent 7abd63f589
commit 3bd91d545c
  1. 348
      google/cloud/gkehub/v1alpha/BUILD.bazel
  2. 161
      google/cloud/gkehub/v1alpha/cloudauditlogging/BUILD.bazel
  3. 37
      google/cloud/gkehub/v1alpha/cloudauditlogging/cloudauditlogging.proto
  4. 163
      google/cloud/gkehub/v1alpha/configmanagement/BUILD.bazel
  5. 416
      google/cloud/gkehub/v1alpha/configmanagement/configmanagement.proto
  6. 216
      google/cloud/gkehub/v1alpha/feature.proto
  7. 111
      google/cloud/gkehub/v1alpha/gkehub_v1alpha.yaml
  8. 163
      google/cloud/gkehub/v1alpha/metering/BUILD.bazel
  9. 39
      google/cloud/gkehub/v1alpha/metering/metering.proto
  10. 161
      google/cloud/gkehub/v1alpha/multiclusteringress/BUILD.bazel
  11. 50
      google/cloud/gkehub/v1alpha/multiclusteringress/multiclusteringress.proto
  12. 281
      google/cloud/gkehub/v1alpha/service.proto
  13. 165
      google/cloud/gkehub/v1alpha/servicemesh/BUILD.bazel
  14. 115
      google/cloud/gkehub/v1alpha/servicemesh/servicemesh.proto
  15. 13
      google/cloud/gkehub/v1alpha/v1alpha_grpc_service_config.json
  16. 211
      google/cloud/gkehub/v1alpha2/BUILD.bazel
  17. 15
      google/cloud/gkehub/v1beta1/BUILD.bazel

@ -0,0 +1,348 @@
# This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/rules_gapic/tree/master/bazel
# Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values:
# - names of *_gapic_assembly_* rules
# - certain parameters of *_gapic_library rules, including but not limited to:
# * extra_protoc_parameters
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "gkehub_proto",
srcs = [
"feature.proto",
"service.proto",
],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/cloud/gkehub/v1alpha/cloudauditlogging:cloudauditlogging_proto",
"//google/cloud/gkehub/v1alpha/configmanagement:configmanagement_proto",
"//google/cloud/gkehub/v1alpha/metering:metering_proto",
"//google/cloud/gkehub/v1alpha/multiclusteringress:multiclusteringress_proto",
"//google/cloud/gkehub/v1alpha/servicemesh:servicemesh_proto",
"//google/longrunning:operations_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
proto_library_with_info(
name = "gkehub_proto_with_info",
deps = [
":gkehub_proto",
"//google/cloud:common_resources_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
"java_gapic_library",
"java_gapic_test",
"java_grpc_library",
"java_proto_library",
)
java_proto_library(
name = "gkehub_java_proto",
deps = [":gkehub_proto"],
)
java_grpc_library(
name = "gkehub_java_grpc",
srcs = [":gkehub_proto"],
deps = [":gkehub_java_proto"],
)
java_gapic_library(
name = "gkehub_java_gapic",
srcs = [":gkehub_proto_with_info"],
grpc_service_config = "v1alpha_grpc_service_config.json",
test_deps = [
":gkehub_java_grpc",
],
deps = [
":gkehub_java_proto",
],
)
java_gapic_test(
name = "gkehub_java_gapic_test_suite",
test_classes = [
"com.google.cloud.gkehub.v1alpha.GkeHubClientTest",
],
runtime_deps = [":gkehub_java_gapic_test"],
)
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-gkehub-v1alpha-java",
deps = [
":gkehub_java_gapic",
":gkehub_java_grpc",
":gkehub_java_proto",
":gkehub_proto",
],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
"go_gapic_library",
"go_proto_library",
"go_test",
)
go_proto_library(
name = "gkehub_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/gkehub/v1alpha",
protos = [":gkehub_proto"],
deps = [
"//google/api:annotations_go_proto",
"//google/cloud/gkehub/v1alpha/cloudauditlogging:cloudauditlogging_go_proto",
"//google/cloud/gkehub/v1alpha/configmanagement:configmanagement_go_proto",
"//google/cloud/gkehub/v1alpha/metering:metering_go_proto",
"//google/cloud/gkehub/v1alpha/multiclusteringress:multiclusteringress_go_proto",
"//google/cloud/gkehub/v1alpha/servicemesh:servicemesh_go_proto",
"//google/longrunning:longrunning_go_proto",
],
)
go_gapic_library(
name = "gkehub_go_gapic",
srcs = [":gkehub_proto_with_info"],
grpc_service_config = "v1alpha_grpc_service_config.json",
importpath = "cloud.google.com/go/gkehub/apiv1alpha;gkehub",
metadata = True,
service_yaml = "gkehub_v1alpha.yaml",
deps = [
":gkehub_go_proto",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@com_google_cloud_go//longrunning/autogen:go_default_library",
],
)
go_test(
name = "gkehub_go_gapic_test",
srcs = [":gkehub_go_gapic_srcjar_test"],
embed = [":gkehub_go_gapic"],
importpath = "cloud.google.com/go/gkehub/apiv1alpha",
)
# Open Source Packages
go_gapic_assembly_pkg(
name = "gapi-cloud-gkehub-v1alpha-go",
deps = [
":gkehub_go_gapic",
":gkehub_go_gapic_srcjar-metadata.srcjar",
":gkehub_go_gapic_srcjar-test.srcjar",
":gkehub_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
"py_gapic_library",
)
py_gapic_library(
name = "gkehub_py_gapic",
srcs = [":gkehub_proto"],
grpc_service_config = "v1alpha_grpc_service_config.json",
)
# Open Source Packages
py_gapic_assembly_pkg(
name = "gkehub-v1alpha-py",
deps = [
":gkehub_py_gapic",
],
)
##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
"php_gapic_library",
"php_grpc_library",
"php_proto_library",
)
php_proto_library(
name = "gkehub_php_proto",
deps = [":gkehub_proto"],
)
php_grpc_library(
name = "gkehub_php_grpc",
srcs = [":gkehub_proto"],
deps = [":gkehub_php_proto"],
)
php_gapic_library(
name = "gkehub_php_gapic",
srcs = [":gkehub_proto_with_info"],
grpc_service_config = "v1alpha_grpc_service_config.json",
service_yaml = "gkehub_v1alpha.yaml",
deps = [
":gkehub_php_grpc",
":gkehub_php_proto",
],
)
# Open Source Packages
php_gapic_assembly_pkg(
name = "google-cloud-gkehub-v1alpha-php",
deps = [
":gkehub_php_gapic",
":gkehub_php_grpc",
":gkehub_php_proto",
],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
nodejs_gapic_library(
name = "gkehub_nodejs_gapic",
package_name = "@google-cloud/gkehub",
src = ":gkehub_proto_with_info",
extra_protoc_parameters = ["metadata"],
grpc_service_config = "v1alpha_grpc_service_config.json",
package = "google.cloud.gkehub.v1alpha",
service_yaml = "gkehub_v1alpha.yaml",
deps = [],
)
nodejs_gapic_assembly_pkg(
name = "gkehub-v1alpha-nodejs",
deps = [
":gkehub_nodejs_gapic",
":gkehub_proto",
],
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "gkehub_ruby_proto",
deps = [":gkehub_proto"],
)
ruby_grpc_library(
name = "gkehub_ruby_grpc",
srcs = [":gkehub_proto"],
deps = [":gkehub_ruby_proto"],
)
ruby_cloud_gapic_library(
name = "gkehub_ruby_gapic",
srcs = [":gkehub_proto_with_info"],
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-gkehub-v1alpha"],
grpc_service_config = "v1alpha_grpc_service_config.json",
deps = [
":gkehub_ruby_grpc",
":gkehub_ruby_proto",
],
)
# Open Source Packages
ruby_gapic_assembly_pkg(
name = "google-cloud-gkehub-v1alpha-ruby",
deps = [
":gkehub_ruby_gapic",
":gkehub_ruby_grpc",
":gkehub_ruby_proto",
],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
"csharp_gapic_library",
"csharp_grpc_library",
"csharp_proto_library",
)
csharp_proto_library(
name = "gkehub_csharp_proto",
deps = [":gkehub_proto"],
)
csharp_grpc_library(
name = "gkehub_csharp_grpc",
srcs = [":gkehub_proto"],
deps = [":gkehub_csharp_proto"],
)
csharp_gapic_library(
name = "gkehub_csharp_gapic",
srcs = [":gkehub_proto_with_info"],
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "v1alpha_grpc_service_config.json",
deps = [
":gkehub_csharp_grpc",
":gkehub_csharp_proto",
],
)
# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-gkehub-v1alpha-csharp",
deps = [
":gkehub_csharp_gapic",
":gkehub_csharp_grpc",
":gkehub_csharp_proto",
],
)
##############################################################################
# C++
##############################################################################
# Put your C++ rules here

@ -0,0 +1,161 @@
# This file was automatically generated by BuildFileGenerator
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "cloudauditlogging_proto",
srcs = [
"cloudauditlogging.proto",
],
deps = [
"//google/api:annotations_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_grpc_library",
"java_proto_library",
)
java_proto_library(
name = "cloudauditlogging_java_proto",
deps = [":cloudauditlogging_proto"],
)
java_grpc_library(
name = "cloudauditlogging_java_grpc",
srcs = [":cloudauditlogging_proto"],
deps = [":cloudauditlogging_java_proto"],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
)
go_proto_library(
name = "cloudauditlogging_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/gkehub/cloudauditlogging/v1alpha",
protos = [":cloudauditlogging_proto"],
deps = [
"//google/api:annotations_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "cloudauditlogging_moved_proto",
srcs = [":cloudauditlogging_proto"],
deps = [
"//google/api:annotations_proto",
],
)
py_proto_library(
name = "cloudauditlogging_py_proto",
deps = [":cloudauditlogging_moved_proto"],
)
py_grpc_library(
name = "cloudauditlogging_py_grpc",
srcs = [":cloudauditlogging_moved_proto"],
deps = [":cloudauditlogging_py_proto"],
)
##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_grpc_library",
"php_proto_library",
)
php_proto_library(
name = "cloudauditlogging_php_proto",
deps = [":cloudauditlogging_proto"],
)
php_grpc_library(
name = "cloudauditlogging_php_grpc",
srcs = [":cloudauditlogging_proto"],
deps = [":cloudauditlogging_php_proto"],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "cloudauditlogging_ruby_proto",
deps = [":cloudauditlogging_proto"],
)
ruby_grpc_library(
name = "cloudauditlogging_ruby_grpc",
srcs = [":cloudauditlogging_proto"],
deps = [":cloudauditlogging_ruby_proto"],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_grpc_library",
"csharp_proto_library",
)
csharp_proto_library(
name = "cloudauditlogging_csharp_proto",
deps = [":cloudauditlogging_proto"],
)
csharp_grpc_library(
name = "cloudauditlogging_csharp_grpc",
srcs = [":cloudauditlogging_proto"],
deps = [":cloudauditlogging_csharp_proto"],
)
##############################################################################
# C++
##############################################################################
# Put your C++ code here

@ -0,0 +1,37 @@
// Copyright 2021 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.gkehub.cloudauditlogging.v1alpha;
import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.GkeHub.CloudAuditLogging.V1Alpha";
option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/cloudauditlogging/v1alpha;cloudauditlogging";
option java_multiple_files = true;
option java_outer_classname = "CloudAuditLoggingProto";
option java_package = "com.google.cloud.gkehub.cloudauditlogging.v1alpha";
option php_namespace = "Google\\Cloud\\GkeHub\\CloudAuditLogging\\V1alpha";
option ruby_package = "Google::Cloud::GkeHub::CloudAuditLogging::V1alpha";
// **Cloud Audit Logging**: Spec for Audit Logging Allowlisting.
message FeatureSpec {
// Service account that should be allowlisted to send the audit logs; eg
// cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must
// already exist, but do not need to have any permissions granted to them.
// The customer's entitlements will be checked prior to allowlisting (i.e.
// the customer must be an Anthos customer.)
repeated string allowlisted_service_accounts = 1;
}

@ -0,0 +1,163 @@
# This file was automatically generated by BuildFileGenerator
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "configmanagement_proto",
srcs = [
"configmanagement.proto",
],
deps = [
"//google/api:annotations_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_grpc_library",
"java_proto_library",
)
java_proto_library(
name = "configmanagement_java_proto",
deps = [":configmanagement_proto"],
)
java_grpc_library(
name = "configmanagement_java_grpc",
srcs = [":configmanagement_proto"],
deps = [":configmanagement_java_proto"],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
)
go_proto_library(
name = "configmanagement_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/gkehub/configmanagement/v1alpha",
protos = [":configmanagement_proto"],
deps = [
"//google/api:annotations_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "configmanagement_moved_proto",
srcs = [":configmanagement_proto"],
deps = [
"//google/api:annotations_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
py_proto_library(
name = "configmanagement_py_proto",
deps = [":configmanagement_moved_proto"],
)
py_grpc_library(
name = "configmanagement_py_grpc",
srcs = [":configmanagement_moved_proto"],
deps = [":configmanagement_py_proto"],
)
##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_grpc_library",
"php_proto_library",
)
php_proto_library(
name = "configmanagement_php_proto",
deps = [":configmanagement_proto"],
)
php_grpc_library(
name = "configmanagement_php_grpc",
srcs = [":configmanagement_proto"],
deps = [":configmanagement_php_proto"],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "configmanagement_ruby_proto",
deps = [":configmanagement_proto"],
)
ruby_grpc_library(
name = "configmanagement_ruby_grpc",
srcs = [":configmanagement_proto"],
deps = [":configmanagement_ruby_proto"],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_grpc_library",
"csharp_proto_library",
)
csharp_proto_library(
name = "configmanagement_csharp_proto",
deps = [":configmanagement_proto"],
)
csharp_grpc_library(
name = "configmanagement_csharp_grpc",
srcs = [":configmanagement_proto"],
deps = [":configmanagement_csharp_proto"],
)
##############################################################################
# C++
##############################################################################
# Put your C++ code here

@ -0,0 +1,416 @@
// Copyright 2021 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.gkehub.configmanagement.v1alpha;
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.GkeHub.ConfigManagement.V1Alpha";
option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/configmanagement/v1alpha;configmanagement";
option java_multiple_files = true;
option java_outer_classname = "ConfigManagementProto";
option java_package = "com.google.cloud.gkehub.configmanagement.v1alpha";
option php_namespace = "Google\\Cloud\\GkeHub\\ConfigManagement\\V1alpha";
option ruby_package = "Google::Cloud::GkeHub::ConfigManagement::V1alpha";
// Enum representing the state of an ACM's deployment on a cluster
enum DeploymentState {
// Deployment's state cannot be determined
DEPLOYMENT_STATE_UNSPECIFIED = 0;
// Deployment is not installed
NOT_INSTALLED = 1;
// Deployment is installed
INSTALLED = 2;
// Deployment was attempted to be installed, but has errors
ERROR = 3;
}
// **Anthos Config Management**: State for a single cluster.
message MembershipState {
// The user-defined name for the cluster used by ClusterSelectors to group
// clusters together. This should match Membership's membership_name,
// unless the user installed ACM on the cluster manually prior to enabling
// the ACM hub feature.
// Unique within a Anthos Config Management installation.
string cluster_name = 1;
// Membership configuration in the cluster. This represents the actual state
// in the cluster, while the MembershipSpec in the FeatureSpec represents
// the intended state
MembershipSpec membership_spec = 2;
// Current install status of ACM's Operator
OperatorState operator_state = 3;
// Current sync status
ConfigSyncState config_sync_state = 4;
// PolicyController status
PolicyControllerState policy_controller_state = 5;
// Binauthz status
BinauthzState binauthz_state = 6;
// Hierarchy Controller status
HierarchyControllerState hierarchy_controller_state = 7;
}
// **Anthos Config Management**: Configuration for a single cluster.
// Intended to parallel the ConfigManagement CR.
message MembershipSpec {
// Config Sync configuration for the cluster.
ConfigSync config_sync = 1;
// Policy Controller configuration for the cluster.
PolicyController policy_controller = 2;
// Binauthz conifguration for the cluster.
BinauthzConfig binauthz = 3;
// Hierarchy Controller configuration for the cluster.
HierarchyControllerConfig hierarchy_controller = 4;
// Version of ACM installed.
string version = 10;
}
// Configuration for Config Sync
message ConfigSync {
// Git repo configuration for the cluster.
GitConfig git = 7;
// Specifies whether the Config Sync Repo is
// in hierarchical or unstructured mode.
string source_format = 8;
}
// Git repo configuration for a single cluster.
message GitConfig {
// The URL of the Git repository to use as the source of truth.
string sync_repo = 1;
// The branch of the repository to sync from. Default: master.
string sync_branch = 2;
// The path within the Git repository that represents the top level of the
// repo to sync. Default: the root directory of the repository.
string policy_dir = 3;
// Period in seconds between consecutive syncs. Default: 15.
int64 sync_wait_secs = 4;
// Git revision (tag or hash) to check out. Default HEAD.
string sync_rev = 5;
// Type of secret configured for access to the Git repo.
string secret_type = 6;
// URL for the HTTPS proxy to be used when communicating with the Git repo.
string https_proxy = 7;
// The GCP Service Account Email used for auth when secret_type is
// gcpServiceAccount.
string gcp_service_account_email = 8;
}
// Configuration for Policy Controller
message PolicyController {
// Enables the installation of Policy Controller.
// If false, the rest of PolicyController fields take no
// effect.
bool enabled = 1;
// Installs the default template library along with Policy Controller.
optional bool template_library_installed = 2;
// Sets the interval for Policy Controller Audit Scans (in seconds).
// When set to 0, this disables audit functionality altogether.
optional int64 audit_interval_seconds = 3;
// The set of namespaces that are excluded from Policy Controller checks.
// Namespaces do not need to currently exist on the cluster.
repeated string exemptable_namespaces = 4;
// Enables the ability to use Constraint Templates that reference to objects
// other than the object currently being evaluated.
bool referential_rules_enabled = 5;
// Logs all denies and dry run failures.
bool log_denies_enabled = 6;
// Enable users to try out mutation for PolicyController.
bool mutation_enabled = 7;
}
// Configuration for Binauthz
message BinauthzConfig {
// Whether binauthz is enabled in this cluster.
bool enabled = 1;
}
// Configuration for Hierarchy Controller
message HierarchyControllerConfig {
// Whether Hierarchy Controller is enabled in this cluster.
bool enabled = 1;
// Whether pod tree labels are enabled in this cluster.
bool enable_pod_tree_labels = 2;
// Whether hierarchical resource quota is enabled in this cluster.
bool enable_hierarchical_resource_quota = 3;
}
// Deployment state for Hierarchy Controller
message HierarchyControllerDeploymentState {
// The deployment state for open source HNC (e.g. v0.7.0-hc.0)
DeploymentState hnc = 1;
// The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1)
DeploymentState extension = 2;
}
// Version for Hierarchy Controller
message HierarchyControllerVersion {
// Version for open source HNC
string hnc = 1;
// Version for Hierarchy Controller extension
string extension = 2;
}
// State for Hierarchy Controller
message HierarchyControllerState {
// The version for Hierarchy Controller
HierarchyControllerVersion version = 1;
// The deployment state for Hierarchy Controller
HierarchyControllerDeploymentState state = 2;
}
// State information for an ACM's Operator
message OperatorState {
// The semenatic version number of the operator
string version = 1;
// The state of the Operator's deployment
DeploymentState deployment_state = 2;
// Install errors.
repeated InstallError errors = 3;
}
// Errors pertaining to the installation of ACM
message InstallError {
// A string representing the user facing error message
string error_message = 1;
}
// State information for ConfigSync
message ConfigSyncState {
// The version of ConfigSync deployed
ConfigSyncVersion version = 1;
// Information about the deployment of ConfigSync, including the version
// of the various Pods deployed
ConfigSyncDeploymentState deployment_state = 2;
// The state of ConfigSync's process to sync configs to a cluster
SyncState sync_state = 3;
}
// Specific versioning information pertaining to ConfigSync's Pods
message ConfigSyncVersion {
// Version of the deployed importer pod
string importer = 1;
// Version of the deployed syncer pod
string syncer = 2;
// Version of the deployed git-sync pod
string git_sync = 3;
// Version of the deployed monitor pod
string monitor = 4;
// Version of the deployed reconciler-manager pod
string reconciler_manager = 5;
// Version of the deployed reconciler container in root-reconciler pod
string root_reconciler = 6;
}
// The state of ConfigSync's deployment on a cluster
message ConfigSyncDeploymentState {
// Deployment state of the importer pod
DeploymentState importer = 1;
// Deployment state of the syncer pod
DeploymentState syncer = 2;
// Deployment state of the git-sync pod
DeploymentState git_sync = 3;
// Deployment state of the monitor pod
DeploymentState monitor = 4;
// Deployment state of reconciler-manager pod
DeploymentState reconciler_manager = 5;
// Deployment state of root-reconciler
DeploymentState root_reconciler = 6;
}
// State indicating an ACM's progress syncing configurations to a cluster
message SyncState {
// An enum representing an ACM's status syncing configs to a cluster
enum SyncCode {
// ACM cannot determine a sync code
SYNC_CODE_UNSPECIFIED = 0;
// ACM successfully synced the git Repo with the cluster
SYNCED = 1;
// ACM is in the progress of syncing a new change
PENDING = 2;
// Indicates an error configuring ACM, and user action is required
ERROR = 3;
// ACM has been installed (operator manifest deployed),
// but not configured.
NOT_CONFIGURED = 4;
// ACM has not been installed (no operator pod found)
NOT_INSTALLED = 5;
// Error authorizing with the cluster
UNAUTHORIZED = 6;
// Cluster could not be reached
UNREACHABLE = 7;
}
// Token indicating the state of the repo.
string source_token = 1;
// Token indicating the state of the importer.
string import_token = 2;
// Token indicating the state of the syncer.
string sync_token = 3;
// Deprecated: use last_sync_time instead.
// Timestamp of when ACM last successfully synced the repo
// The time format is specified in https://golang.org/pkg/time/#Time.String
string last_sync = 4 [deprecated = true];
// Timestamp type of when ACM last successfully synced the repo
google.protobuf.Timestamp last_sync_time = 7;
// Sync status code
SyncCode code = 5;
// A list of errors resulting from problematic configs.
// This list will be truncated after 100 errors, although it is
// unlikely for that many errors to simultaneously exist.
repeated SyncError errors = 6;
}
// An ACM created error representing a problem syncing configurations
message SyncError {
// An ACM defined error code
string code = 1;
// A description of the error
string error_message = 2;
// A list of config(s) associated with the error, if any
repeated ErrorResource error_resources = 3;
}
// Model for a config file in the git repo with an associated Sync error
message ErrorResource {
// Path in the git repo of the erroneous config
string source_path = 1;
// Metadata name of the resource that is causing an error
string resource_name = 2;
// Namespace of the resource that is causing an error
string resource_namespace = 3;
// Group/version/kind of the resource that is causing an error
GroupVersionKind resource_gvk = 4;
}
// A Kubernetes object's GVK
message GroupVersionKind {
// Kubernetes Group
string group = 1;
// Kubernetes Version
string version = 2;
// Kubernetes Kind
string kind = 3;
}
// State for PolicyControllerState.
message PolicyControllerState {
// The version of Gatekeeper Policy Controller deployed.
PolicyControllerVersion version = 1;
// The state about the policy controller installation.
GatekeeperDeploymentState deployment_state = 2;
}
// The build version of Gatekeeper Policy Controller is using.
message PolicyControllerVersion {
// The gatekeeper image tag that is composed of ACM version, git tag, build
// number.
string version = 1;
}
// State for Binauthz
message BinauthzState {
// The state of the binauthz webhook.
DeploymentState webhook = 1;
// The version of binauthz that is installed.
BinauthzVersion version = 2;
}
// The version of binauthz.
message BinauthzVersion {
// The version of the binauthz webhook.
string webhook_version = 1;
}
// State of Policy Controller installation.
message GatekeeperDeploymentState {
// Status of gatekeeper-controller-manager pod.
DeploymentState gatekeeper_controller_manager_state = 1;
// Status of gatekeeper-audit deployment.
DeploymentState gatekeeper_audit = 2;
// Status of the pod serving the mutation webhook.
DeploymentState gatekeeper_mutation = 3;
}

@ -0,0 +1,216 @@
// Copyright 2021 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.gkehub.v1alpha;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/gkehub/v1alpha/cloudauditlogging/cloudauditlogging.proto";
import "google/cloud/gkehub/v1alpha/configmanagement/configmanagement.proto";
import "google/cloud/gkehub/v1alpha/metering/metering.proto";
import "google/cloud/gkehub/v1alpha/multiclusteringress/multiclusteringress.proto";
import "google/cloud/gkehub/v1alpha/servicemesh/servicemesh.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.GkeHub.V1Alpha";
option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/v1alpha;gkehub";
option java_multiple_files = true;
option java_outer_classname = "FeatureProto";
option java_package = "com.google.cloud.gkehub.v1alpha";
option php_namespace = "Google\\Cloud\\GkeHub\\V1alpha";
option ruby_package = "Google::Cloud::GkeHub::V1alpha";
// Feature represents the settings and status of any Hub Feature.
message Feature {
option (google.api.resource) = {
type: "gkehub.googleapis.com/Feature"
pattern: "projects/{project}/locations/{location}/features/{feature}"
};
// Output only. The full, unique name of this Feature resource in the format
// `projects/*/locations/*/features/*`.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// GCP labels for this Feature.
map<string, string> labels = 2;
// Output only. State of the Feature resource itself.
FeatureResourceState resource_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Hub-wide Feature configuration. If this Feature does not support any
// Hub-wide configuration, this field may be unused.
CommonFeatureSpec spec = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Membership-specific configuration for this Feature. If this Feature does
// not support any per-Membership configuration, this field may be unused.
//
// The keys indicate which Membership the configuration is for, in the form:
//
// projects/{p}/locations/{l}/memberships/{m}
//
// Where {p} is the project, {l} is a valid location and {m} is a valid
// Membership in this project at that location. {p} WILL match the Feature's
// project.
//
// {p} will always be returned as the project number, but the project ID is
// also accepted during input. If the same Membership is specified in the map
// twice (using the project ID form, and the project number form), exactly
// ONE of the entries will be saved, with no guarantees as to which. For this
// reason, it is recommended the same format be used for all entries when
// mutating a Feature.
map<string, MembershipFeatureSpec> membership_specs = 5 [(google.api.field_behavior) = OPTIONAL];
// Output only. The Hub-wide Feature state.
CommonFeatureState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Membership-specific Feature status. If this Feature does
// report any per-Membership status, this field may be unused.
//
// The keys indicate which Membership the state is for, in the form:
//
// projects/{p}/locations/{l}/memberships/{m}
//
// Where {p} is the project number, {l} is a valid location and {m} is a valid
// Membership in this project at that location. {p} MUST match the Feature's
// project number.
map<string, MembershipFeatureState> membership_states = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. When the Feature resource was created.
google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. When the Feature resource was last updated.
google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. When the Feature resource was deleted.
google.protobuf.Timestamp delete_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// FeatureResourceState describes the state of a Feature *resource* in the
// GkeHub API. See `FeatureState` for the "running state" of the Feature in the
// Hub and across Memberships.
message FeatureResourceState {
// State describes the lifecycle status of a Feature.
enum State {
// State is unknown or not set.
STATE_UNSPECIFIED = 0;
// The Feature is being enabled, and the Feature resource is being created.
// Once complete, the corresponding Feature will be enabled in this Hub.
ENABLING = 1;
// The Feature is enabled in this Hub, and the Feature resource is fully
// available.
ACTIVE = 2;
// The Feature is being disabled in this Hub, and the Feature resource
// is being deleted.
DISABLING = 3;
// The Feature resource is being updated.
UPDATING = 4;
// The Feature resource is being updated by the Hub Service.
SERVICE_UPDATING = 5;
}
// The current state of the Feature resource in the Hub API.
State state = 1;
}
// FeatureState describes the high-level state of a Feature. It may be used to
// describe a Feature's state at the environ-level, or per-membershop, depending
// on the context.
message FeatureState {
// Code represents a machine-readable, high-level status of the Feature.
enum Code {
// Unknown or not set.
CODE_UNSPECIFIED = 0;
// The Feature is operating normally.
OK = 1;
// The Feature has encountered an issue, and is operating in a degraded
// state. The Feature may need intervention to return to normal operation.
// See the description and any associated Feature-specific details for more
// information.
WARNING = 2;
// The Feature is not operating or is in a severely degraded state.
// The Feature may need intervention to return to normal operation.
// See the description and any associated Feature-specific details for more
// information.
ERROR = 3;
}
// The high-level, machine-readable status of this Feature.
Code code = 1;
// A human-readable description of the current status.
string description = 2;
// The time this status and any related Feature-specific details were updated.
google.protobuf.Timestamp update_time = 3;
}
// CommonFeatureSpec contains Hub-wide configuration information
message CommonFeatureSpec {
oneof feature_spec {
// Multicluster Ingress-specific spec.
google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec multiclusteringress = 102;
// Cloud Audit Logging-specific spec.
google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec cloudauditlogging = 108;
}
}
// CommonFeatureState contains Hub-wide Feature status information.
message CommonFeatureState {
oneof feature_state {
// Service Mesh-specific state.
google.cloud.gkehub.servicemesh.v1alpha.FeatureState servicemesh = 100;
}
// Output only. The "running state" of the Feature in this Hub.
FeatureState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// MembershipFeatureSpec contains configuration information for a single
// Membership.
message MembershipFeatureSpec {
oneof feature_spec {
// Config Management-specific spec.
google.cloud.gkehub.configmanagement.v1alpha.MembershipSpec configmanagement = 106;
}
}
// MembershipFeatureState contains Feature status information for a single
// Membership.
message MembershipFeatureState {
oneof feature_state {
// Service Mesh-specific state.
google.cloud.gkehub.servicemesh.v1alpha.MembershipState servicemesh = 100;
// Metering-specific spec.
google.cloud.gkehub.metering.v1alpha.MembershipState metering = 104;
// Config Management-specific state.
google.cloud.gkehub.configmanagement.v1alpha.MembershipState configmanagement = 106;
}
// The high-level state of this Feature for a single membership.
FeatureState state = 1;
}

@ -0,0 +1,111 @@
type: google.api.Service
config_version: 3
name: gkehub.googleapis.com
title: GKE Hub
apis:
- name: google.cloud.gkehub.v1alpha.GkeHub
types:
- name: google.cloud.gkehub.v1alpha.OperationMetadata
documentation:
rules:
- selector: google.cloud.location.Locations.GetLocation
description: Gets information about a location.
- selector: google.cloud.location.Locations.ListLocations
description: Lists information about the supported locations for this service.
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
description: |-
Gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
description: |-
Sets the access control policy on the specified resource. Replaces
any existing policy.
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
errors.
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
description: |-
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a `NOT_FOUND` error.
Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization
checking. This operation may "fail open" without warning.
backend:
rules:
- selector: 'google.cloud.gkehub.v1alpha.GkeHub.*'
deadline: 60.0
- selector: google.cloud.location.Locations.GetLocation
deadline: 60.0
- selector: google.cloud.location.Locations.ListLocations
deadline: 60.0
- selector: 'google.iam.v1.IAMPolicy.*'
deadline: 60.0
- selector: 'google.longrunning.Operations.*'
deadline: 60.0
- selector: google.longrunning.Operations.GetOperation
deadline: 5.0
http:
rules:
- selector: google.cloud.location.Locations.GetLocation
get: '/v1alpha/{name=projects/*/locations/*}'
- selector: google.cloud.location.Locations.ListLocations
get: '/v1alpha/{name=projects/*}/locations'
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
get: '/v1alpha/{resource=projects/*/locations/*/memberships/*}:getIamPolicy'
additional_bindings:
- get: '/v1alpha/{resource=projects/*/locations/*/features/*}:getIamPolicy'
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
post: '/v1alpha/{resource=projects/*/locations/*/memberships/*}:setIamPolicy'
body: '*'
additional_bindings:
- post: '/v1alpha/{resource=projects/*/locations/*/features/*}:setIamPolicy'
body: '*'
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
post: '/v1alpha/{resource=projects/*/locations/*/memberships/*}:testIamPermissions'
body: '*'
additional_bindings:
- post: '/v1alpha/{resource=projects/*/locations/*/features/*}:testIamPermissions'
body: '*'
- selector: google.longrunning.Operations.CancelOperation
post: '/v1alpha/{name=projects/*/locations/*/operations/*}:cancel'
body: '*'
- selector: google.longrunning.Operations.DeleteOperation
delete: '/v1alpha/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.GetOperation
get: '/v1alpha/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.ListOperations
get: '/v1alpha/{name=projects/*/locations/*}/operations'
authentication:
rules:
- selector: 'google.cloud.gkehub.v1alpha.GkeHub.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.location.Locations.GetLocation
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.location.Locations.ListLocations
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.iam.v1.IAMPolicy.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.longrunning.Operations.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform

@ -0,0 +1,163 @@
# This file was automatically generated by BuildFileGenerator
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "metering_proto",
srcs = [
"metering.proto",
],
deps = [
"//google/api:annotations_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_grpc_library",
"java_proto_library",
)
java_proto_library(
name = "metering_java_proto",
deps = [":metering_proto"],
)
java_grpc_library(
name = "metering_java_grpc",
srcs = [":metering_proto"],
deps = [":metering_java_proto"],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
)
go_proto_library(
name = "metering_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/gkehub/metering/v1alpha",
protos = [":metering_proto"],
deps = [
"//google/api:annotations_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "metering_moved_proto",
srcs = [":metering_proto"],
deps = [
"//google/api:annotations_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
py_proto_library(
name = "metering_py_proto",
deps = [":metering_moved_proto"],
)
py_grpc_library(
name = "metering_py_grpc",
srcs = [":metering_moved_proto"],
deps = [":metering_py_proto"],
)
##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_grpc_library",
"php_proto_library",
)
php_proto_library(
name = "metering_php_proto",
deps = [":metering_proto"],
)
php_grpc_library(
name = "metering_php_grpc",
srcs = [":metering_proto"],
deps = [":metering_php_proto"],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "metering_ruby_proto",
deps = [":metering_proto"],
)
ruby_grpc_library(
name = "metering_ruby_grpc",
srcs = [":metering_proto"],
deps = [":metering_ruby_proto"],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_grpc_library",
"csharp_proto_library",
)
csharp_proto_library(
name = "metering_csharp_proto",
deps = [":metering_proto"],
)
csharp_grpc_library(
name = "metering_csharp_grpc",
srcs = [":metering_proto"],
deps = [":metering_csharp_proto"],
)
##############################################################################
# C++
##############################################################################
# Put your C++ code here

@ -0,0 +1,39 @@
// Copyright 2021 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.gkehub.metering.v1alpha;
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.GkeHub.Metering.V1Alpha";
option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/metering/v1alpha;metering";
option java_multiple_files = true;
option java_outer_classname = "MeteringProto";
option java_package = "com.google.cloud.gkehub.metering.v1alpha";
option php_namespace = "Google\\Cloud\\GkeHub\\Metering\\V1alpha";
option ruby_package = "Google::Cloud::GkeHub::Metering::V1alpha";
// **Metering**: Per-Membership Feature State.
message MembershipState {
// The time stamp of the most recent measurement of the number of vCPUs
// in the cluster.
google.protobuf.Timestamp last_measurement_time = 1;
// The vCPUs capacity in the cluster according to the most recent
// measurement (1/1000 precision).
float precise_last_measured_cluster_vcpu_capacity = 3;
}

@ -0,0 +1,161 @@
# This file was automatically generated by BuildFileGenerator
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "multiclusteringress_proto",
srcs = [
"multiclusteringress.proto",
],
deps = [
"//google/api:annotations_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_grpc_library",
"java_proto_library",
)
java_proto_library(
name = "multiclusteringress_java_proto",
deps = [":multiclusteringress_proto"],
)
java_grpc_library(
name = "multiclusteringress_java_grpc",
srcs = [":multiclusteringress_proto"],
deps = [":multiclusteringress_java_proto"],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
)
go_proto_library(
name = "multiclusteringress_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/gkehub/multiclusteringress/v1alpha",
protos = [":multiclusteringress_proto"],
deps = [
"//google/api:annotations_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "multiclusteringress_moved_proto",
srcs = [":multiclusteringress_proto"],
deps = [
"//google/api:annotations_proto",
],
)
py_proto_library(
name = "multiclusteringress_py_proto",
deps = [":multiclusteringress_moved_proto"],
)
py_grpc_library(
name = "multiclusteringress_py_grpc",
srcs = [":multiclusteringress_moved_proto"],
deps = [":multiclusteringress_py_proto"],
)
##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_grpc_library",
"php_proto_library",
)
php_proto_library(
name = "multiclusteringress_php_proto",
deps = [":multiclusteringress_proto"],
)
php_grpc_library(
name = "multiclusteringress_php_grpc",
srcs = [":multiclusteringress_proto"],
deps = [":multiclusteringress_php_proto"],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "multiclusteringress_ruby_proto",
deps = [":multiclusteringress_proto"],
)
ruby_grpc_library(
name = "multiclusteringress_ruby_grpc",
srcs = [":multiclusteringress_proto"],
deps = [":multiclusteringress_ruby_proto"],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_grpc_library",
"csharp_proto_library",
)
csharp_proto_library(
name = "multiclusteringress_csharp_proto",
deps = [":multiclusteringress_proto"],
)
csharp_grpc_library(
name = "multiclusteringress_csharp_grpc",
srcs = [":multiclusteringress_proto"],
deps = [":multiclusteringress_csharp_proto"],
)
##############################################################################
# C++
##############################################################################
# Put your C++ code here

@ -0,0 +1,50 @@
// Copyright 2021 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.gkehub.multiclusteringress.v1alpha;
import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.GkeHub.MultiClusterIngress.V1Alpha";
option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/multiclusteringress/v1alpha;multiclusteringress";
option java_multiple_files = true;
option java_outer_classname = "MultiClusterIngressProto";
option java_package = "com.google.cloud.gkehub.multiclusteringress.v1alpha";
option php_namespace = "Google\\Cloud\\GkeHub\\MultiClusterIngress\\V1alpha";
option ruby_package = "Google::Cloud::GkeHub::MultiClusterIngress::V1alpha";
// Billing identifies which billing structure the customer is using.
enum Billing {
// Unknown
BILLING_UNSPECIFIED = 0;
// User pays a fee per-endpoint.
PAY_AS_YOU_GO = 1;
// User is paying for Anthos as a whole.
ANTHOS_LICENSE = 2;
}
// **Multi-cluster Ingress**: The configuration for the MultiClusterIngress
// feature.
message FeatureSpec {
// Fully-qualified Membership name which hosts the MultiClusterIngress CRD.
// Example: `projects/foo-proj/locations/global/memberships/bar`
string config_membership = 1;
// Customer's billing structure
Billing billing = 2;
}

@ -0,0 +1,281 @@
// Copyright 2021 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.gkehub.v1alpha;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/gkehub/v1alpha/feature.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.GkeHub.V1Alpha";
option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/v1alpha;gkehub";
option java_multiple_files = true;
option java_outer_classname = "ServiceProto";
option java_package = "com.google.cloud.gkehub.v1alpha";
option php_namespace = "Google\\Cloud\\GkeHub\\V1alpha";
option ruby_package = "Google::Cloud::GkeHub::V1alpha";
// The GKE Hub service handles the registration of many Kubernetes clusters to
// Google Cloud, and the management of multi-cluster features over those
// clusters.
//
// The GKE Hub service operates on the following resources:
//
// * [Membership][google.cloud.gkehub.v1alpha.Membership]
// * [Feature][google.cloud.gkehub.v1alpha.Feature]
//
// GKE Hub is currently only available in the global region.
//
// **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";
// Lists Features in a given project and location.
rpc ListFeatures(ListFeaturesRequest) returns (ListFeaturesResponse) {
option (google.api.http) = {
get: "/v1alpha/{parent=projects/*/locations/*}/features"
};
option (google.api.method_signature) = "parent";
}
// Gets details of a single Feature.
rpc GetFeature(GetFeatureRequest) returns (Feature) {
option (google.api.http) = {
get: "/v1alpha/{name=projects/*/locations/*/features/*}"
};
option (google.api.method_signature) = "name";
}
// Adds a new Feature.
rpc CreateFeature(CreateFeatureRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1alpha/{parent=projects/*/locations/*}/features"
body: "resource"
};
option (google.api.method_signature) = "parent,resource,feature_id";
option (google.longrunning.operation_info) = {
response_type: "Feature"
metadata_type: "OperationMetadata"
};
}
// Removes a Feature.
rpc DeleteFeature(DeleteFeatureRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1alpha/{name=projects/*/locations/*/features/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "OperationMetadata"
};
}
// Updates an existing Feature.
rpc UpdateFeature(UpdateFeatureRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1alpha/{name=projects/*/locations/*/features/*}"
body: "resource"
};
option (google.api.method_signature) = "name,resource,update_mask";
option (google.longrunning.operation_info) = {
response_type: "Feature"
metadata_type: "OperationMetadata"
};
}
}
// Request message for `GkeHub.ListFeatures` method.
message ListFeaturesRequest {
// The parent (project and location) where the Features will be listed.
// Specified in the format `projects/*/locations/*`.
string parent = 1;
// 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;
// Token returned by previous call to `ListFeatures` which
// specifies the position in the list from where to continue listing the
// resources.
string page_token = 3;
// Lists Features that match the filter expression, following the syntax
// outlined in https://google.aip.dev/160.
//
// Examples:
//
// - Feature with the name "servicemesh" in project "foo-proj":
//
// name = "projects/foo-proj/locations/global/features/servicemesh"
//
// - Features that have a label called `foo`:
//
// labels.foo:*
//
// - Features that have a label called `foo` whose value is `bar`:
//
// labels.foo = bar
string filter = 4;
// One or more fields to compare and use to sort the output.
// See https://google.aip.dev/132#ordering.
string order_by = 5;
}
// Response message for the `GkeHub.ListFeatures` method.
message ListFeaturesResponse {
// The list of matching Features
repeated Feature resources = 1;
// A token to request the next page of resources from the
// `ListFeatures` method. The value of an empty string means
// that there are no more resources to return.
string next_page_token = 2;
}
// Request message for `GkeHub.GetFeature` method.
message GetFeatureRequest {
// The Feature resource name in the format
// `projects/*/locations/*/features/*`
string name = 1;
}
// Request message for the `GkeHub.CreateFeature` method.
message CreateFeatureRequest {
// The parent (project and location) where the Feature will be created.
// Specified in the format `projects/*/locations/*`.
string parent = 1;
// The ID of the feature to create.
string feature_id = 2;
// The Feature resource to create.
Feature resource = 3;
// Optional. A request ID to identify requests. Specify a unique request ID
// so that if you must retry your request, the server will know to ignore
// the request if it has already been completed. The server will guarantee
// that for at least 60 minutes after the first request.
//
// For example, consider a situation where you make an initial request and
// the request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// 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 = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for `GkeHub.DeleteFeature` method.
message DeleteFeatureRequest {
// The Feature resource name in the format
// `projects/*/locations/*/features/*`.
string name = 1;
// If set to true, the delete will ignore any outstanding resources for
// this Feature (that is, `FeatureState.has_resources` is set to true). These
// resources will NOT be cleaned up or modified in any way.
bool force = 2;
// Optional. A request ID to identify requests. Specify a unique request ID
// so that if you must retry your request, the server will know to ignore
// the request if it has already been completed. The server will guarantee
// that for at least 60 minutes after the first request.
//
// For example, consider a situation where you make an initial request and
// the request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// 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 = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for `GkeHub.UpdateFeature` method.
message UpdateFeatureRequest {
// The Feature resource name in the format
// `projects/*/locations/*/features/*`.
string name = 1;
// Mask of fields to update.
google.protobuf.FieldMask update_mask = 2;
// 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.
// If you specify the update_mask to be a special path "*", fully replaces all
// user-modifiable fields to match `resource`.
Feature resource = 3;
// Optional. A request ID to identify requests. Specify a unique request ID
// so that if you must retry your request, the server will know to ignore
// the request if it has already been completed. The server will guarantee
// that for at least 60 minutes after the first request.
//
// For example, consider a situation where you make an initial request and
// the request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// 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 = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Represents the metadata of the long-running operation.
message OperationMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Server-defined resource path for the target of the operation.
string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Name of the verb executed by the operation.
string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Human-readable status of the operation, if any.
string status_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Identifies whether the user has requested cancellation
// of the operation. Operations that have successfully been cancelled
// have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. API version used to start the operation.
string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -0,0 +1,165 @@
# This file was automatically generated by BuildFileGenerator
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "servicemesh_proto",
srcs = [
"servicemesh.proto",
],
deps = [
"//google/api:annotations_proto",
"//google/api:field_behavior_proto",
"@com_google_protobuf//:struct_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_grpc_library",
"java_proto_library",
)
java_proto_library(
name = "servicemesh_java_proto",
deps = [":servicemesh_proto"],
)
java_grpc_library(
name = "servicemesh_java_grpc",
srcs = [":servicemesh_proto"],
deps = [":servicemesh_java_proto"],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
)
go_proto_library(
name = "servicemesh_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/gkehub/servicemesh/v1alpha",
protos = [":servicemesh_proto"],
deps = [
"//google/api:annotations_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "servicemesh_moved_proto",
srcs = [":servicemesh_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:field_behavior_proto",
"@com_google_protobuf//:struct_proto",
],
)
py_proto_library(
name = "servicemesh_py_proto",
deps = [":servicemesh_moved_proto"],
)
py_grpc_library(
name = "servicemesh_py_grpc",
srcs = [":servicemesh_moved_proto"],
deps = [":servicemesh_py_proto"],
)
##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_grpc_library",
"php_proto_library",
)
php_proto_library(
name = "servicemesh_php_proto",
deps = [":servicemesh_proto"],
)
php_grpc_library(
name = "servicemesh_php_grpc",
srcs = [":servicemesh_proto"],
deps = [":servicemesh_php_proto"],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "servicemesh_ruby_proto",
deps = [":servicemesh_proto"],
)
ruby_grpc_library(
name = "servicemesh_ruby_grpc",
srcs = [":servicemesh_proto"],
deps = [":servicemesh_ruby_proto"],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_grpc_library",
"csharp_proto_library",
)
csharp_proto_library(
name = "servicemesh_csharp_proto",
deps = [":servicemesh_proto"],
)
csharp_grpc_library(
name = "servicemesh_csharp_grpc",
srcs = [":servicemesh_proto"],
deps = [":servicemesh_csharp_proto"],
)
##############################################################################
# C++
##############################################################################
# Put your C++ code here

@ -0,0 +1,115 @@
// Copyright 2021 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.gkehub.servicemesh.v1alpha;
import "google/api/field_behavior.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.GkeHub.ServiceMesh.V1Alpha";
option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/servicemesh/v1alpha;servicemesh";
option java_multiple_files = true;
option java_outer_classname = "ServiceMeshProto";
option java_package = "com.google.cloud.gkehub.servicemesh.v1alpha";
option php_namespace = "Google\\Cloud\\GkeHub\\ServiceMesh\\V1alpha";
option ruby_package = "Google::Cloud::GkeHub::ServiceMesh::V1alpha";
// **Service Mesh**: State for the whole Hub, as analyzed by the Service Mesh
// Hub Controller.
message FeatureState {
// Output only. Results of running Service Mesh analyzers.
repeated AnalysisMessage analysis_messages = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// **Service Mesh**: State for a single Membership, as analyzed by the Service
// Mesh Hub Controller.
message MembershipState {
// Output only. Results of running Service Mesh analyzers.
repeated AnalysisMessage analysis_messages = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// AnalysisMessageBase describes some common information that is
// needed for all messages.
message AnalysisMessageBase {
// A unique identifier for the type of message. Display_name is intended to be
// human-readable, code is intended to be machine readable. There should be a
// one-to-one mapping between display_name and code. (i.e. do not re-use
// display_names or codes between message types.)
// See istio.analysis.v1alpha1.AnalysisMessageBase.Type
message Type {
// A human-readable name for the message type. e.g. "InternalError",
// "PodMissingProxy". This should be the same for all messages of the same
// type. (This corresponds to the `name` field in open-source Istio.)
string display_name = 1;
// A 7 character code matching `^IST[0-9]{4}$` or `^ASM[0-9]{4}$`, intended
// to uniquely identify the message type. (e.g. "IST0001" is mapped to the
// "InternalError" message type.)
string code = 2;
}
// The values here are chosen so that more severe messages get sorted higher,
// as well as leaving space in between to add more later
// See istio.analysis.v1alpha1.AnalysisMessageBase.Level
enum Level {
// Illegal. Same istio.analysis.v1alpha1.AnalysisMessageBase.Level.UNKNOWN.
LEVEL_UNSPECIFIED = 0;
// ERROR represents a misconfiguration that must be fixed.
ERROR = 3;
// WARNING represents a misconfiguration that should be fixed.
WARNING = 8;
// INFO represents an informational finding.
INFO = 12;
}
// Represents the specific type of a message.
Type type = 1;
// Represents how severe a message is.
Level level = 2;
// A url pointing to the Service Mesh or Istio documentation for this specific
// error type.
string documentation_url = 3;
}
// AnalysisMessage is a single message produced by an analyzer, and
// it used to communicate to the end user about the state of their Service
// Mesh configuration.
message AnalysisMessage {
// Details common to all types of Istio and ServiceMesh analysis messages.
AnalysisMessageBase message_base = 1;
// A human readable description of what the error means. It is suitable for
// non-internationalize display purposes.
string description = 2;
// A list of strings specifying the resource identifiers that were the cause
// of message generation.
// A "path" here may be:
// * MEMBERSHIP_ID if the cause is a specific member cluster
// * MEMBERSHIP_ID/(NAMESPACE\/)?RESOURCETYPE/NAME if the cause is a resource
// in a cluster
repeated string resource_paths = 3;
// A UI can combine these args with a template (based on message_base.type)
// to produce an internationalized message.
google.protobuf.Struct args = 4;
}

@ -0,0 +1,13 @@
{
"methodConfig": [{
"name": [{ "service": "google.cloud.gkehub.v1alpha.GkeHub" }],
"timeout": "60s",
"retryPolicy": {
"maxAttempts": 5,
"initialBackoff": "1s",
"maxBackoff": "10s",
"backoffMultiplier": 1.3,
"retryableStatusCodes": ["UNAVAILABLE"]
}
}]
}

@ -1,4 +1,13 @@
# This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/rules_gapic/tree/master/bazel
# Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values:
# - names of *_gapic_assembly_* rules
# - certain parameters of *_gapic_library rules, including but not limited to:
# * extra_protoc_parameters
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
@ -7,6 +16,7 @@ package(default_visibility = ["//visibility:public"])
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "gkehub_proto",
@ -24,11 +34,22 @@ proto_library(
],
)
proto_library_with_info(
name = "gkehub_proto_with_info",
deps = [
":gkehub_proto",
"//google/cloud:common_resources_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
"java_gapic_library",
"java_gapic_test",
"java_grpc_library",
"java_proto_library",
)
@ -44,12 +65,46 @@ java_grpc_library(
deps = [":gkehub_java_proto"],
)
java_gapic_library(
name = "gkehub_java_gapic",
srcs = [":gkehub_proto_with_info"],
grpc_service_config = "membership_grpc_service_config.json",
test_deps = [
":gkehub_java_grpc",
],
deps = [
":gkehub_java_proto",
],
)
java_gapic_test(
name = "gkehub_java_gapic_test_suite",
test_classes = [
"com.google.cloud.gkehub.v1alpha2.GkeHubClientTest",
],
runtime_deps = [":gkehub_java_gapic_test"],
)
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-gkehub-v1alpha2-java",
deps = [
":gkehub_java_gapic",
":gkehub_java_grpc",
":gkehub_java_proto",
":gkehub_proto",
],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
"go_gapic_library",
"go_proto_library",
"go_test",
)
go_proto_library(
@ -63,39 +118,60 @@ go_proto_library(
],
)
go_gapic_library(
name = "gkehub_go_gapic",
srcs = [":gkehub_proto_with_info"],
grpc_service_config = "membership_grpc_service_config.json",
importpath = "cloud.google.com/go/gkehub/apiv1alpha2;gkehub",
metadata = True,
service_yaml = "gkehub_v1alpha2.yaml",
deps = [
":gkehub_go_proto",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@com_google_cloud_go//longrunning/autogen:go_default_library",
],
)
go_test(
name = "gkehub_go_gapic_test",
srcs = [":gkehub_go_gapic_srcjar_test"],
embed = [":gkehub_go_gapic"],
importpath = "cloud.google.com/go/gkehub/apiv1alpha2",
)
# Open Source Packages
go_gapic_assembly_pkg(
name = "gapi-cloud-gkehub-v1alpha2-go",
deps = [
":gkehub_go_gapic",
":gkehub_go_gapic_srcjar-metadata.srcjar",
":gkehub_go_gapic_srcjar-test.srcjar",
":gkehub_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
"py_gapic_assembly_pkg",
"py_gapic_library",
)
moved_proto_library(
name = "gkehub_moved_proto",
py_gapic_library(
name = "gkehub_py_gapic",
srcs = [":gkehub_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:timestamp_proto",
],
grpc_service_config = "membership_grpc_service_config.json",
)
py_proto_library(
name = "gkehub_py_proto",
deps = [":gkehub_moved_proto"],
)
py_grpc_library(
name = "gkehub_py_grpc",
srcs = [":gkehub_moved_proto"],
deps = [":gkehub_py_proto"],
# Open Source Packages
py_gapic_assembly_pkg(
name = "gkehub-v1alpha2-py",
deps = [
":gkehub_py_gapic",
],
)
##############################################################################
@ -103,6 +179,8 @@ py_grpc_library(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
"php_gapic_library",
"php_grpc_library",
"php_proto_library",
)
@ -118,6 +196,27 @@ php_grpc_library(
deps = [":gkehub_php_proto"],
)
php_gapic_library(
name = "gkehub_php_gapic",
srcs = [":gkehub_proto_with_info"],
grpc_service_config = "membership_grpc_service_config.json",
service_yaml = "gkehub_v1alpha2.yaml",
deps = [
":gkehub_php_grpc",
":gkehub_php_proto",
],
)
# Open Source Packages
php_gapic_assembly_pkg(
name = "google-cloud-gkehub-v1alpha2-php",
deps = [
":gkehub_php_gapic",
":gkehub_php_grpc",
":gkehub_php_proto",
],
)
##############################################################################
# Node.js
##############################################################################
@ -127,12 +226,32 @@ load(
"nodejs_gapic_library",
)
nodejs_gapic_library(
name = "gkehub_nodejs_gapic",
package_name = "@google-cloud/gkehub",
src = ":gkehub_proto_with_info",
extra_protoc_parameters = ["metadata"],
grpc_service_config = "membership_grpc_service_config.json",
package = "google.cloud.gkehub.v1alpha2",
service_yaml = "gkehub_v1alpha2.yaml",
deps = [],
)
nodejs_gapic_assembly_pkg(
name = "gkehub-v1alpha2-nodejs",
deps = [
":gkehub_nodejs_gapic",
":gkehub_proto",
],
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
@ -148,11 +267,34 @@ ruby_grpc_library(
deps = [":gkehub_ruby_proto"],
)
ruby_cloud_gapic_library(
name = "gkehub_ruby_gapic",
srcs = [":gkehub_proto_with_info"],
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-gkehub-v1alpha2"],
grpc_service_config = "membership_grpc_service_config.json",
deps = [
":gkehub_ruby_grpc",
":gkehub_ruby_proto",
],
)
# Open Source Packages
ruby_gapic_assembly_pkg(
name = "google-cloud-gkehub-v1alpha2-ruby",
deps = [
":gkehub_ruby_gapic",
":gkehub_ruby_grpc",
":gkehub_ruby_proto",
],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
"csharp_gapic_library",
"csharp_grpc_library",
"csharp_proto_library",
)
@ -168,7 +310,28 @@ csharp_grpc_library(
deps = [":gkehub_csharp_proto"],
)
csharp_gapic_library(
name = "gkehub_csharp_gapic",
srcs = [":gkehub_proto_with_info"],
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "membership_grpc_service_config.json",
deps = [
":gkehub_csharp_grpc",
":gkehub_csharp_proto",
],
)
# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-gkehub-v1alpha2-csharp",
deps = [
":gkehub_csharp_gapic",
":gkehub_csharp_grpc",
":gkehub_csharp_proto",
],
)
##############################################################################
# C++
##############################################################################
# Put your C++ code here
# Put your C++ rules here

@ -1,5 +1,5 @@
# This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
# https://github.com/googleapis/rules_gapic/tree/master/bazel
# Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values:
@ -81,6 +81,7 @@ java_gapic_library(
java_gapic_test(
name = "gkehub_java_gapic_test_suite",
test_classes = [
"com.google.cloud.gkehub.v1beta1.GkeHubMembershipServiceClientTest",
],
runtime_deps = [":gkehub_java_gapic_test"],
)
@ -124,6 +125,7 @@ go_gapic_library(
srcs = [":gkehub_proto_with_info"],
grpc_service_config = "membership_grpc_service_config.json",
importpath = "cloud.google.com/go/gkehub/apiv1beta1;gkehub",
metadata = True,
service_yaml = "gkehub_v1beta1.yaml",
deps = [
":gkehub_go_proto",
@ -145,6 +147,7 @@ go_gapic_assembly_pkg(
name = "gapi-cloud-gkehub-v1beta1-go",
deps = [
":gkehub_go_gapic",
":gkehub_go_gapic_srcjar-metadata.srcjar",
":gkehub_go_gapic_srcjar-test.srcjar",
":gkehub_go_proto",
],
@ -250,8 +253,8 @@ nodejs_gapic_assembly_pkg(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_gapic_assembly_pkg",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
@ -269,13 +272,13 @@ ruby_grpc_library(
ruby_cloud_gapic_library(
name = "gkehub_ruby_gapic",
srcs = [":gkehub_proto_with_info",],
srcs = [":gkehub_proto_with_info"],
extra_protoc_parameters = [
"ruby-cloud-gem-name=google-cloud-gke_hub-v1beta1",
"ruby-cloud-env-prefix=GKE_HUB",
"ruby-cloud-product-url=https://cloud.google.com/anthos/clusters/docs",
"ruby-cloud-api-id=gkehub.googleapis.com",
"ruby-cloud-api-shortname=gkehub",
"ruby-cloud-env-prefix=GKE_HUB",
"ruby-cloud-gem-name=google-cloud-gke_hub-v1beta1",
"ruby-cloud-product-url=https://cloud.google.com/anthos/clusters/docs",
],
grpc_service_config = "membership_grpc_service_config.json",
ruby_cloud_description = "The GKE Hub API centrally manages features and services on all your Kubernetes clusters running in a variety of environments, including Google cloud, on premises in customer datacenters, or other third party clouds.",

Loading…
Cancel
Save