From a4267fc3c5c3a916004c5021fb13bc2bcf214e05 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 27 Feb 2024 10:33:22 +0100 Subject: [PATCH] Integrate kuberesolver into Buildbarn binaries When running Buildbarn on bare metal Kubernetes clusters, it may not always be useful to set up things like kube-proxy, a CNI, or coredns. Just some plain kubelets that only run pods with 'hostNetwork: true' will do. Though very light-weight, it does make it a bit harder to establish network connections between individual components. It requires applications to do a 'kubectl get endpoints' against the API server to figure out the addresses of services are. This change does exactly that. It allows users to register a custom gRPC connection schema like kubernetes://${service}.${namespace}:${port} that automatically expands to the right set of systems. --- go.mod | 2 + go.sum | 5 + go_dependencies.bzl | 12 + pkg/global/BUILD.bazel | 3 + pkg/global/apply_configuration.go | 22 ++ pkg/global/simple_k8s_client.go | 34 ++ pkg/proto/configuration/global/global.pb.go | 339 +++++++++++++------- pkg/proto/configuration/global/global.proto | 20 ++ 8 files changed, 321 insertions(+), 116 deletions(-) create mode 100644 pkg/global/simple_k8s_client.go diff --git a/go.mod b/go.mod index 482b4dcc..be132c49 100644 --- a/go.mod +++ b/go.mod @@ -29,6 +29,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/prometheus/client_model v0.5.0 github.com/prometheus/common v0.45.0 + github.com/sercand/kuberesolver/v5 v5.1.1 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 go.opentelemetry.io/contrib/propagators/b3 v1.21.1 @@ -72,6 +73,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect diff --git a/go.sum b/go.sum index 9dd3a537..fc7d7341 100644 --- a/go.sum +++ b/go.sum @@ -72,6 +72,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fxtlabs/primes v0.0.0-20150821004651-dad82d10a449 h1:HOYnhuVrhAVGKdg3rZapII640so7QfXQmkLkefUN/uM= github.com/fxtlabs/primes v0.0.0-20150821004651-dad82d10a449/go.mod h1:i+vbdOOivRRh2j+WwBkjZXloGN/+KAqfKDwNfUJeugc= github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= @@ -164,6 +166,8 @@ github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lne github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY= +github.com/sercand/kuberesolver/v5 v5.1.1/go.mod h1:Fs1KbKhVRnB2aDWN12NjKCB+RgYMWZJ294T3BtmVCpQ= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -277,6 +281,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/go_dependencies.bzl b/go_dependencies.bzl index 8be31a30..b0f2df0b 100644 --- a/go_dependencies.bzl +++ b/go_dependencies.bzl @@ -237,6 +237,12 @@ def go_dependencies(): sum = "h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=", version = "v1.14.4", ) + go_repository( + name = "com_github_fsnotify_fsnotify", + importpath = "github.com/fsnotify/fsnotify", + sum = "h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=", + version = "v1.6.0", + ) go_repository( name = "com_github_fxtlabs_primes", importpath = "github.com/fxtlabs/primes", @@ -566,6 +572,12 @@ def go_dependencies(): sum = "h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=", version = "v1.10.0", ) + go_repository( + name = "com_github_sercand_kuberesolver_v5", + importpath = "github.com/sercand/kuberesolver/v5", + sum = "h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY=", + version = "v5.1.1", + ) go_repository( name = "com_github_sergi_go_diff", importpath = "github.com/sergi/go-diff", diff --git a/pkg/global/BUILD.bazel b/pkg/global/BUILD.bazel index 213da91f..94c0be22 100644 --- a/pkg/global/BUILD.bazel +++ b/pkg/global/BUILD.bazel @@ -9,6 +9,7 @@ go_library( "resource_limits_linux.go", "resource_limits_nonunix.go", "resource_limits_unix.go", + "simple_k8s_client.go", "umask_nonunix.go", "umask_unix.go", ], @@ -28,6 +29,7 @@ go_library( "@com_github_prometheus_client_golang//prometheus", "@com_github_prometheus_client_golang//prometheus/promhttp", "@com_github_prometheus_client_golang//prometheus/push", + "@com_github_sercand_kuberesolver_v5//:go_default_library", "@io_opentelemetry_go_contrib_instrumentation_google_golang_org_grpc_otelgrpc//:otelgrpc", "@io_opentelemetry_go_contrib_propagators_b3//:b3", "@io_opentelemetry_go_otel//:otel", @@ -40,6 +42,7 @@ go_library( "@io_opentelemetry_go_otel_trace//:trace", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//codes", + "@org_golang_google_grpc//resolver", "@org_golang_google_grpc//status", ] + select({ "@io_bazel_rules_go//go/platform:android": [ diff --git a/pkg/global/apply_configuration.go b/pkg/global/apply_configuration.go index 3123e359..1aca56ab 100644 --- a/pkg/global/apply_configuration.go +++ b/pkg/global/apply_configuration.go @@ -28,9 +28,11 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/push" + "github.com/sercand/kuberesolver/v5" "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/resolver" "google.golang.org/grpc/status" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" @@ -109,6 +111,26 @@ func ApplyConfiguration(configuration *pb.Configuration) (*LifecycleState, bb_gr } log.SetOutput(io.MultiWriter(logWriters...)) + // gRPC resolvers for connecting to Kubernetes service endpoints + // without using cluster internal DNS. + for schema, resolverConfiguration := range configuration.GetGrpcKubernetesResolvers() { + roundTripper, err := bb_http.NewRoundTripperFromConfiguration(resolverConfiguration.ApiServerHttpClient) + if err != nil { + return nil, nil, util.StatusWrapf(err, "Failed to create HTTP client for gRPC Kubernetes resolver for schema %#v", schema) + } + resolver.Register( + kuberesolver.NewBuilder( + newSimpleK8sClient( + &http.Client{ + Transport: bb_http.NewMetricsRoundTripper(roundTripper, "GRPCKubernetesResolver"), + }, + resolverConfiguration.ApiServerUrl, + ), + schema, + ), + ) + } + grpcClientDialer := bb_grpc.NewLazyClientDialer(bb_grpc.BaseClientDialer) var grpcUnaryInterceptors []grpc.UnaryClientInterceptor var grpcStreamInterceptors []grpc.StreamClientInterceptor diff --git a/pkg/global/simple_k8s_client.go b/pkg/global/simple_k8s_client.go new file mode 100644 index 00000000..284914c0 --- /dev/null +++ b/pkg/global/simple_k8s_client.go @@ -0,0 +1,34 @@ +package global + +import ( + "net/http" + + "github.com/sercand/kuberesolver/v5" +) + +type simpleK8sClient struct { + httpClient *http.Client + url string +} + +// newSimpleK8sClient creates a Kubernetes API server client for use +// with kuberesolver. The implementation that ships with kuberesolver +// makes strong assumptions about pathnames and environment variables. +func newSimpleK8sClient(httpClient *http.Client, url string) kuberesolver.K8sClient { + return &simpleK8sClient{ + httpClient: httpClient, + url: url, + } +} + +func (kc *simpleK8sClient) GetRequest(url string) (*http.Request, error) { + return http.NewRequest(http.MethodGet, url, nil) +} + +func (kc *simpleK8sClient) Do(req *http.Request) (*http.Response, error) { + return kc.httpClient.Do(req) +} + +func (kc *simpleK8sClient) Host() string { + return kc.url +} diff --git a/pkg/proto/configuration/global/global.pb.go b/pkg/proto/configuration/global/global.pb.go index d51e53b6..9549ca1c 100644 --- a/pkg/proto/configuration/global/global.pb.go +++ b/pkg/proto/configuration/global/global.pb.go @@ -298,6 +298,7 @@ type Configuration struct { DiagnosticsHttpServer *DiagnosticsHTTPServerConfiguration `protobuf:"bytes,6,opt,name=diagnostics_http_server,json=diagnosticsHttpServer,proto3" json:"diagnostics_http_server,omitempty"` SetUmask *SetUmaskConfiguration `protobuf:"bytes,7,opt,name=set_umask,json=setUmask,proto3" json:"set_umask,omitempty"` GrpcForwardAndReuseMetadata []string `protobuf:"bytes,8,rep,name=grpc_forward_and_reuse_metadata,json=grpcForwardAndReuseMetadata,proto3" json:"grpc_forward_and_reuse_metadata,omitempty"` + GrpcKubernetesResolvers map[string]*GRPCKubernetesResolver `protobuf:"bytes,16,rep,name=grpc_kubernetes_resolvers,json=grpcKubernetesResolvers,proto3" json:"grpc_kubernetes_resolvers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SetResourceLimits map[string]*SetResourceLimitConfiguration `protobuf:"bytes,15,rep,name=set_resource_limits,json=setResourceLimits,proto3" json:"set_resource_limits,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } @@ -382,6 +383,13 @@ func (x *Configuration) GetGrpcForwardAndReuseMetadata() []string { return nil } +func (x *Configuration) GetGrpcKubernetesResolvers() map[string]*GRPCKubernetesResolver { + if x != nil { + return x.GrpcKubernetesResolvers + } + return nil +} + func (x *Configuration) GetSetResourceLimits() map[string]*SetResourceLimitConfiguration { if x != nil { return x.SetResourceLimits @@ -460,6 +468,61 @@ func (x *DiagnosticsHTTPServerConfiguration) GetEnableActiveSpans() bool { return false } +type GRPCKubernetesResolver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiServerHttpClient *http.ClientConfiguration `protobuf:"bytes,1,opt,name=api_server_http_client,json=apiServerHttpClient,proto3" json:"api_server_http_client,omitempty"` + ApiServerUrl string `protobuf:"bytes,2,opt,name=api_server_url,json=apiServerUrl,proto3" json:"api_server_url,omitempty"` +} + +func (x *GRPCKubernetesResolver) Reset() { + *x = GRPCKubernetesResolver{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCKubernetesResolver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCKubernetesResolver) ProtoMessage() {} + +func (x *GRPCKubernetesResolver) ProtoReflect() protoreflect.Message { + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCKubernetesResolver.ProtoReflect.Descriptor instead. +func (*GRPCKubernetesResolver) Descriptor() ([]byte, []int) { + return file_pkg_proto_configuration_global_global_proto_rawDescGZIP(), []int{6} +} + +func (x *GRPCKubernetesResolver) GetApiServerHttpClient() *http.ClientConfiguration { + if x != nil { + return x.ApiServerHttpClient + } + return nil +} + +func (x *GRPCKubernetesResolver) GetApiServerUrl() string { + if x != nil { + return x.ApiServerUrl + } + return "" +} + type PrometheusPushgatewayConfiguration_AdditionalScrapeTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -473,7 +536,7 @@ type PrometheusPushgatewayConfiguration_AdditionalScrapeTarget struct { func (x *PrometheusPushgatewayConfiguration_AdditionalScrapeTarget) Reset() { *x = PrometheusPushgatewayConfiguration_AdditionalScrapeTarget{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[7] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -486,7 +549,7 @@ func (x *PrometheusPushgatewayConfiguration_AdditionalScrapeTarget) String() str func (*PrometheusPushgatewayConfiguration_AdditionalScrapeTarget) ProtoMessage() {} func (x *PrometheusPushgatewayConfiguration_AdditionalScrapeTarget) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[7] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -543,7 +606,7 @@ type TracingConfiguration_Backend struct { func (x *TracingConfiguration_Backend) Reset() { *x = TracingConfiguration_Backend{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[8] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -556,7 +619,7 @@ func (x *TracingConfiguration_Backend) String() string { func (*TracingConfiguration_Backend) ProtoMessage() {} func (x *TracingConfiguration_Backend) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[8] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -667,7 +730,7 @@ type TracingConfiguration_Sampler struct { func (x *TracingConfiguration_Sampler) Reset() { *x = TracingConfiguration_Sampler{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[9] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -680,7 +743,7 @@ func (x *TracingConfiguration_Sampler) String() string { func (*TracingConfiguration_Sampler) ProtoMessage() {} func (x *TracingConfiguration_Sampler) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[9] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -786,7 +849,7 @@ type TracingConfiguration_Backend_JaegerCollectorSpanExporter struct { func (x *TracingConfiguration_Backend_JaegerCollectorSpanExporter) Reset() { *x = TracingConfiguration_Backend_JaegerCollectorSpanExporter{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[10] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -799,7 +862,7 @@ func (x *TracingConfiguration_Backend_JaegerCollectorSpanExporter) String() stri func (*TracingConfiguration_Backend_JaegerCollectorSpanExporter) ProtoMessage() {} func (x *TracingConfiguration_Backend_JaegerCollectorSpanExporter) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[10] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -858,7 +921,7 @@ type TracingConfiguration_Backend_BatchSpanProcessor struct { func (x *TracingConfiguration_Backend_BatchSpanProcessor) Reset() { *x = TracingConfiguration_Backend_BatchSpanProcessor{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[11] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -871,7 +934,7 @@ func (x *TracingConfiguration_Backend_BatchSpanProcessor) String() string { func (*TracingConfiguration_Backend_BatchSpanProcessor) ProtoMessage() {} func (x *TracingConfiguration_Backend_BatchSpanProcessor) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[11] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -937,7 +1000,7 @@ type TracingConfiguration_Sampler_ParentBased struct { func (x *TracingConfiguration_Sampler_ParentBased) Reset() { *x = TracingConfiguration_Sampler_ParentBased{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[12] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -950,7 +1013,7 @@ func (x *TracingConfiguration_Sampler_ParentBased) String() string { func (*TracingConfiguration_Sampler_ParentBased) ProtoMessage() {} func (x *TracingConfiguration_Sampler_ParentBased) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[12] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1013,7 +1076,7 @@ type TracingConfiguration_Sampler_MaximumRate struct { func (x *TracingConfiguration_Sampler_MaximumRate) Reset() { *x = TracingConfiguration_Sampler_MaximumRate{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[13] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1026,7 +1089,7 @@ func (x *TracingConfiguration_Sampler_MaximumRate) String() string { func (*TracingConfiguration_Sampler_MaximumRate) ProtoMessage() {} func (x *TracingConfiguration_Sampler_MaximumRate) ProtoReflect() protoreflect.Message { - mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[13] + mi := &file_pkg_proto_configuration_global_global_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1288,7 +1351,7 @@ var file_pkg_proto_configuration_global_global_proto_rawDesc = []byte{ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x68, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x22, 0xc5, 0x06, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x22, 0xd3, 0x08, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, 0x72, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6c, @@ -1324,44 +1387,71 @@ var file_pkg_proto_configuration_global_global_proto_rawDesc = []byte{ 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1b, 0x67, 0x72, 0x70, 0x63, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x74, 0x0a, 0x13, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0f, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, 0x72, 0x6e, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x1a, 0x83, 0x01, 0x0a, - 0x16, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x53, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x62, 0x61, 0x72, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x80, 0x02, 0x0a, 0x22, 0x44, 0x69, 0x61, - 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x54, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, 0x72, - 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x70, 0x70, 0x72, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6d, 0x65, - 0x74, 0x68, 0x65, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x53, 0x70, 0x61, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x40, 0x5a, 0x3e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, - 0x61, 0x72, 0x6e, 0x2f, 0x62, 0x62, 0x2d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x86, 0x01, 0x0a, 0x19, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x62, 0x61, 0x72, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4b, 0x75, + 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x67, 0x72, 0x70, 0x63, 0x4b, 0x75, 0x62, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, + 0x74, 0x0a, 0x13, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, 0x72, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x1a, 0x82, 0x01, 0x0a, 0x1c, 0x47, 0x72, 0x70, 0x63, 0x4b, 0x75, + 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, + 0x61, 0x72, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x83, 0x01, 0x0a, 0x16, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x53, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, + 0x72, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x80, 0x02, 0x0a, 0x22, 0x44, 0x69, 0x61, 0x67, 0x6e, + 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, + 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, 0x72, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x70, + 0x72, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, + 0x65, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x70, + 0x61, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xa6, 0x01, 0x0a, 0x16, 0x47, 0x52, + 0x50, 0x43, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x72, 0x12, 0x66, 0x0a, 0x16, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, 0x72, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x61, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0e, + 0x61, 0x70, 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, + 0x72, 0x6c, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x61, 0x72, 0x6e, 0x2f, 0x62, 0x62, 0x2d, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1376,7 +1466,7 @@ func file_pkg_proto_configuration_global_global_proto_rawDescGZIP() []byte { return file_pkg_proto_configuration_global_global_proto_rawDescData } -var file_pkg_proto_configuration_global_global_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_pkg_proto_configuration_global_global_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_pkg_proto_configuration_global_global_proto_goTypes = []interface{}{ (*PrometheusPushgatewayConfiguration)(nil), // 0: buildbarn.configuration.global.PrometheusPushgatewayConfiguration (*TracingConfiguration)(nil), // 1: buildbarn.configuration.global.TracingConfiguration @@ -1384,64 +1474,69 @@ var file_pkg_proto_configuration_global_global_proto_goTypes = []interface{}{ (*SetResourceLimitConfiguration)(nil), // 3: buildbarn.configuration.global.SetResourceLimitConfiguration (*Configuration)(nil), // 4: buildbarn.configuration.global.Configuration (*DiagnosticsHTTPServerConfiguration)(nil), // 5: buildbarn.configuration.global.DiagnosticsHTTPServerConfiguration - nil, // 6: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.GroupingEntry - (*PrometheusPushgatewayConfiguration_AdditionalScrapeTarget)(nil), // 7: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.AdditionalScrapeTarget - (*TracingConfiguration_Backend)(nil), // 8: buildbarn.configuration.global.TracingConfiguration.Backend - (*TracingConfiguration_Sampler)(nil), // 9: buildbarn.configuration.global.TracingConfiguration.Sampler - (*TracingConfiguration_Backend_JaegerCollectorSpanExporter)(nil), // 10: buildbarn.configuration.global.TracingConfiguration.Backend.JaegerCollectorSpanExporter - (*TracingConfiguration_Backend_BatchSpanProcessor)(nil), // 11: buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor - (*TracingConfiguration_Sampler_ParentBased)(nil), // 12: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased - (*TracingConfiguration_Sampler_MaximumRate)(nil), // 13: buildbarn.configuration.global.TracingConfiguration.Sampler.MaximumRate - nil, // 14: buildbarn.configuration.global.Configuration.SetResourceLimitsEntry - (*durationpb.Duration)(nil), // 15: google.protobuf.Duration - (*http.ClientConfiguration)(nil), // 16: buildbarn.configuration.http.ClientConfiguration - (*v1.KeyValue)(nil), // 17: opentelemetry.proto.common.v1.KeyValue - (*wrapperspb.UInt64Value)(nil), // 18: google.protobuf.UInt64Value - (*http.ServerConfiguration)(nil), // 19: buildbarn.configuration.http.ServerConfiguration - (*grpc.ClientConfiguration)(nil), // 20: buildbarn.configuration.grpc.ClientConfiguration - (*emptypb.Empty)(nil), // 21: google.protobuf.Empty + (*GRPCKubernetesResolver)(nil), // 6: buildbarn.configuration.global.GRPCKubernetesResolver + nil, // 7: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.GroupingEntry + (*PrometheusPushgatewayConfiguration_AdditionalScrapeTarget)(nil), // 8: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.AdditionalScrapeTarget + (*TracingConfiguration_Backend)(nil), // 9: buildbarn.configuration.global.TracingConfiguration.Backend + (*TracingConfiguration_Sampler)(nil), // 10: buildbarn.configuration.global.TracingConfiguration.Sampler + (*TracingConfiguration_Backend_JaegerCollectorSpanExporter)(nil), // 11: buildbarn.configuration.global.TracingConfiguration.Backend.JaegerCollectorSpanExporter + (*TracingConfiguration_Backend_BatchSpanProcessor)(nil), // 12: buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor + (*TracingConfiguration_Sampler_ParentBased)(nil), // 13: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased + (*TracingConfiguration_Sampler_MaximumRate)(nil), // 14: buildbarn.configuration.global.TracingConfiguration.Sampler.MaximumRate + nil, // 15: buildbarn.configuration.global.Configuration.GrpcKubernetesResolversEntry + nil, // 16: buildbarn.configuration.global.Configuration.SetResourceLimitsEntry + (*durationpb.Duration)(nil), // 17: google.protobuf.Duration + (*http.ClientConfiguration)(nil), // 18: buildbarn.configuration.http.ClientConfiguration + (*v1.KeyValue)(nil), // 19: opentelemetry.proto.common.v1.KeyValue + (*wrapperspb.UInt64Value)(nil), // 20: google.protobuf.UInt64Value + (*http.ServerConfiguration)(nil), // 21: buildbarn.configuration.http.ServerConfiguration + (*grpc.ClientConfiguration)(nil), // 22: buildbarn.configuration.grpc.ClientConfiguration + (*emptypb.Empty)(nil), // 23: google.protobuf.Empty } var file_pkg_proto_configuration_global_global_proto_depIdxs = []int32{ - 6, // 0: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.grouping:type_name -> buildbarn.configuration.global.PrometheusPushgatewayConfiguration.GroupingEntry - 15, // 1: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.push_interval:type_name -> google.protobuf.Duration - 16, // 2: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.http_client:type_name -> buildbarn.configuration.http.ClientConfiguration - 15, // 3: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.push_timeout:type_name -> google.protobuf.Duration - 7, // 4: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.additional_scrape_targets:type_name -> buildbarn.configuration.global.PrometheusPushgatewayConfiguration.AdditionalScrapeTarget - 8, // 5: buildbarn.configuration.global.TracingConfiguration.backends:type_name -> buildbarn.configuration.global.TracingConfiguration.Backend - 17, // 6: buildbarn.configuration.global.TracingConfiguration.resource_attributes:type_name -> opentelemetry.proto.common.v1.KeyValue - 9, // 7: buildbarn.configuration.global.TracingConfiguration.sampler:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler - 18, // 8: buildbarn.configuration.global.SetResourceLimitConfiguration.soft_limit:type_name -> google.protobuf.UInt64Value - 18, // 9: buildbarn.configuration.global.SetResourceLimitConfiguration.hard_limit:type_name -> google.protobuf.UInt64Value + 7, // 0: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.grouping:type_name -> buildbarn.configuration.global.PrometheusPushgatewayConfiguration.GroupingEntry + 17, // 1: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.push_interval:type_name -> google.protobuf.Duration + 18, // 2: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.http_client:type_name -> buildbarn.configuration.http.ClientConfiguration + 17, // 3: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.push_timeout:type_name -> google.protobuf.Duration + 8, // 4: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.additional_scrape_targets:type_name -> buildbarn.configuration.global.PrometheusPushgatewayConfiguration.AdditionalScrapeTarget + 9, // 5: buildbarn.configuration.global.TracingConfiguration.backends:type_name -> buildbarn.configuration.global.TracingConfiguration.Backend + 19, // 6: buildbarn.configuration.global.TracingConfiguration.resource_attributes:type_name -> opentelemetry.proto.common.v1.KeyValue + 10, // 7: buildbarn.configuration.global.TracingConfiguration.sampler:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler + 20, // 8: buildbarn.configuration.global.SetResourceLimitConfiguration.soft_limit:type_name -> google.protobuf.UInt64Value + 20, // 9: buildbarn.configuration.global.SetResourceLimitConfiguration.hard_limit:type_name -> google.protobuf.UInt64Value 1, // 10: buildbarn.configuration.global.Configuration.tracing:type_name -> buildbarn.configuration.global.TracingConfiguration 0, // 11: buildbarn.configuration.global.Configuration.prometheus_pushgateway:type_name -> buildbarn.configuration.global.PrometheusPushgatewayConfiguration 5, // 12: buildbarn.configuration.global.Configuration.diagnostics_http_server:type_name -> buildbarn.configuration.global.DiagnosticsHTTPServerConfiguration 2, // 13: buildbarn.configuration.global.Configuration.set_umask:type_name -> buildbarn.configuration.global.SetUmaskConfiguration - 14, // 14: buildbarn.configuration.global.Configuration.set_resource_limits:type_name -> buildbarn.configuration.global.Configuration.SetResourceLimitsEntry - 19, // 15: buildbarn.configuration.global.DiagnosticsHTTPServerConfiguration.http_servers:type_name -> buildbarn.configuration.http.ServerConfiguration - 16, // 16: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.AdditionalScrapeTarget.http_client:type_name -> buildbarn.configuration.http.ClientConfiguration - 10, // 17: buildbarn.configuration.global.TracingConfiguration.Backend.jaeger_collector_span_exporter:type_name -> buildbarn.configuration.global.TracingConfiguration.Backend.JaegerCollectorSpanExporter - 20, // 18: buildbarn.configuration.global.TracingConfiguration.Backend.otlp_span_exporter:type_name -> buildbarn.configuration.grpc.ClientConfiguration - 21, // 19: buildbarn.configuration.global.TracingConfiguration.Backend.simple_span_processor:type_name -> google.protobuf.Empty - 11, // 20: buildbarn.configuration.global.TracingConfiguration.Backend.batch_span_processor:type_name -> buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor - 21, // 21: buildbarn.configuration.global.TracingConfiguration.Sampler.always:type_name -> google.protobuf.Empty - 21, // 22: buildbarn.configuration.global.TracingConfiguration.Sampler.never:type_name -> google.protobuf.Empty - 12, // 23: buildbarn.configuration.global.TracingConfiguration.Sampler.parent_based:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased - 13, // 24: buildbarn.configuration.global.TracingConfiguration.Sampler.maximum_rate:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler.MaximumRate - 16, // 25: buildbarn.configuration.global.TracingConfiguration.Backend.JaegerCollectorSpanExporter.http_client:type_name -> buildbarn.configuration.http.ClientConfiguration - 15, // 26: buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor.batch_timeout:type_name -> google.protobuf.Duration - 15, // 27: buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor.export_timeout:type_name -> google.protobuf.Duration - 9, // 28: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.no_parent:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler - 9, // 29: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.local_parent_not_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler - 9, // 30: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.local_parent_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler - 9, // 31: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.remote_parent_not_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler - 9, // 32: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.remote_parent_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler - 15, // 33: buildbarn.configuration.global.TracingConfiguration.Sampler.MaximumRate.epoch_duration:type_name -> google.protobuf.Duration - 3, // 34: buildbarn.configuration.global.Configuration.SetResourceLimitsEntry.value:type_name -> buildbarn.configuration.global.SetResourceLimitConfiguration - 35, // [35:35] is the sub-list for method output_type - 35, // [35:35] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name + 15, // 14: buildbarn.configuration.global.Configuration.grpc_kubernetes_resolvers:type_name -> buildbarn.configuration.global.Configuration.GrpcKubernetesResolversEntry + 16, // 15: buildbarn.configuration.global.Configuration.set_resource_limits:type_name -> buildbarn.configuration.global.Configuration.SetResourceLimitsEntry + 21, // 16: buildbarn.configuration.global.DiagnosticsHTTPServerConfiguration.http_servers:type_name -> buildbarn.configuration.http.ServerConfiguration + 18, // 17: buildbarn.configuration.global.GRPCKubernetesResolver.api_server_http_client:type_name -> buildbarn.configuration.http.ClientConfiguration + 18, // 18: buildbarn.configuration.global.PrometheusPushgatewayConfiguration.AdditionalScrapeTarget.http_client:type_name -> buildbarn.configuration.http.ClientConfiguration + 11, // 19: buildbarn.configuration.global.TracingConfiguration.Backend.jaeger_collector_span_exporter:type_name -> buildbarn.configuration.global.TracingConfiguration.Backend.JaegerCollectorSpanExporter + 22, // 20: buildbarn.configuration.global.TracingConfiguration.Backend.otlp_span_exporter:type_name -> buildbarn.configuration.grpc.ClientConfiguration + 23, // 21: buildbarn.configuration.global.TracingConfiguration.Backend.simple_span_processor:type_name -> google.protobuf.Empty + 12, // 22: buildbarn.configuration.global.TracingConfiguration.Backend.batch_span_processor:type_name -> buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor + 23, // 23: buildbarn.configuration.global.TracingConfiguration.Sampler.always:type_name -> google.protobuf.Empty + 23, // 24: buildbarn.configuration.global.TracingConfiguration.Sampler.never:type_name -> google.protobuf.Empty + 13, // 25: buildbarn.configuration.global.TracingConfiguration.Sampler.parent_based:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased + 14, // 26: buildbarn.configuration.global.TracingConfiguration.Sampler.maximum_rate:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler.MaximumRate + 18, // 27: buildbarn.configuration.global.TracingConfiguration.Backend.JaegerCollectorSpanExporter.http_client:type_name -> buildbarn.configuration.http.ClientConfiguration + 17, // 28: buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor.batch_timeout:type_name -> google.protobuf.Duration + 17, // 29: buildbarn.configuration.global.TracingConfiguration.Backend.BatchSpanProcessor.export_timeout:type_name -> google.protobuf.Duration + 10, // 30: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.no_parent:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler + 10, // 31: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.local_parent_not_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler + 10, // 32: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.local_parent_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler + 10, // 33: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.remote_parent_not_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler + 10, // 34: buildbarn.configuration.global.TracingConfiguration.Sampler.ParentBased.remote_parent_sampled:type_name -> buildbarn.configuration.global.TracingConfiguration.Sampler + 17, // 35: buildbarn.configuration.global.TracingConfiguration.Sampler.MaximumRate.epoch_duration:type_name -> google.protobuf.Duration + 6, // 36: buildbarn.configuration.global.Configuration.GrpcKubernetesResolversEntry.value:type_name -> buildbarn.configuration.global.GRPCKubernetesResolver + 3, // 37: buildbarn.configuration.global.Configuration.SetResourceLimitsEntry.value:type_name -> buildbarn.configuration.global.SetResourceLimitConfiguration + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_pkg_proto_configuration_global_global_proto_init() } @@ -1522,8 +1617,8 @@ func file_pkg_proto_configuration_global_global_proto_init() { return nil } } - file_pkg_proto_configuration_global_global_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrometheusPushgatewayConfiguration_AdditionalScrapeTarget); i { + file_pkg_proto_configuration_global_global_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCKubernetesResolver); i { case 0: return &v.state case 1: @@ -1535,7 +1630,7 @@ func file_pkg_proto_configuration_global_global_proto_init() { } } file_pkg_proto_configuration_global_global_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TracingConfiguration_Backend); i { + switch v := v.(*PrometheusPushgatewayConfiguration_AdditionalScrapeTarget); i { case 0: return &v.state case 1: @@ -1547,7 +1642,7 @@ func file_pkg_proto_configuration_global_global_proto_init() { } } file_pkg_proto_configuration_global_global_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TracingConfiguration_Sampler); i { + switch v := v.(*TracingConfiguration_Backend); i { case 0: return &v.state case 1: @@ -1559,7 +1654,7 @@ func file_pkg_proto_configuration_global_global_proto_init() { } } file_pkg_proto_configuration_global_global_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TracingConfiguration_Backend_JaegerCollectorSpanExporter); i { + switch v := v.(*TracingConfiguration_Sampler); i { case 0: return &v.state case 1: @@ -1571,7 +1666,7 @@ func file_pkg_proto_configuration_global_global_proto_init() { } } file_pkg_proto_configuration_global_global_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TracingConfiguration_Backend_BatchSpanProcessor); i { + switch v := v.(*TracingConfiguration_Backend_JaegerCollectorSpanExporter); i { case 0: return &v.state case 1: @@ -1583,7 +1678,7 @@ func file_pkg_proto_configuration_global_global_proto_init() { } } file_pkg_proto_configuration_global_global_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TracingConfiguration_Sampler_ParentBased); i { + switch v := v.(*TracingConfiguration_Backend_BatchSpanProcessor); i { case 0: return &v.state case 1: @@ -1595,6 +1690,18 @@ func file_pkg_proto_configuration_global_global_proto_init() { } } file_pkg_proto_configuration_global_global_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TracingConfiguration_Sampler_ParentBased); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_proto_configuration_global_global_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TracingConfiguration_Sampler_MaximumRate); i { case 0: return &v.state @@ -1607,13 +1714,13 @@ func file_pkg_proto_configuration_global_global_proto_init() { } } } - file_pkg_proto_configuration_global_global_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_pkg_proto_configuration_global_global_proto_msgTypes[9].OneofWrappers = []interface{}{ (*TracingConfiguration_Backend_JaegerCollectorSpanExporter_)(nil), (*TracingConfiguration_Backend_OtlpSpanExporter)(nil), (*TracingConfiguration_Backend_SimpleSpanProcessor)(nil), (*TracingConfiguration_Backend_BatchSpanProcessor_)(nil), } - file_pkg_proto_configuration_global_global_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_pkg_proto_configuration_global_global_proto_msgTypes[10].OneofWrappers = []interface{}{ (*TracingConfiguration_Sampler_Always)(nil), (*TracingConfiguration_Sampler_Never)(nil), (*TracingConfiguration_Sampler_ParentBased_)(nil), @@ -1626,7 +1733,7 @@ func file_pkg_proto_configuration_global_global_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_proto_configuration_global_global_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/proto/configuration/global/global.proto b/pkg/proto/configuration/global/global.proto index c1143fb5..eb918592 100644 --- a/pkg/proto/configuration/global/global.proto +++ b/pkg/proto/configuration/global/global.proto @@ -276,6 +276,17 @@ message Configuration { // credentials. repeated string grpc_forward_and_reuse_metadata = 8; + // Register gRPC load balancer resolvers that are capable of + // connecting to Kubernetes service endpoints. + // + // Map keys indicate the name of the URL schema to register. For + // example, if "kubernetes" is used you may use address + // "kubernetes://storage.buildbarn:8981" to connect to port 8981 of + // service "storage" in namespace "buildbarn". + // + // More details: https://github.com/sercand/kuberesolver + map grpc_kubernetes_resolvers = 16; + // Resource limits to apply on startup using setrlimit(2) to ensure // the program is capable of only consuming a finite number of file // descriptors or amount of memory. @@ -309,3 +320,12 @@ message DiagnosticsHTTPServerConfiguration { // 'tracing' option is enabled. bool enable_active_spans = 4; } + +message GRPCKubernetesResolver { + // Options to be used by the HTTP client to connect to the Kubernetes + // API server. + buildbarn.configuration.http.ClientConfiguration api_server_http_client = 1; + + // The URL of the Kubernetes API server. + string api_server_url = 2; +}