diff --git a/.golangci.yml b/.golangci.yml index 17fb4fe35a4b..2b7afbc44fdb 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -33,6 +33,10 @@ linters-settings: alias: mesh_proto - pkg: github.com/kumahq/kuma/pkg/util/proto alias: util_proto + misspell: + locale: US + ignore-words: + - cancelled # US English should be "canceled", but this is in the Retry API, so we can't change it. issues: fix: true diff --git a/api/Makefile b/api/Makefile index 6bee61938afe..ac3f7b9a5c68 100644 --- a/api/Makefile +++ b/api/Makefile @@ -163,7 +163,7 @@ clean: ## Remove generated files find . -name '*.pb.go' -delete find . -name '*.pb.validate.go' -delete -generate: clean protoc/mesh protoc/mesh/v1alpha1 protoc/observability/v1alpha1 protoc/observability/v1 protoc/system/v1alpha1 ## Process .proto definitions +generate: clean protoc/mesh protoc/mesh/v1alpha1 protoc/observability/v1 protoc/system/v1alpha1 ## Process .proto definitions protoc/mesh: $(PROTOC_GO) mesh/*.proto @@ -171,9 +171,6 @@ protoc/mesh: protoc/mesh/v1alpha1: $(PROTOC_GO) mesh/v1alpha1/*.proto -protoc/observability/v1alpha1: - $(PROTOC_GO) observability/v1alpha1/*.proto - protoc/observability/v1: $(PROTOC_GO) observability/v1/*.proto diff --git a/api/mesh/v1alpha1/circuit_breaker.pb.go b/api/mesh/v1alpha1/circuit_breaker.pb.go index 47c8c04ab721..ab36aa740176 100644 --- a/api/mesh/v1alpha1/circuit_breaker.pb.go +++ b/api/mesh/v1alpha1/circuit_breaker.pb.go @@ -548,139 +548,140 @@ var file_mesh_v1alpha1_circuit_breaker_proto_rawDesc = []byte{ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x0f, 0x0a, 0x0e, 0x43, 0x69, - 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf3, 0x0f, 0x0a, 0x0e, 0x43, 0x69, + 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, - 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, - 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, 0x63, - 0x6f, 0x6e, 0x66, 0x1a, 0xb2, 0x0d, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x35, 0x0a, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x45, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x45, 0x6a, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x62, 0x61, 0x73, 0x65, 0x45, 0x6a, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x12, 0x6d, 0x61, - 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x18, 0x03, 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, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x1b, 0x73, 0x70, 0x6c, 0x69, - 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x73, - 0x70, 0x6c, 0x69, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x6e, 0x64, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x09, 0x64, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, - 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x52, 0x09, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x52, 0x0a, 0x0a, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, + 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, + 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, + 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0xb2, 0x0d, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x35, + 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x45, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x45, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x62, 0x61, 0x73, 0x65, + 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x12, + 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x18, 0x03, 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, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x1b, 0x73, 0x70, + 0x6c, 0x69, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x6e, 0x64, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x1b, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x6e, + 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x09, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x73, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x1a, - 0xd5, 0x07, 0x0a, 0x09, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x5a, 0x0a, - 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x09, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x52, 0x0a, + 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x32, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, + 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x73, 0x1a, 0xd5, 0x07, 0x0a, 0x09, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, + 0x5a, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, + 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x0d, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x0b, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x0d, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x0d, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x0b, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x0d, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, - 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x71, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, - 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x43, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x1a, 0x48, 0x0a, - 0x06, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x1a, 0xcf, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x6e, - 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, - 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, - 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, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, 0x73, 0x74, - 0x73, 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, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, - 0x73, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0xcb, 0x01, 0x0a, 0x07, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x73, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x09, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0x9e, 0x02, 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x71, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, + 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, + 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, + 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x07, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, + 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, + 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x1a, + 0x48, 0x0a, 0x06, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, - 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x12, - 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 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, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x6d, 0x61, - 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x1a, 0xcf, 0x01, 0x0a, 0x11, 0x53, 0x74, + 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x18, 0x01, 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, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, + 0x73, 0x74, 0x73, 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, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0xcb, 0x01, 0x0a, 0x07, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, - 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x3a, 0x63, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x18, - 0x0a, 0x16, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x10, 0x12, 0x0e, - 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0xaa, 0x8c, - 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, - 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x3a, 0x11, 0x0a, 0x0f, 0x63, 0x69, - 0x72, 0x63, 0x75, 0x69, 0x74, 0x2d, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x42, 0x53, 0x5a, - 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, - 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x25, 0x50, 0x01, 0xa2, - 0x01, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0xf2, 0x01, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2d, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x6d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x73, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0c, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x3a, 0x0a, + 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, + 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0x9e, 0x02, 0x0a, 0x0a, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, + 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, + 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0a, + 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, + 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x6d, 0x61, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6d, + 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x3a, 0x63, 0xaa, 0x8c, 0x89, 0xa6, + 0x01, 0x18, 0x0a, 0x16, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x10, + 0x12, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, + 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, + 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x3a, 0x11, 0x0a, 0x0f, + 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2d, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x42, + 0x53, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, + 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, + 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x25, 0x50, + 0x01, 0xa2, 0x01, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, + 0x65, 0x72, 0xf2, 0x01, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2d, 0x62, 0x72, 0x65, + 0x61, 0x6b, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/circuit_breaker.proto b/api/mesh/v1alpha1/circuit_breaker.proto index fc9608cbde37..65ffcb6079a5 100644 --- a/api/mesh/v1alpha1/circuit_breaker.proto +++ b/api/mesh/v1alpha1/circuit_breaker.proto @@ -26,10 +26,10 @@ message CircuitBreaker { option (kuma.mesh.resource).ws.name = "circuit-breaker"; // List of selectors to match dataplanes that are sources of traffic. - repeated Selector sources = 1; + repeated Selector sources = 1 [ (doc.required) = true ]; // List of selectors to match services that are destinations of traffic. - repeated Selector destinations = 2; + repeated Selector destinations = 2 [ (doc.required) = true ]; message Conf { // Time interval between ejection analysis sweeps @@ -102,5 +102,5 @@ message CircuitBreaker { Thresholds thresholds = 6; } - Conf conf = 3; + Conf conf = 3 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/externalservice.pb.go b/api/mesh/v1alpha1/externalservice.pb.go index 1b32e8141301..f5b9728249c5 100644 --- a/api/mesh/v1alpha1/externalservice.pb.go +++ b/api/mesh/v1alpha1/externalservice.pb.go @@ -252,20 +252,21 @@ var file_mesh_v1alpha1_externalservice_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x06, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x6e, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x06, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x0a, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x04, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x9a, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0xd8, 0x03, 0x0a, 0x0a, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x04, + 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, + 0x12, 0x4f, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0c, 0xfa, + 0x42, 0x05, 0x9a, 0x01, 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x1a, 0xde, 0x03, 0x0a, 0x0a, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, + 0x12, 0x1e, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, diff --git a/api/mesh/v1alpha1/externalservice.proto b/api/mesh/v1alpha1/externalservice.proto index a2f25b902225..3697a89c9302 100644 --- a/api/mesh/v1alpha1/externalservice.proto +++ b/api/mesh/v1alpha1/externalservice.proto @@ -29,7 +29,7 @@ message ExternalService { // Networking describes the properties of the external service connectivity message Networking { // Address of the external service - string address = 1; + string address = 1 [ (doc.required) = true ]; // TLS message TLS { @@ -59,9 +59,10 @@ message ExternalService { TLS tls = 2; } - Networking networking = 1; + Networking networking = 1 [ (doc.required) = true ]; // Tags associated with the external service, // e.g. kuma.io/service=web, kuma.io/protocol, version=1.0. - map tags = 2 [ (validate.rules).map.min_pairs = 1 ]; + map tags = 2 + [ (validate.rules).map.min_pairs = 1, (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/fault_injection.pb.go b/api/mesh/v1alpha1/fault_injection.pb.go index 2e247fbad5f2..8cbf6686707f 100644 --- a/api/mesh/v1alpha1/fault_injection.pb.go +++ b/api/mesh/v1alpha1/fault_injection.pb.go @@ -355,72 +355,75 @@ var file_mesh_v1alpha1_fault_injection_proto_rawDesc = []byte{ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x07, 0x0a, 0x0e, 0x46, 0x61, - 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x07, 0x0a, 0x0e, 0x46, 0x61, + 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, - 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, - 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, 0x63, - 0x6f, 0x6e, 0x66, 0x1a, 0x80, 0x05, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x43, 0x0a, 0x05, - 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6b, 0x75, - 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, - 0x79, 0x12, 0x43, 0x0a, 0x05, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, + 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, + 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, - 0x05, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x12, 0x68, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0xa5, 0x05, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x43, + 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x11, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, - 0x1a, 0x76, 0x0a, 0x05, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x83, 0x01, 0x0a, 0x05, 0x41, 0x62, 0x6f, - 0x72, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x12, 0x3c, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x85, - 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, - 0x69, 0x64, 0x74, 0x68, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 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, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x63, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x18, 0x0a, 0x16, - 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x10, 0x12, 0x0e, 0x46, 0x61, - 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0xaa, 0x8c, 0x89, 0xa6, - 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, - 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x3a, 0x11, 0x0a, 0x0f, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x2d, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x53, 0x5a, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, - 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x25, 0x50, 0x01, 0xa2, 0x01, 0x0e, - 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0xf2, 0x01, - 0x0f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2d, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x41, 0x62, 0x6f, 0x72, + 0x74, 0x52, 0x05, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x12, 0x68, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, + 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x1a, 0x82, 0x01, 0x0a, 0x05, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x42, 0x0a, 0x0a, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x04, + 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x8f, 0x01, 0x0a, 0x05, 0x41, 0x62, 0x6f, 0x72, + 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x42, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0a, 0x68, + 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x91, 0x01, 0x0a, 0x11, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, + 0x42, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 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, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x63, 0xaa, + 0x8c, 0x89, 0xa6, 0x01, 0x18, 0x0a, 0x16, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, + 0xa6, 0x01, 0x10, 0x12, 0x0e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, + 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x3a, + 0x11, 0x0a, 0x0f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2d, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x53, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, + 0x18, 0x25, 0x50, 0x01, 0xa2, 0x01, 0x0e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0xf2, 0x01, 0x0f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2d, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/fault_injection.proto b/api/mesh/v1alpha1/fault_injection.proto index 80bd62372842..1c58c713fb7e 100644 --- a/api/mesh/v1alpha1/fault_injection.proto +++ b/api/mesh/v1alpha1/fault_injection.proto @@ -26,10 +26,10 @@ message FaultInjection { option (kuma.mesh.resource).ws.name = "fault-injection"; // List of selectors to match dataplanes that are sources of traffic. - repeated Selector sources = 1; + repeated Selector sources = 1 [ (doc.required) = true ]; // List of selectors to match services that are destinations of traffic. - repeated Selector destinations = 2; + repeated Selector destinations = 2 [ (doc.required) = true ]; // Conf defines several types of faults, at least one fault should be // specified @@ -39,9 +39,9 @@ message FaultInjection { message Delay { // Percentage of requests on which delay will be injected, has to be in // [0.0 - 100.0] range - google.protobuf.DoubleValue percentage = 1; + google.protobuf.DoubleValue percentage = 1 [ (doc.required) = true ]; // The duration during which the response will be delayed - google.protobuf.Duration value = 2; + google.protobuf.Duration value = 2 [ (doc.required) = true ]; } // Delay if specified then response from the destination will be delivered // with a delay @@ -53,9 +53,9 @@ message FaultInjection { message Abort { // Percentage of requests on which abort will be injected, has to be in // [0.0 - 100.0] range - google.protobuf.DoubleValue percentage = 1; + google.protobuf.DoubleValue percentage = 1 [ (doc.required) = true ]; // HTTP status code which will be returned to source side - google.protobuf.UInt32Value httpStatus = 2; + google.protobuf.UInt32Value httpStatus = 2 [ (doc.required) = true ]; } // Abort if specified makes source side to receive specified httpStatus code Abort abort = 2; @@ -65,15 +65,15 @@ message FaultInjection { message ResponseBandwidth { // Percentage of requests on which response bandwidth limit will be // injected, has to be in [0.0 - 100.0] range - google.protobuf.DoubleValue percentage = 1; + google.protobuf.DoubleValue percentage = 1 [ (doc.required) = true ]; // Limit is represented by value measure in gbps, mbps, kbps or bps, e.g. // 10kbps - google.protobuf.StringValue limit = 2; + google.protobuf.StringValue limit = 2 [ (doc.required) = true ]; } // ResponseBandwidth if specified limits the speed of sending response body ResponseBandwidth response_bandwidth = 3; } // Configuration of FaultInjection - Conf conf = 3; + Conf conf = 3 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/health_check.pb.go b/api/mesh/v1alpha1/health_check.pb.go index d33f5924eb8e..41424b985ec3 100644 --- a/api/mesh/v1alpha1/health_check.pb.go +++ b/api/mesh/v1alpha1/health_check.pb.go @@ -360,7 +360,7 @@ type HealthCheck_Conf_Http struct { // The HTTP path which will be requested during the health check // (ie. /health) // +required - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The list of HTTP headers which should be added to each health check // request // +optional @@ -558,114 +558,117 @@ var file_mesh_v1alpha1_health_check_proto_rawDesc = []byte{ 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xcc, 0x0e, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, - 0x40, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0xfc, 0x0e, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, + 0x44, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, - 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, - 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x75, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0c, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x07, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x98, 0x0c, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, - 0x12, 0x41, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x3f, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x38, 0x0a, 0x13, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x12, 0x75, 0x6e, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x34, - 0x0a, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x20, 0x00, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x40, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, - 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x17, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, 0x61, - 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4d, 0x0a, 0x15, 0x66, 0x61, 0x69, 0x6c, 0x5f, - 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4f, - 0x6e, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, - 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x62, 0x0a, 0x20, - 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x1c, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x4c, 0x6f, 0x67, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, - 0x12, 0x49, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0c, 0xfa, 0x42, 0x05, 0x92, 0x01, + 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0xba, 0x0c, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x45, + 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x07, + 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x43, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x88, 0xb5, 0x18, + 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x13, 0x75, 0x6e, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, + 0x88, 0xb5, 0x18, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x38, 0x0a, 0x11, 0x68, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x88, 0xb5, 0x18, 0x01, + 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x12, 0x40, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6a, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4a, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3a, 0x0a, 0x03, 0x74, - 0x63, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x54, - 0x63, 0x70, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x3d, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x45, 0x0a, 0x10, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, - 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, - 0x03, 0x54, 0x63, 0x70, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x04, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x1a, 0xb3, 0x03, 0x0a, - 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x70, 0x0a, 0x16, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6b, 0x75, 0x6d, 0x61, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x12, 0x53, 0x0a, 0x17, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, 0x61, 0x6e, 0x69, + 0x63, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x15, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4d, 0x0a, 0x15, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4f, 0x6e, 0x50, + 0x61, 0x6e, 0x69, 0x63, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, + 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x62, 0x0a, 0x20, 0x61, 0x6c, + 0x77, 0x61, 0x79, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x1c, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x4c, 0x6f, 0x67, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x49, + 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3a, 0x0a, 0x03, 0x74, 0x63, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x63, 0x70, + 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x3d, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x04, + 0x68, 0x74, 0x74, 0x70, 0x12, 0x45, 0x0a, 0x10, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x75, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x03, 0x54, + 0x63, 0x70, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x73, + 0x65, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x1a, 0xc5, 0x03, 0x0a, 0x04, 0x48, + 0x74, 0x74, 0x70, 0x12, 0x18, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x70, 0x0a, + 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, + 0x55, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x10, + 0xd8, 0x04, 0x28, 0x64, 0x52, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x1a, 0x3b, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x1a, 0x9c, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x55, 0x0a, 0x11, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 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, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x10, 0xd8, 0x04, 0x28, 0x64, - 0x52, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x65, 0x73, 0x1a, 0x35, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x01, 0x0a, 0x11, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x4d, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x32, + 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x61, 0x70, 0x70, 0x65, diff --git a/api/mesh/v1alpha1/health_check.proto b/api/mesh/v1alpha1/health_check.proto index 40ac9d19c139..91879f73da48 100644 --- a/api/mesh/v1alpha1/health_check.proto +++ b/api/mesh/v1alpha1/health_check.proto @@ -28,32 +28,41 @@ message HealthCheck { // List of selectors to match dataplanes that should be configured to do // health checks. - repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ]; + repeated Selector sources = 1 + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; // List of selectors to match services that need to be health checked. repeated Selector destinations = 2 - [ (validate.rules).repeated .min_items = 1 ]; + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; // Conf defines configuration for various types of health checking. message Conf { // Interval between consecutive health checks. - google.protobuf.Duration interval = 1 [ (validate.rules).duration = { - required : true, - gt {} - } ]; + google.protobuf.Duration interval = 1 [ + (validate.rules).duration = { + required : true, + gt {} + }, + (doc.required) = true + ]; // Maximum time to wait for a health check response. - google.protobuf.Duration timeout = 2 [ (validate.rules).duration = { - required : true, - gt {} - } ]; + google.protobuf.Duration timeout = 2 [ + (validate.rules).duration = { + required : true, + gt {} + }, + (doc.required) = true + ]; // Number of consecutive unhealthy checks before considering a host // unhealthy. - uint32 unhealthy_threshold = 3 [ (validate.rules).uint32 = {gt : 0} ]; + uint32 unhealthy_threshold = 3 + [ (validate.rules).uint32 = {gt : 0}, (doc.required) = true ]; // Number of consecutive healthy checks before considering a host healthy. - uint32 healthy_threshold = 4 [ (validate.rules).uint32 = {gt : 0} ]; + uint32 healthy_threshold = 4 + [ (validate.rules).uint32 = {gt : 0}, (doc.required) = true ]; // If specified, Envoy will start health checking after for a random time in // ms between 0 and initial_jitter. This only applies to the first health @@ -119,12 +128,12 @@ message HealthCheck { // The HTTP path which will be requested during the health check // (ie. /health) // +required - string path = 1; // + string path = 1 [ (doc.required) = true ]; message HeaderValue { // Header name // +required - string key = 1; + string key = 1 [ (doc.required) = true ]; // Header value // +optional string value = 2; @@ -133,7 +142,7 @@ message HealthCheck { message HeaderValueOption { // Key/Value representation of the HTTP header // +required - HeaderValue header = 1; + HeaderValue header = 1 [ (doc.required) = true ]; // The bool value which if true (default) will mean the header values // should be appended to already present ones // +optional @@ -159,5 +168,5 @@ message HealthCheck { } // Configuration for various types of health checking. - Conf conf = 3; + Conf conf = 3 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/proxy_template.pb.go b/api/mesh/v1alpha1/proxy_template.pb.go index e443e580b7f2..34cbb35bdc0f 100644 --- a/api/mesh/v1alpha1/proxy_template.pb.go +++ b/api/mesh/v1alpha1/proxy_template.pb.go @@ -29,7 +29,6 @@ type ProxyTemplate struct { unknownFields protoimpl.UnknownFields // List of Dataplane selectors. - // +optional Selectors []*Selector `protobuf:"bytes,1,rep,name=selectors,proto3" json:"selectors,omitempty"` // Configuration for ProxyTemplate Conf *ProxyTemplate_Conf `protobuf:"bytes,2,opt,name=conf,proto3" json:"conf,omitempty"` @@ -1217,180 +1216,186 @@ var file_mesh_v1alpha1_proxy_template_proto_rawDesc = []byte{ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x10, 0x0a, 0x0d, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x73, 0x65, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x10, 0x0a, 0x0d, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, + 0x01, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x04, + 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, + 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0xc3, + 0x01, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, 0x63, 0x6f, - 0x6e, 0x66, 0x1a, 0xc3, 0x01, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x69, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x55, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x6d, 0x6f, 0x64, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xf8, 0x0c, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6b, 0x75, - 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, - 0x56, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x55, 0x0a, + 0x0d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xae, 0x0d, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x08, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6b, 0x75, 0x6d, + 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, 0x68, 0x74, + 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, - 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5c, - 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x0b, - 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3b, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x0b, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x1a, 0xc7, 0x01, - 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x05, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x74, + 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x0b, 0x76, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x76, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x1a, 0xd3, 0x01, 0x0a, 0x07, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, 0x0a, 0x09, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, + 0xb5, 0x18, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x39, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, + 0xd5, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x05, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6b, 0x75, + 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x22, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x39, 0x0a, 0x05, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x83, 0x02, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x05, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, - 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x1a, 0x33, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0xc9, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x33, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x5d, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x1a, 0xf7, 0x01, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x57, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, - 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x73, + 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, + 0xb5, 0x18, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xf1, 0x01, + 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xf7, 0x01, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x57, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, - 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x1a, 0x87, 0x02, 0x0a, 0x0b, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, - 0x74, 0x12, 0x57, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x41, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x6b, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x57, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x3a, 0x5f, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x17, 0x0a, 0x15, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0f, 0x12, 0x0d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, - 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, - 0xa6, 0x01, 0x11, 0x3a, 0x0f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x4a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3e, 0x0a, 0x03, - 0x72, 0x61, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x75, 0x6d, 0x61, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x42, 0x06, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x1a, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 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, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x64, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x93, 0x02, 0x0a, 0x0b, 0x56, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, + 0x6f, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x22, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x71, 0x0a, 0x05, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x06, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x5f, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x17, 0x0a, 0x15, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0f, 0x12, 0x0d, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, + 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, + 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x3a, 0x0f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x64, 0x0a, 0x18, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x51, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, - 0x18, 0x23, 0x50, 0x01, 0xa2, 0x01, 0x0d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0xf2, 0x01, 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3e, + 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x75, + 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, + 0x77, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x1a, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x6d, 0x61, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x39, 0x0a, + 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 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, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x64, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x76, + 0x0a, 0x18, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x61, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x51, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x23, 0x50, 0x01, 0xa2, 0x01, 0x0d, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xf2, 0x01, 0x0e, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/api/mesh/v1alpha1/proxy_template.proto b/api/mesh/v1alpha1/proxy_template.proto index f8b7756daa7f..407b597aaf03 100644 --- a/api/mesh/v1alpha1/proxy_template.proto +++ b/api/mesh/v1alpha1/proxy_template.proto @@ -24,11 +24,10 @@ message ProxyTemplate { option (kuma.mesh.resource).ws.name = "proxytemplate"; // List of Dataplane selectors. - // +optional - repeated Selector selectors = 1; + repeated Selector selectors = 1 [ (doc.required) = true ]; // Configuration for ProxyTemplate - Conf conf = 2; + Conf conf = 2 [ (doc.required) = true ]; message Conf { // List of imported profiles. @@ -63,7 +62,7 @@ message ProxyTemplate { // Only clusters that match will be modified Match match = 1; // Operation to apply on a cluster (add, remove, patch) - string operation = 2; + string operation = 2 [ (doc.required) = true ]; // xDS cluster string value = 3; @@ -73,7 +72,7 @@ message ProxyTemplate { // transparent, ingress) string origin = 1; // Name of the cluster to match - string name = 2; + string name = 2 [ (doc.required) = true ]; } } @@ -82,7 +81,7 @@ message ProxyTemplate { // Only listeners that match will be modified Match match = 1; // Operation to apply on a listener (add, remove, patch) - string operation = 2; + string operation = 2 [ (doc.required) = true ]; // xDS listener string value = 3; @@ -92,7 +91,7 @@ message ProxyTemplate { // transparent, ingress) string origin = 1; // Name of the listener to match - string name = 2; + string name = 2 [ (doc.required) = true ]; } } @@ -102,7 +101,7 @@ message ProxyTemplate { Match match = 1; // Operation to apply on network filter (addFirst, addLast, addBefore, // addAfter, remove, patch) - string operation = 2; + string operation = 2 [ (doc.required) = true ]; // xDS network filter string value = 3; @@ -112,7 +111,7 @@ message ProxyTemplate { // transparent, ingress) string origin = 1; // Name of the network filter - string name = 2; + string name = 2 [ (doc.required) = true ]; // Name of the listener that network filter modifications will be // applied to string listenerName = 3; @@ -125,7 +124,7 @@ message ProxyTemplate { Match match = 1; // Operation to apply on network filter (addFirst, addLast, addBefore, // addAfter, remove, patch) - string operation = 2; + string operation = 2 [ (doc.required) = true ]; // xDS HTTP filter string value = 3; @@ -147,7 +146,7 @@ message ProxyTemplate { // Only virtual hosts that match will be modified Match match = 1; // Operation to apply on a virtual hosts (add, remove, patch) - string operation = 2; + string operation = 2 [ (doc.required) = true ]; // xDS virtual host string value = 3; @@ -157,7 +156,7 @@ message ProxyTemplate { // transparent, ingress) string origin = 1; // Name of the virtual host to match - string name = 2; + string name = 2 [ (doc.required) = true ]; // Name of the route configuration string routeConfigurationName = 3; } @@ -204,12 +203,12 @@ message ProxyTemplateRawResource { // The resource's name, to distinguish it from others of the same type of // resource. - string name = 1; + string name = 1 [ (doc.required) = true ]; // The resource level version. It allows xDS to track the state of individual // resources. - string version = 2; + string version = 2 [ (doc.required) = true ]; // xDS resource. - string resource = 3; + string resource = 3 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/rate_limit.pb.go b/api/mesh/v1alpha1/rate_limit.pb.go index fe5bc48d6dac..153ef7e1bb33 100644 --- a/api/mesh/v1alpha1/rate_limit.pb.go +++ b/api/mesh/v1alpha1/rate_limit.pb.go @@ -9,6 +9,7 @@ package v1alpha1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/kumahq/kuma/api/mesh" + _ "github.com/kumahq/protoc-gen-kumadoc/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" @@ -351,62 +352,66 @@ var file_mesh_v1alpha1_rate_limit_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xac, 0x06, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x40, 0x0a, - 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x4a, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x0a, 0x04, 0x63, - 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6b, 0x75, 0x6d, 0x61, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, 0x63, - 0x6f, 0x6e, 0x66, 0x1a, 0x82, 0x04, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x3b, 0x0a, 0x04, - 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6b, 0x75, 0x6d, - 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0xbc, 0x03, 0x0a, 0x04, 0x48, 0x74, - 0x74, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x35, - 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x55, 0x0a, 0x0b, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6b, 0x75, 0x6d, - 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x2e, 0x4f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, - 0x0b, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x89, 0x02, 0x0a, - 0x0b, 0x4f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x59, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4f, 0x6e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x69, 0x0a, - 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x3a, 0x54, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, - 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0b, 0x12, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, - 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0e, - 0x3a, 0x0c, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x2a, - 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, - 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x06, + 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x44, 0x0a, 0x07, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, + 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0c, 0xfa, 0x42, 0x05, 0x92, + 0x01, 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0c, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x88, + 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, + 0x8e, 0x04, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x3b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, + 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0xc8, 0x03, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x20, + 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x12, 0x3b, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x88, + 0xb5, 0x18, 0x01, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x55, 0x0a, + 0x0b, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4f, 0x6e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0b, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x89, 0x02, 0x0a, 0x0b, 0x4f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 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, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, + 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x69, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x06, + 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, + 0x3a, 0x54, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, + 0x0b, 0x12, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0xaa, 0x8c, 0x89, 0xa6, + 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, + 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x3a, 0x0c, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x65, + 0x2d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x49, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x1b, 0x50, 0x01, 0xa2, 0x01, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0xf2, 0x01, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/rate_limit.proto b/api/mesh/v1alpha1/rate_limit.proto index 12eabf36af75..c4570eebc914 100644 --- a/api/mesh/v1alpha1/rate_limit.proto +++ b/api/mesh/v1alpha1/rate_limit.proto @@ -10,6 +10,13 @@ import "mesh/v1alpha1/selector.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; import "validate/validate.proto"; +import "config.proto"; + +option (doc.config) = { + type : Policy, + name : "RateLimit", + file_name : "rate-limit" +}; message RateLimit { @@ -20,21 +27,22 @@ message RateLimit { option (kuma.mesh.resource).ws.name = "rate-limit"; // List of selectors to match dataplanes that rate limit will be applied for - repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ]; + repeated Selector sources = 1 + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; // List of selectors to match services that need to be rate limited. repeated Selector destinations = 2 - [ (validate.rules).repeated .min_items = 1 ]; + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; message Conf { message Http { // The number of HTTP requests this RateLimiter allows // +required - uint32 requests = 1; + uint32 requests = 1 [ (doc.required) = true ]; // The the interval for which `requests` will be accounted. // +required - google.protobuf.Duration interval = 2; + google.protobuf.Duration interval = 2 [ (doc.required) = true ]; message OnRateLimit { // The HTTP status code to be set on a RateLimit event @@ -71,5 +79,5 @@ message RateLimit { // Configuration for RateLimit // +required - Conf conf = 3; + Conf conf = 3 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/retry.pb.go b/api/mesh/v1alpha1/retry.pb.go index 32bff87a3049..8134994234d8 100644 --- a/api/mesh/v1alpha1/retry.pb.go +++ b/api/mesh/v1alpha1/retry.pb.go @@ -480,93 +480,95 @@ var file_mesh_v1alpha1_retry_proto_rawDesc = []byte{ 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x0a, 0x0a, 0x05, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x0a, 0x0a, 0x05, 0x52, 0x65, 0x74, + 0x72, 0x79, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, - 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x72, 0x42, 0x0c, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, - 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0xf3, 0x07, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x37, 0x0a, - 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x75, - 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x34, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x63, 0x70, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x37, 0x0a, 0x04, - 0x67, 0x72, 0x70, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x75, 0x6d, - 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x52, - 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x87, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, - 0x66, 0x12, 0x3e, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x3c, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x1a, - 0x81, 0x02, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, - 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6e, 0x75, 0x6d, - 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x5f, 0x74, - 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x65, 0x72, - 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x62, 0x61, - 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, - 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x42, 0x61, 0x63, - 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x34, 0x0a, - 0x16, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x14, 0x72, - 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, - 0x64, 0x65, 0x73, 0x1a, 0x37, 0x0a, 0x03, 0x54, 0x63, 0x70, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x61, - 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x1a, 0xfb, 0x02, 0x0a, - 0x04, 0x47, 0x72, 0x70, 0x63, 0x12, 0x46, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x4f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, 0x3d, 0x0a, - 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0f, - 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x41, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0c, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, + 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x63, 0x6f, + 0x6e, 0x66, 0x1a, 0xf9, 0x07, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x37, 0x0a, 0x04, 0x68, + 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x75, 0x6d, 0x61, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x04, + 0x68, 0x74, 0x74, 0x70, 0x12, 0x34, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x4f, - 0x66, 0x66, 0x22, 0x66, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, 0x0d, 0x0a, - 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, - 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, - 0x64, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, - 0x02, 0x12, 0x16, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x78, - 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x61, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x04, 0x3a, 0x58, 0xaa, 0x8c, 0x89, 0xa6, - 0x01, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x07, 0x12, 0x05, 0x52, 0x65, 0x74, 0x72, 0x79, 0xaa, 0x8c, - 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, - 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x09, 0x3a, 0x07, 0x0a, 0x05, 0x72, 0x65, - 0x74, 0x72, 0x79, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0b, 0x3a, 0x09, 0x12, 0x07, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x42, 0x40, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x8a, 0xb5, 0x18, 0x12, 0x50, 0x01, 0xa2, 0x01, 0x05, 0x52, 0x65, 0x74, 0x72, 0x79, 0xf2, 0x01, - 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x2e, 0x54, 0x63, 0x70, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x37, 0x0a, 0x04, 0x67, 0x72, + 0x70, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, + 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x52, 0x04, 0x67, + 0x72, 0x70, 0x63, 0x1a, 0x8d, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, + 0x44, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x1a, 0x81, 0x02, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x3d, 0x0a, 0x0b, + 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x70, + 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x41, + 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x4f, 0x66, + 0x66, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x37, 0x0a, 0x03, 0x54, 0x63, 0x70, 0x12, 0x30, + 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x6d, 0x61, + 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, + 0x1a, 0xfb, 0x02, 0x0a, 0x04, 0x47, 0x72, 0x70, 0x63, 0x12, 0x46, 0x0a, 0x08, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6b, 0x75, + 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, + 0x6e, 0x12, 0x3d, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 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, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x41, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x07, 0x62, + 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x22, 0x66, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4f, + 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x15, 0x0a, 0x11, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x65, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x04, 0x3a, 0x58, + 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x07, 0x12, 0x05, 0x52, 0x65, 0x74, + 0x72, 0x79, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, + 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x09, 0x3a, 0x07, + 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0b, 0x3a, 0x09, 0x12, + 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x40, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, + 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x12, 0x50, 0x01, 0xa2, 0x01, 0x05, 0x52, 0x65, 0x74, + 0x72, 0x79, 0xf2, 0x01, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/retry.proto b/api/mesh/v1alpha1/retry.proto index 624fa070cc46..b8c6531dad2b 100644 --- a/api/mesh/v1alpha1/retry.proto +++ b/api/mesh/v1alpha1/retry.proto @@ -29,16 +29,17 @@ message Retry { // List of selectors to match dataplanes that retry policy should be // configured for - repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ]; + repeated Selector sources = 1 + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; // List of selectors to match services that need to be health checked. repeated Selector destinations = 2 - [ (validate.rules).repeated .min_items = 1 ]; + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; message Conf { message BackOff { // +required - google.protobuf.Duration base_interval = 1; + google.protobuf.Duration base_interval = 1 [ (doc.required) = true ]; // +optional google.protobuf.Duration max_interval = 2; } @@ -90,5 +91,5 @@ message Retry { } // +required - Conf conf = 3; + Conf conf = 3 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/timeout.pb.go b/api/mesh/v1alpha1/timeout.pb.go index 836e251add77..c44ded396fb1 100644 --- a/api/mesh/v1alpha1/timeout.pb.go +++ b/api/mesh/v1alpha1/timeout.pb.go @@ -343,67 +343,68 @@ var file_mesh_v1alpha1_timeout_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xf2, 0x06, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, + 0x6f, 0x22, 0x8a, 0x07, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, - 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0xe7, 0x04, - 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x03, 0x74, 0x63, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x63, 0x70, 0x52, 0x03, 0x74, - 0x63, 0x70, 0x12, 0x39, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x39, 0x0a, - 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x75, - 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x43, 0x0a, 0x03, 0x54, 0x63, 0x70, 0x12, - 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x88, 0x01, - 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, - 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x9c, 0x01, 0x0a, 0x04, 0x47, 0x72, 0x70, - 0x63, 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x49, 0x0a, 0x13, - 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x4d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x0a, - 0x0f, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x09, 0x12, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0xaa, - 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, - 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0b, 0x3a, 0x09, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x44, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x16, 0x50, 0x01, 0xa2, 0x01, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0xf2, 0x01, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, + 0x18, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, + 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, + 0xed, 0x04, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x03, + 0x74, 0x63, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x75, 0x6d, 0x61, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x54, 0x63, 0x70, 0x52, + 0x03, 0x74, 0x63, 0x70, 0x12, 0x39, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, + 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, + 0x39, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, + 0x47, 0x72, 0x70, 0x63, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x49, 0x0a, 0x03, 0x54, 0x63, + 0x70, 0x12, 0x42, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x88, 0x01, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x42, + 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x1a, 0x9c, 0x01, 0x0a, 0x04, 0x47, 0x72, 0x70, 0x63, 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, + 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, + 0x4d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x0a, 0x0f, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x09, 0x12, 0x07, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, + 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, + 0xa6, 0x01, 0x0b, 0x3a, 0x09, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x44, + 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, + 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, + 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x16, 0x50, 0x01, + 0xa2, 0x01, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0xf2, 0x01, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/timeout.proto b/api/mesh/v1alpha1/timeout.proto index 06be77b43fc7..ddba090a6a88 100644 --- a/api/mesh/v1alpha1/timeout.proto +++ b/api/mesh/v1alpha1/timeout.proto @@ -24,10 +24,10 @@ message Timeout { option (kuma.mesh.resource).ws.name = "timeout"; // List of selectors to match dataplanes that are sources of traffic. - repeated Selector sources = 1; + repeated Selector sources = 1 [ (doc.required) = true ]; // List of selectors to match services that are destinations of traffic. - repeated Selector destinations = 2; + repeated Selector destinations = 2 [ (doc.required) = true ]; message Conf { // ConnectTimeout defines time to establish connection @@ -37,7 +37,7 @@ message Timeout { message Tcp { // IdleTimeout is defined as the period in which there are no bytes sent // or received on either the upstream or downstream connection - google.protobuf.Duration idle_timeout = 1; + google.protobuf.Duration idle_timeout = 1 [ (doc.required) = true ]; } Tcp tcp = 2; @@ -64,5 +64,5 @@ message Timeout { } Grpc grpc = 4; } - Conf conf = 3; + Conf conf = 3 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/traffic_log.pb.go b/api/mesh/v1alpha1/traffic_log.pb.go index 66f0a8a938f0..f08219756dce 100644 --- a/api/mesh/v1alpha1/traffic_log.pb.go +++ b/api/mesh/v1alpha1/traffic_log.pb.go @@ -148,32 +148,33 @@ var file_mesh_v1alpha1_traffic_log_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x02, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, - 0x63, 0x4c, 0x6f, 0x67, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x02, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x4c, 0x6f, 0x67, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0c, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, - 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, - 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x6f, 0x67, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x20, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, - 0x18, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3a, 0x57, 0xaa, 0x8c, 0x89, 0xa6, 0x01, - 0x14, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0c, 0x12, 0x0a, 0x54, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x4c, 0x6f, 0x67, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, - 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, - 0xa6, 0x01, 0x0f, 0x3a, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x6c, - 0x6f, 0x67, 0x42, 0x4b, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, - 0x18, 0x1d, 0x50, 0x01, 0xa2, 0x01, 0x0a, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x6f, - 0x67, 0xf2, 0x01, 0x0b, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x6c, 0x6f, 0x67, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, + 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x6f, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, 0x63, + 0x6f, 0x6e, 0x66, 0x1a, 0x20, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3a, 0x57, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x14, 0x0a, 0x12, 0x54, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0c, 0x12, 0x0a, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x4c, 0x6f, 0x67, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, + 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0f, 0x3a, + 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x6c, 0x6f, 0x67, 0x42, 0x4b, + 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, + 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, + 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x1d, 0x50, 0x01, + 0xa2, 0x01, 0x0a, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x6f, 0x67, 0xf2, 0x01, 0x0b, + 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x6c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/traffic_log.proto b/api/mesh/v1alpha1/traffic_log.proto index d186de16ea57..1c059baad582 100644 --- a/api/mesh/v1alpha1/traffic_log.proto +++ b/api/mesh/v1alpha1/traffic_log.proto @@ -24,10 +24,10 @@ message TrafficLog { option (kuma.mesh.resource).ws.name = "traffic-log"; // List of selectors to match dataplanes that are sources of traffic. - repeated Selector sources = 1; + repeated Selector sources = 1 [ (doc.required) = true ]; // List of selectors to match services that are destinations of traffic. - repeated Selector destinations = 2; + repeated Selector destinations = 2 [ (doc.required) = true ]; // Configuration defines settings of the logging. message Conf { diff --git a/api/mesh/v1alpha1/traffic_permission.pb.go b/api/mesh/v1alpha1/traffic_permission.pb.go index 3a42a7f4a490..aee0ae9acae1 100644 --- a/api/mesh/v1alpha1/traffic_permission.pb.go +++ b/api/mesh/v1alpha1/traffic_permission.pb.go @@ -90,29 +90,30 @@ var file_mesh_v1alpha1_traffic_permission_proto_rawDesc = []byte{ 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x01, 0x0a, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0c, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x6c, 0xaa, 0x8c, - 0x89, 0xa6, 0x01, 0x1b, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, - 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x12, 0x11, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, - 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, - 0x89, 0xa6, 0x01, 0x16, 0x3a, 0x14, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x5b, 0x5a, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, - 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x2d, 0x50, 0x01, 0xa2, 0x01, 0x12, 0x54, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0xf2, 0x01, 0x13, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x12, 0x46, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x6c, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x1b, + 0x0a, 0x19, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, + 0x13, 0x12, 0x11, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, + 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x16, + 0x3a, 0x14, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x5b, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x2d, 0x50, 0x01, 0xa2, 0x01, 0x12, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0xf2, 0x01, 0x13, + 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/traffic_permission.proto b/api/mesh/v1alpha1/traffic_permission.proto index 7bfdb81a8ceb..8eaa1c7c4e03 100644 --- a/api/mesh/v1alpha1/traffic_permission.proto +++ b/api/mesh/v1alpha1/traffic_permission.proto @@ -24,7 +24,7 @@ message TrafficPermission { option (kuma.mesh.resource).ws.name = "traffic-permission"; // List of selectors to match dataplanes that are sources of traffic. - repeated Selector sources = 1; + repeated Selector sources = 1 [ (doc.required) = true ]; // List of selectors to match services that are destinations of traffic. - repeated Selector destinations = 2; + repeated Selector destinations = 2 [ (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/traffic_route.pb.go b/api/mesh/v1alpha1/traffic_route.pb.go index 5d45a150e0ca..9e34549dbf96 100644 --- a/api/mesh/v1alpha1/traffic_route.pb.go +++ b/api/mesh/v1alpha1/traffic_route.pb.go @@ -1343,226 +1343,229 @@ var file_mesh_v1alpha1_traffic_route_proto_rawDesc = []byte{ 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xdd, 0x1a, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x22, 0x91, 0x1b, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x43, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x42, 0x0c, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x07, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0xee, 0x01, 0x0a, 0x05, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x12, 0x34, - 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x6f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6b, 0x75, 0x6d, 0x61, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x53, 0x70, 0x6c, 0x69, - 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x9a, 0x01, 0x0e, 0x08, 0x01, 0x22, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x2a, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x9e, 0x05, 0x0a, 0x0c, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0c, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x42, 0x0c, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, + 0x1a, 0xf8, 0x01, 0x0a, 0x05, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 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, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x73, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x6f, - 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, - 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, - 0x62, 0x69, 0x6e, 0x12, 0x61, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x6d, - 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, - 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x09, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6b, 0x75, 0x6d, 0x61, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, - 0x68, 0x48, 0x00, 0x52, 0x08, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x12, 0x4e, 0x0a, - 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, - 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x2e, 0x52, 0x61, 0x6e, - 0x64, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x4e, 0x0a, - 0x06, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, - 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x67, - 0x6c, 0x65, 0x76, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x1a, 0x0c, 0x0a, - 0x0a, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x1a, 0x31, 0x0a, 0x0c, 0x4c, - 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x77, - 0x0a, 0x08, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, - 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x22, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x52, 0x69, 0x6e, 0x67, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x52, - 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x08, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x64, 0x6f, - 0x6d, 0x1a, 0x08, 0x0a, 0x06, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x42, 0x09, 0x0a, 0x07, 0x6c, - 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xf7, 0x02, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, - 0x46, 0x0a, 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x12, 0x52, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x0c, 0x6c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x36, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x53, 0x70, + 0x6c, 0x69, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x18, 0xfa, 0x42, 0x11, 0x9a, 0x01, 0x0e, 0x08, 0x01, 0x22, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x2a, 0x04, 0x72, 0x02, 0x10, 0x01, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3e, 0x0a, 0x10, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x9e, 0x05, 0x0a, 0x0c, + 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x0b, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, + 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x12, 0x61, 0x0a, 0x0d, 0x6c, 0x65, 0x61, + 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x2e, + 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, + 0x6c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x09, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x2e, 0x52, + 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x08, 0x72, 0x69, 0x6e, 0x67, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x4e, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, - 0x1a, 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x8e, 0x0e, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x41, 0x0a, 0x05, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x06, - 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, - 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x52, 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, - 0x12, 0x58, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xde, 0x03, 0x0a, 0x05, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x51, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x72, 0x61, 0x6e, + 0x64, 0x6f, 0x6d, 0x12, 0x4e, 0x0a, 0x06, 0x6d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x67, 0x6c, 0x65, 0x76, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x67, + 0x6c, 0x65, 0x76, 0x1a, 0x0c, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, + 0x6e, 0x1a, 0x31, 0x0a, 0x0c, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x77, 0x0a, 0x08, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, + 0x6e, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61, 0x78, + 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x08, 0x0a, + 0x06, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1a, 0x08, 0x0a, 0x06, 0x4d, 0x61, 0x67, 0x6c, 0x65, + 0x76, 0x42, 0x09, 0x0a, 0x07, 0x6c, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xf7, 0x02, 0x0a, + 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x46, 0x0a, 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, - 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x4d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x52, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x68, 0x0a, 0x0d, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, - 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x42, 0x0d, 0x0a, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x1a, 0x75, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 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, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xc3, 0x07, 0x0a, 0x06, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x12, 0x45, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x12, 0x52, 0x0a, + 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, - 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x45, 0x0a, - 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6b, 0x75, + 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x72, 0x52, 0x0c, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x72, 0x12, 0x58, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x04, 0x68, + 0x74, 0x74, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x75, 0x6d, 0x61, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xac, 0x0e, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, + 0x41, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x44, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x70, 0x6c, 0x69, + 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x52, + 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x12, 0x58, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6b, - 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6b, 0x75, + 0x74, 0x70, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0xde, 0x03, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x51, 0x0a, 0x06, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, + 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x4d, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x1a, 0x4c, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x22, 0x0a, 0x0c, - 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x89, 0x01, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0d, 0x72, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x51, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x74, 0x70, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x52, 0x0a, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x1a, 0x68, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x05, 0x65, + 0x78, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, + 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x42, 0x0d, 0x0a, 0x0b, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x75, 0x0a, 0x0c, 0x48, 0x65, + 0x61, 0x64, 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, 0x4f, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, + 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0xe1, 0x07, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x12, 0x45, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6b, 0x75, 0x6d, + 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x45, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, + 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x0e, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x58, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x28, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, + 0x88, 0xb5, 0x18, 0x01, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x89, 0x01, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0d, 0x72, + 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x51, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x7f, + 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x57, + 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x7f, 0x0a, 0x04, - 0x48, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x57, 0x0a, 0x08, - 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, - 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x08, 0x66, 0x72, 0x6f, - 0x6d, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x91, 0x02, - 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x03, 0x61, 0x64, 0x64, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x52, 0x03, 0x61, 0x64, 0x64, 0x12, 0x53, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, 0x6f, 0x64, - 0x69, 0x66, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x1a, 0x47, 0x0a, 0x03, 0x41, 0x64, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x70, 0x70, - 0x65, 0x6e, 0x64, 0x1a, 0x1c, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x1a, 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x3a, 0x5d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x16, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, - 0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x12, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, - 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x3a, - 0x0f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x42, 0x4f, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, - 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x21, - 0x50, 0x01, 0xa2, 0x01, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0xf2, 0x01, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x08, 0x66, + 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, + 0xa3, 0x02, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x03, 0x61, + 0x64, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, + 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x52, 0x03, 0x61, 0x64, 0x64, 0x12, 0x53, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x1a, 0x53, 0x0a, 0x03, + 0x41, 0x64, 0x64, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, + 0x18, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70, 0x70, + 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, + 0x64, 0x1a, 0x22, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x5d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x16, 0x0a, 0x14, 0x54, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x12, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, + 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, + 0xa6, 0x01, 0x11, 0x3a, 0x0f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x42, 0x4f, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x8a, 0xb5, 0x18, 0x21, 0x50, 0x01, 0xa2, 0x01, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0xf2, 0x01, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/traffic_route.proto b/api/mesh/v1alpha1/traffic_route.proto index 7fad10a788f0..d2ea58bc8f5e 100644 --- a/api/mesh/v1alpha1/traffic_route.proto +++ b/api/mesh/v1alpha1/traffic_route.proto @@ -26,7 +26,8 @@ message TrafficRoute { option (kuma.mesh.resource).ws.name = "traffic-route"; // List of selectors to match data plane proxies that are sources of traffic. - repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ]; + repeated Selector sources = 1 + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; // List of selectors to match services that are destinations of traffic. // @@ -35,7 +36,7 @@ message TrafficRoute { // the destination is a service that could be either within or outside // of a mesh. repeated Selector destinations = 2 - [ (validate.rules).repeated .min_items = 1 ]; + [ (validate.rules).repeated .min_items = 1, (doc.required) = true ]; // Split defines a destination with a weight assigned to it. message Split { @@ -44,18 +45,21 @@ message TrafficRoute { // Weights are not percentages. For example two destinations with // weights the same weight "1" will receive both same amount of the traffic. // 0 means that the destination will be ignored. - google.protobuf.UInt32Value weight = 1; + google.protobuf.UInt32Value weight = 1 [ (doc.required) = true ]; // Selector to match individual endpoints that comprise that destination. // // Notice that an endpoint can be either inside or outside the mesh. // In the former case an endpoint corresponds to a data plane proxy, // in the latter case an endpoint is an External Service. - map destination = 2 [ (validate.rules).map = { - min_pairs : 1, - keys : {string : {min_len : 1}}, - values : {string : {min_len : 1}} - } ]; + map destination = 2 [ + (validate.rules).map = { + min_pairs : 1, + keys : {string : {min_len : 1}}, + values : {string : {min_len : 1}} + }, + (doc.required) = true + ]; }; // LoadBalancer defines the load balancing policy and configuration. @@ -152,10 +156,10 @@ message TrafficRoute { message RegexReplace { // Pattern of the regex using RE2 syntax. // https://github.com/google/re2/wiki/Syntax - string pattern = 1; + string pattern = 1 [ (doc.required) = true ]; // Substitution using regex groups. E.g. use \\1 as a first matched // group. - string substitution = 2; + string substitution = 2 [ (doc.required) = true ]; } // Path defines modification of path of the HTTP request. @@ -183,9 +187,9 @@ message TrafficRoute { // Add defines operation of adding new HTTP header. message Add { // Name of the header. - string name = 1; + string name = 1 [ (doc.required) = true ]; // Value of the header. - string value = 2; + string value = 2 [ (doc.required) = true ]; // If true, it appends the value if there is already a value. // Otherwise, value of existing header will be replaced. bool append = 3; @@ -193,7 +197,7 @@ message TrafficRoute { // Remove defines operation of removing an HTTP header. message Remove { // Name of the header to remove. - string name = 1; + string name = 1 [ (doc.required) = true ]; } // List of add header operations. repeated Add add = 1; @@ -225,5 +229,6 @@ message TrafficRoute { } // Configuration for the route. - Conf conf = 3 [ (validate.rules).message.required = true ]; + Conf conf = 3 + [ (validate.rules).message.required = true, (doc.required) = true ]; } diff --git a/api/mesh/v1alpha1/traffic_trace.pb.go b/api/mesh/v1alpha1/traffic_trace.pb.go index bc6089783e03..5ed3bde79f58 100644 --- a/api/mesh/v1alpha1/traffic_trace.pb.go +++ b/api/mesh/v1alpha1/traffic_trace.pb.go @@ -139,29 +139,29 @@ var file_mesh_v1alpha1_traffic_trace_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x02, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x02, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, - 0x20, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x3a, 0x5d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x16, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, - 0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x12, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x72, - 0x61, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, - 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x3a, - 0x0f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x42, 0x4f, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, - 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x21, - 0x50, 0x01, 0xa2, 0x01, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, - 0x65, 0xf2, 0x01, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x2d, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x04, 0x88, 0xb5, 0x18, 0x01, 0x52, + 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x04, 0x63, 0x6f, + 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x52, + 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x20, 0x0a, 0x04, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x3a, 0x5d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x16, 0x0a, + 0x14, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x12, 0x0c, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, + 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, + 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x3a, 0x0f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x2d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x42, 0x4f, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x6d, 0x61, 0x68, 0x71, 0x2f, 0x6b, 0x75, 0x6d, 0x61, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x8a, 0xb5, 0x18, 0x21, 0x50, 0x01, 0xa2, 0x01, 0x0c, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x54, 0x72, 0x61, 0x63, 0x65, 0xf2, 0x01, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x2d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/traffic_trace.proto b/api/mesh/v1alpha1/traffic_trace.proto index 5d58ec7ea4ef..1600d7f6a4c5 100644 --- a/api/mesh/v1alpha1/traffic_trace.proto +++ b/api/mesh/v1alpha1/traffic_trace.proto @@ -24,7 +24,7 @@ message TrafficTrace { option (kuma.mesh.resource).ws.name = "traffic-trace"; // List of selectors to match dataplanes. - repeated Selector selectors = 1; + repeated Selector selectors = 1 [ (doc.required) = true ]; // Configuration defines settings of the tracing. message Conf { diff --git a/api/observability/v1alpha1/mads.pb.go b/api/observability/v1alpha1/mads.pb.go deleted file mode 100644 index ac04f02aa533..000000000000 --- a/api/observability/v1alpha1/mads.pb.go +++ /dev/null @@ -1,536 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.14.0 -// source: observability/v1alpha1/mads.proto - -package v1alpha1 - -import ( - context "context" - v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MADS resource type. -// -// Describes a group of targets that need to be monitored. -type MonitoringAssignment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // MADS resource name. - // - // E.g., `/meshes/default/services/backend` or - // `/meshes/default/dataplanes/backend-01`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // List of targets that need to be monitored. - Targets []*MonitoringAssignment_Target `protobuf:"bytes,2,rep,name=targets,proto3" json:"targets,omitempty"` - // Labels associated with every target in that assignment. - // - // E.g., `["job" : "backend"]`. - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *MonitoringAssignment) Reset() { - *x = MonitoringAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_observability_v1alpha1_mads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MonitoringAssignment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MonitoringAssignment) ProtoMessage() {} - -func (x *MonitoringAssignment) ProtoReflect() protoreflect.Message { - mi := &file_observability_v1alpha1_mads_proto_msgTypes[0] - 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 MonitoringAssignment.ProtoReflect.Descriptor instead. -func (*MonitoringAssignment) Descriptor() ([]byte, []int) { - return file_observability_v1alpha1_mads_proto_rawDescGZIP(), []int{0} -} - -func (x *MonitoringAssignment) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MonitoringAssignment) GetTargets() []*MonitoringAssignment_Target { - if x != nil { - return x.Targets - } - return nil -} - -func (x *MonitoringAssignment) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -// Describes a single target that needs to be monitored. -type MonitoringAssignment_Target struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Labels associated with that particular target. - // - // E.g., - // `[ - // "__address__" : "192.168.0.1:8080", - // "__metrics_path__" : "/metrics"]`, - // "instance" : "backend-01", - // ]`. - Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *MonitoringAssignment_Target) Reset() { - *x = MonitoringAssignment_Target{} - if protoimpl.UnsafeEnabled { - mi := &file_observability_v1alpha1_mads_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MonitoringAssignment_Target) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MonitoringAssignment_Target) ProtoMessage() {} - -func (x *MonitoringAssignment_Target) ProtoReflect() protoreflect.Message { - mi := &file_observability_v1alpha1_mads_proto_msgTypes[1] - 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 MonitoringAssignment_Target.ProtoReflect.Descriptor instead. -func (*MonitoringAssignment_Target) Descriptor() ([]byte, []int) { - return file_observability_v1alpha1_mads_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *MonitoringAssignment_Target) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -var File_observability_v1alpha1_mads_proto protoreflect.FileDescriptor - -var file_observability_v1alpha1_mads_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x61, 0x64, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x03, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x07, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, - 0x75, 0x6d, 0x61, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, - 0x55, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3d, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0xa1, 0x01, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x12, 0x5c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x44, 0x2e, 0x6b, 0x75, 0x6d, 0x61, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, - 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x86, 0x03, 0x0a, 0x24, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, - 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, - 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x64, 0x0a, - 0x1b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x88, 0x01, 0x0a, 0x1a, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x18, 0x2f, 0x76, 0x32, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0x1d, - 0x5a, 0x1b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2f, - 0x6d, 0x61, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_observability_v1alpha1_mads_proto_rawDescOnce sync.Once - file_observability_v1alpha1_mads_proto_rawDescData = file_observability_v1alpha1_mads_proto_rawDesc -) - -func file_observability_v1alpha1_mads_proto_rawDescGZIP() []byte { - file_observability_v1alpha1_mads_proto_rawDescOnce.Do(func() { - file_observability_v1alpha1_mads_proto_rawDescData = protoimpl.X.CompressGZIP(file_observability_v1alpha1_mads_proto_rawDescData) - }) - return file_observability_v1alpha1_mads_proto_rawDescData -} - -var file_observability_v1alpha1_mads_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_observability_v1alpha1_mads_proto_goTypes = []interface{}{ - (*MonitoringAssignment)(nil), // 0: kuma.observability.v1alpha1.MonitoringAssignment - (*MonitoringAssignment_Target)(nil), // 1: kuma.observability.v1alpha1.MonitoringAssignment.Target - nil, // 2: kuma.observability.v1alpha1.MonitoringAssignment.LabelsEntry - nil, // 3: kuma.observability.v1alpha1.MonitoringAssignment.Target.LabelsEntry - (*v2.DeltaDiscoveryRequest)(nil), // 4: envoy.api.v2.DeltaDiscoveryRequest - (*v2.DiscoveryRequest)(nil), // 5: envoy.api.v2.DiscoveryRequest - (*v2.DeltaDiscoveryResponse)(nil), // 6: envoy.api.v2.DeltaDiscoveryResponse - (*v2.DiscoveryResponse)(nil), // 7: envoy.api.v2.DiscoveryResponse -} -var file_observability_v1alpha1_mads_proto_depIdxs = []int32{ - 1, // 0: kuma.observability.v1alpha1.MonitoringAssignment.targets:type_name -> kuma.observability.v1alpha1.MonitoringAssignment.Target - 2, // 1: kuma.observability.v1alpha1.MonitoringAssignment.labels:type_name -> kuma.observability.v1alpha1.MonitoringAssignment.LabelsEntry - 3, // 2: kuma.observability.v1alpha1.MonitoringAssignment.Target.labels:type_name -> kuma.observability.v1alpha1.MonitoringAssignment.Target.LabelsEntry - 4, // 3: kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService.DeltaMonitoringAssignments:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 5, // 4: kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService.StreamMonitoringAssignments:input_type -> envoy.api.v2.DiscoveryRequest - 5, // 5: kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService.FetchMonitoringAssignments:input_type -> envoy.api.v2.DiscoveryRequest - 6, // 6: kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService.DeltaMonitoringAssignments:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 7, // 7: kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService.StreamMonitoringAssignments:output_type -> envoy.api.v2.DiscoveryResponse - 7, // 8: kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService.FetchMonitoringAssignments:output_type -> envoy.api.v2.DiscoveryResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_observability_v1alpha1_mads_proto_init() } -func file_observability_v1alpha1_mads_proto_init() { - if File_observability_v1alpha1_mads_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_observability_v1alpha1_mads_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MonitoringAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_observability_v1alpha1_mads_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MonitoringAssignment_Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_observability_v1alpha1_mads_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_observability_v1alpha1_mads_proto_goTypes, - DependencyIndexes: file_observability_v1alpha1_mads_proto_depIdxs, - MessageInfos: file_observability_v1alpha1_mads_proto_msgTypes, - }.Build() - File_observability_v1alpha1_mads_proto = out.File - file_observability_v1alpha1_mads_proto_rawDesc = nil - file_observability_v1alpha1_mads_proto_goTypes = nil - file_observability_v1alpha1_mads_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// MonitoringAssignmentDiscoveryServiceClient is the client API for MonitoringAssignmentDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MonitoringAssignmentDiscoveryServiceClient interface { - DeltaMonitoringAssignments(ctx context.Context, opts ...grpc.CallOption) (MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignmentsClient, error) - StreamMonitoringAssignments(ctx context.Context, opts ...grpc.CallOption) (MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsClient, error) - FetchMonitoringAssignments(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) -} - -type monitoringAssignmentDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewMonitoringAssignmentDiscoveryServiceClient(cc grpc.ClientConnInterface) MonitoringAssignmentDiscoveryServiceClient { - return &monitoringAssignmentDiscoveryServiceClient{cc} -} - -func (c *monitoringAssignmentDiscoveryServiceClient) DeltaMonitoringAssignments(ctx context.Context, opts ...grpc.CallOption) (MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignmentsClient, error) { - stream, err := c.cc.NewStream(ctx, &_MonitoringAssignmentDiscoveryService_serviceDesc.Streams[0], "/kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService/DeltaMonitoringAssignments", opts...) - if err != nil { - return nil, err - } - x := &monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsClient{stream} - return x, nil -} - -type MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignmentsClient interface { - Send(*v2.DeltaDiscoveryRequest) error - Recv() (*v2.DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsClient struct { - grpc.ClientStream -} - -func (x *monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsClient) Send(m *v2.DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsClient) Recv() (*v2.DeltaDiscoveryResponse, error) { - m := new(v2.DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *monitoringAssignmentDiscoveryServiceClient) StreamMonitoringAssignments(ctx context.Context, opts ...grpc.CallOption) (MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsClient, error) { - stream, err := c.cc.NewStream(ctx, &_MonitoringAssignmentDiscoveryService_serviceDesc.Streams[1], "/kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService/StreamMonitoringAssignments", opts...) - if err != nil { - return nil, err - } - x := &monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsClient{stream} - return x, nil -} - -type MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsClient interface { - Send(*v2.DiscoveryRequest) error - Recv() (*v2.DiscoveryResponse, error) - grpc.ClientStream -} - -type monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsClient struct { - grpc.ClientStream -} - -func (x *monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsClient) Send(m *v2.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsClient) Recv() (*v2.DiscoveryResponse, error) { - m := new(v2.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *monitoringAssignmentDiscoveryServiceClient) FetchMonitoringAssignments(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) { - out := new(v2.DiscoveryResponse) - err := c.cc.Invoke(ctx, "/kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService/FetchMonitoringAssignments", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MonitoringAssignmentDiscoveryServiceServer is the server API for MonitoringAssignmentDiscoveryService service. -type MonitoringAssignmentDiscoveryServiceServer interface { - DeltaMonitoringAssignments(MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignmentsServer) error - StreamMonitoringAssignments(MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsServer) error - FetchMonitoringAssignments(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) -} - -// UnimplementedMonitoringAssignmentDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedMonitoringAssignmentDiscoveryServiceServer struct { -} - -func (*UnimplementedMonitoringAssignmentDiscoveryServiceServer) DeltaMonitoringAssignments(MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignmentsServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaMonitoringAssignments not implemented") -} -func (*UnimplementedMonitoringAssignmentDiscoveryServiceServer) StreamMonitoringAssignments(MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamMonitoringAssignments not implemented") -} -func (*UnimplementedMonitoringAssignmentDiscoveryServiceServer) FetchMonitoringAssignments(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchMonitoringAssignments not implemented") -} - -func RegisterMonitoringAssignmentDiscoveryServiceServer(s *grpc.Server, srv MonitoringAssignmentDiscoveryServiceServer) { - s.RegisterService(&_MonitoringAssignmentDiscoveryService_serviceDesc, srv) -} - -func _MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignments_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MonitoringAssignmentDiscoveryServiceServer).DeltaMonitoringAssignments(&monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsServer{stream}) -} - -type MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignmentsServer interface { - Send(*v2.DeltaDiscoveryResponse) error - Recv() (*v2.DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsServer struct { - grpc.ServerStream -} - -func (x *monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsServer) Send(m *v2.DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *monitoringAssignmentDiscoveryServiceDeltaMonitoringAssignmentsServer) Recv() (*v2.DeltaDiscoveryRequest, error) { - m := new(v2.DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _MonitoringAssignmentDiscoveryService_StreamMonitoringAssignments_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MonitoringAssignmentDiscoveryServiceServer).StreamMonitoringAssignments(&monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsServer{stream}) -} - -type MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsServer interface { - Send(*v2.DiscoveryResponse) error - Recv() (*v2.DiscoveryRequest, error) - grpc.ServerStream -} - -type monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsServer struct { - grpc.ServerStream -} - -func (x *monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsServer) Send(m *v2.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *monitoringAssignmentDiscoveryServiceStreamMonitoringAssignmentsServer) Recv() (*v2.DiscoveryRequest, error) { - m := new(v2.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _MonitoringAssignmentDiscoveryService_FetchMonitoringAssignments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v2.DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MonitoringAssignmentDiscoveryServiceServer).FetchMonitoringAssignments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService/FetchMonitoringAssignments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MonitoringAssignmentDiscoveryServiceServer).FetchMonitoringAssignments(ctx, req.(*v2.DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _MonitoringAssignmentDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kuma.observability.v1alpha1.MonitoringAssignmentDiscoveryService", - HandlerType: (*MonitoringAssignmentDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchMonitoringAssignments", - Handler: _MonitoringAssignmentDiscoveryService_FetchMonitoringAssignments_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "DeltaMonitoringAssignments", - Handler: _MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignments_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "StreamMonitoringAssignments", - Handler: _MonitoringAssignmentDiscoveryService_StreamMonitoringAssignments_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "observability/v1alpha1/mads.proto", -} diff --git a/api/observability/v1alpha1/mads.proto b/api/observability/v1alpha1/mads.proto deleted file mode 100644 index 3eff9368218c..000000000000 --- a/api/observability/v1alpha1/mads.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package kuma.observability.v1alpha1; - -option go_package = "observability/mads/v1alpha1"; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; - -import "validate/validate.proto"; - -// Monitoring Assignment Discovery Service (MADS). -// -// xDS API that is meant for consumption by monitoring systems, e.g. Prometheus. -service MonitoringAssignmentDiscoveryService { - - rpc DeltaMonitoringAssignments(stream envoy.api.v2.DeltaDiscoveryRequest) - returns (stream envoy.api.v2.DeltaDiscoveryResponse) {} - - rpc StreamMonitoringAssignments(stream envoy.api.v2.DiscoveryRequest) - returns (stream envoy.api.v2.DiscoveryResponse) {} - - rpc FetchMonitoringAssignments(envoy.api.v2.DiscoveryRequest) - returns (envoy.api.v2.DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:monitoring"; - option (google.api.http).body = "*"; - } -} - -// MADS resource type. -// -// Describes a group of targets that need to be monitored. -message MonitoringAssignment { - - // MADS resource name. - // - // E.g., `/meshes/default/services/backend` or - // `/meshes/default/dataplanes/backend-01`. - string name = 1 [ (validate.rules).string = {min_bytes : 1} ]; - - // Describes a single target that needs to be monitored. - message Target { - - // Labels associated with that particular target. - // - // E.g., - // `[ - // "__address__" : "192.168.0.1:8080", - // "__metrics_path__" : "/metrics"]`, - // "instance" : "backend-01", - // ]`. - map labels = 1; - } - - // List of targets that need to be monitored. - repeated Target targets = 2; - - // Labels associated with every target in that assignment. - // - // E.g., `["job" : "backend"]`. - map labels = 3; -} diff --git a/api/observability/v1alpha1/mads_test.go b/api/observability/v1alpha1/mads_test.go deleted file mode 100644 index 0a397a83e029..000000000000 --- a/api/observability/v1alpha1/mads_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package v1alpha1_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" - - . "github.com/kumahq/kuma/api/observability/v1alpha1" - util_proto "github.com/kumahq/kuma/pkg/util/proto" -) - -var _ = Describe("Monitoring Assignment Discovery Service", func() { - - Describe("MonitoringAssignment", func() { - - type testCase struct { - input string - } - - DescribeTable("should to be serializable to YAML", - func(given testCase) { - // given - ma := &MonitoringAssignment{} - - By("deserializing from YAML") - // when - err := util_proto.FromYAML([]byte(given.input), ma) - // then - Expect(err).ToNot(HaveOccurred()) - - By("serializing back to YAML") - // when - actual, err := util_proto.ToYAML(ma) - // then - Expect(err).ToNot(HaveOccurred()) - // and - Expect(actual).To(MatchYAML(given.input)) - }, - Entry("MonitoringAssignment per service", testCase{ - input: ` - name: /meshes/default/services/backend - targets: - - labels: - __address__: 192.168.0.1:8080 - instance: backend-01 - - labels: - __address__: 192.168.0.2:8080 - instance: backend-02 - labels: - job: backend -`, - }), - Entry("MonitoringAssignment per dataplane", testCase{ - input: ` - name: /meshes/default/dataplane/backend-01 - targets: - - labels: - __address__: 192.168.0.1:8080 - labels: - job: backend - instance: backend-01 -`, - }), - ) - }) -}) diff --git a/api/observability/v1alpha1/v1alpha1_suite_test.go b/api/observability/v1alpha1/v1alpha1_suite_test.go deleted file mode 100644 index f921a0542e7d..000000000000 --- a/api/observability/v1alpha1/v1alpha1_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package v1alpha1_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestV1alpha1(t *testing.T) { - RegisterFailHandlerWithT(t, Fail) - RunSpecs(t, "V1alpha1 Suite") -} diff --git a/app/kuma-cp/cmd/root.go b/app/kuma-cp/cmd/root.go index c1eb6ab6daea..fd78be7c822a 100644 --- a/app/kuma-cp/cmd/root.go +++ b/app/kuma-cp/cmd/root.go @@ -12,7 +12,7 @@ import ( "github.com/kumahq/kuma/pkg/core" kuma_log "github.com/kumahq/kuma/pkg/log" - // import Envoy protobuf definitions so (un)marshalling Envoy protobuf works + // import Envoy protobuf definitions so (un)marshaling Envoy protobuf works _ "github.com/kumahq/kuma/pkg/xds/envoy" ) diff --git a/app/kuma-cp/cmd/run_test.go b/app/kuma-cp/cmd/run_test.go index df4e355a8fb9..bb581a37e590 100644 --- a/app/kuma-cp/cmd/run_test.go +++ b/app/kuma-cp/cmd/run_test.go @@ -104,7 +104,7 @@ func RunSmokeTest(factory ConfigFactory, workdir string) { }, "10s", "10ms").Should(BeTrue()) // when - By("signalling Control Plane to stop") + By("signaling Control Plane to stop") close(stopCh) // then diff --git a/app/kuma-dp/cmd/run_test.go b/app/kuma-dp/cmd/run_test.go index 31ee393947b5..b099d4a16d06 100644 --- a/app/kuma-dp/cmd/run_test.go +++ b/app/kuma-dp/cmd/run_test.go @@ -155,7 +155,7 @@ var _ = Describe("run", func() { } // when - By("signalling the dataplane manager to stop") + By("signaling the dataplane manager to stop") close(stopCh) // then diff --git a/app/kuma-prometheus-sd/cmd/run_test.go b/app/kuma-prometheus-sd/cmd/run_test.go index a033ef7e409f..5936296c9b1b 100644 --- a/app/kuma-prometheus-sd/cmd/run_test.go +++ b/app/kuma-prometheus-sd/cmd/run_test.go @@ -48,7 +48,7 @@ var _ = Describe("run", func() { By("waiting for Kuma Prometheus SD to become ready") // when - By("signalling Kuma Prometheus SD to stop") + By("signaling Kuma Prometheus SD to stop") close(stopCh) // then diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/common/config.go b/app/kuma-prometheus-sd/pkg/discovery/xds/common/config.go index 9483ad0cb0f9..6d9ed02bb343 100644 --- a/app/kuma-prometheus-sd/pkg/discovery/xds/common/config.go +++ b/app/kuma-prometheus-sd/pkg/discovery/xds/common/config.go @@ -3,8 +3,7 @@ package common type ApiVersion string const ( - V1Alpha1 = ApiVersion("v1alpha1") - V1 = ApiVersion("v1") + V1 = ApiVersion("v1") ) type DiscoveryConfig struct { diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/converter.go b/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/converter.go deleted file mode 100644 index c88233a09e20..000000000000 --- a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/converter.go +++ /dev/null @@ -1,56 +0,0 @@ -package v1alpha1 - -import ( - "fmt" - - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/prometheus/prometheus/util/strutil" - - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" -) - -type Converter struct{} - -func (c Converter) ConvertAll(assignments []*observability_proto.MonitoringAssignment) []*targetgroup.Group { - var groups []*targetgroup.Group - for _, assignment := range assignments { - groups = append(groups, c.Convert(assignment)...) - } - return groups -} - -func (c Converter) Convert(assignment *observability_proto.MonitoringAssignment) []*targetgroup.Group { - var groups []*targetgroup.Group - commonLabels := c.convertLabels(assignment.Labels) - for i, target := range assignment.Targets { - targetLabels := c.convertLabels(target.Labels) - allLabels := commonLabels.Clone().Merge(targetLabels) - - address := allLabels[model.AddressLabel] - delete(allLabels, model.AddressLabel) - - group := &targetgroup.Group{ - Source: c.subSourceName(assignment.Name, i), - Targets: []model.LabelSet{{ - model.AddressLabel: address, - }}, - Labels: allLabels, - } - groups = append(groups, group) - } - return groups -} - -func (c Converter) convertLabels(labels map[string]string) model.LabelSet { - labelSet := model.LabelSet{} - for key, value := range labels { - name := strutil.SanitizeLabelName(key) - labelSet[model.LabelName(name)] = model.LabelValue(value) - } - return labelSet -} - -func (c Converter) subSourceName(source string, i int) string { - return fmt.Sprintf("%s/%d", source, i) -} diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/converter_test.go b/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/converter_test.go deleted file mode 100644 index 521c62bed1aa..000000000000 --- a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/converter_test.go +++ /dev/null @@ -1,180 +0,0 @@ -package v1alpha1_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/discovery/targetgroup" - - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" - "github.com/kumahq/kuma/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1" -) - -var _ = Describe("Converter", func() { - - Describe("Convert()", func() { - - type testCase struct { - input *observability_proto.MonitoringAssignment - expected []*targetgroup.Group - } - - DescribeTable("should convert Kuma MonitoringAssignments into Prometheus Target Groups", - func(given testCase) { - // setup - c := v1alpha1.Converter{} - // when - actual := c.Convert(given.input) - // then - Expect(actual).To(Equal(given.expected)) - }, - Entry("1 Dataplane per assignment, in the format expected by `custom-sd` adapter", testCase{ - input: &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.1:8080", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/metrics", - "job": "backend", - "instance": "backend-01", - "mesh": "default", - "dataplane": "backend-01", - "env": "prod", - "service": "backend", - }, - }, - expected: []*targetgroup.Group{{ - Source: "/meshes/default/dataplanes/backend-01/0", - Targets: []model.LabelSet{ - { - "__address__": "192.168.0.1:8080", - }, - }, - Labels: model.LabelSet{ - "mesh": "default", - "dataplane": "backend-01", - "env": "prod", - "service": "backend", - "__scheme__": "http", - "__metrics_path__": "/metrics", - "job": "backend", - "instance": "backend-01", - }, - }}, - }), - Entry("1 Dataplane per assignment, in a free format", testCase{ - input: &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.1:8080", - "__scheme__": "http", - "__metrics_path__": "/metrics", - "instance": "backend-01", - "dataplane": "backend-01", - }, - }}, - Labels: map[string]string{ - "job": "backend", - "mesh": "default", - "service": "backend", - "env": "prod", - }, - }, - expected: []*targetgroup.Group{{ - Source: "/meshes/default/dataplanes/backend-01/0", - Targets: []model.LabelSet{ - { - "__address__": "192.168.0.1:8080", - }, - }, - Labels: model.LabelSet{ - "mesh": "default", - "dataplane": "backend-01", - "env": "prod", - "service": "backend", - "__scheme__": "http", - "__metrics_path__": "/metrics", - "job": "backend", - "instance": "backend-01", - }, - }}, - }), - Entry("N Dataplanes per assignment, in a free format", testCase{ - input: &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/services/backend", - Targets: []*observability_proto.MonitoringAssignment_Target{ - { - Labels: map[string]string{ - "__address__": "192.168.0.1:8080", - "__scheme__": "http", - "__metrics_path__": "/metrics", - "instance": "backend-01", - "dataplane": "backend-01", - "env": "prod", - }, - }, - { - Labels: map[string]string{ - "__address__": "192.168.0.2:8081", - "__scheme__": "http", - "__metrics_path__": "/metrics", - "instance": "backend-02", - "dataplane": "backend-02", - "env": "test", - }, - }, - }, - Labels: map[string]string{ - "job": "backend", - "mesh": "default", - "service": "backend", - }, - }, - expected: []*targetgroup.Group{ - { - Source: "/meshes/default/services/backend/0", - Targets: []model.LabelSet{ - { - "__address__": "192.168.0.1:8080", - }, - }, - Labels: model.LabelSet{ - "mesh": "default", - "dataplane": "backend-01", - "env": "prod", - "service": "backend", - "__scheme__": "http", - "__metrics_path__": "/metrics", - "job": "backend", - "instance": "backend-01", - }, - }, - { - Source: "/meshes/default/services/backend/1", - Targets: []model.LabelSet{ - { - "__address__": "192.168.0.2:8081", - }, - }, - Labels: model.LabelSet{ - "mesh": "default", - "dataplane": "backend-02", - "env": "test", - "service": "backend", - "__scheme__": "http", - "__metrics_path__": "/metrics", - "job": "backend", - "instance": "backend-02", - }, - }, - }, - }), - ) - }) -}) diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/handler.go b/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/handler.go deleted file mode 100644 index e3c76cf73ca2..000000000000 --- a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/handler.go +++ /dev/null @@ -1,44 +0,0 @@ -package v1alpha1 - -import ( - "github.com/prometheus/prometheus/discovery/targetgroup" - - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" -) - -type sourceList = map[string]bool - -type Handler struct { - converter Converter - oldSourceList sourceList -} - -func (h *Handler) Handle(assignments []*observability_proto.MonitoringAssignment, ch chan<- []*targetgroup.Group) { - newGroups := h.converter.ConvertAll(assignments) - newSourceList := h.buildSourceList(newGroups) - removedGroups := h.buildRemovedGroups(newSourceList) - allGroups := append(newGroups, removedGroups...) - ch <- allGroups - h.oldSourceList = newSourceList -} - -func (h *Handler) buildSourceList(newGroups []*targetgroup.Group) sourceList { - newSourceList := sourceList{} - for _, group := range newGroups { - newSourceList[group.Source] = true - } - return newSourceList -} - -func (h *Handler) buildRemovedGroups(newSourceList sourceList) []*targetgroup.Group { - // when targetGroup disappears, we should send an update with an empty targetList - var deletedGroups []*targetgroup.Group - for name := range h.oldSourceList { - if !newSourceList[name] { - deletedGroups = append(deletedGroups, &targetgroup.Group{ - Source: name, - }) - } - } - return deletedGroups -} diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/stream.go b/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/stream.go deleted file mode 100644 index f40bdfd27bb2..000000000000 --- a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/stream.go +++ /dev/null @@ -1,96 +0,0 @@ -package v1alpha1 - -import ( - "context" - "io" - - "github.com/go-logr/logr" - "github.com/pkg/errors" - "github.com/prometheus/prometheus/discovery/targetgroup" - "go.uber.org/multierr" - - "github.com/kumahq/kuma/app/kuma-prometheus-sd/pkg/discovery/xds/common" - mads_v1alpha1_client "github.com/kumahq/kuma/pkg/mads/v1alpha1/client" -) - -type streamDiscoverer struct { - log logr.Logger - config common.DiscoveryConfig - handler *Handler -} - -type streamFactory struct { - handler Handler -} - -// CreateDiscoverer implements xds.DiscovererFactory -func (f *streamFactory) CreateDiscoverer(config common.DiscoveryConfig, log logr.Logger) common.DiscovererE { - return &streamDiscoverer{ - log: log, - config: config, - handler: &f.handler, - } -} - -func NewFactory() common.DiscovererFactory { - return &streamFactory{} -} - -func (s *streamDiscoverer) Run(ctx context.Context, ch chan<- []*targetgroup.Group) (errs error) { - s.log.Info("creating a gRPC client for Monitoring Assignment Discovery Service (MADS) server ...") - client, err := mads_v1alpha1_client.New(s.config.ServerURL) - if err != nil { - return errors.Wrap(err, "failed to connect to gRPC server") - } - defer func() { - s.log.Info("closing a connection ...") - if err := client.Close(); err != nil { - errs = multierr.Append(errs, errors.Wrapf(err, "failed to close a connection")) - } - }() - - s.log.Info("starting an xDS stream ...") - stream, err := client.StartStream() - if err != nil { - return errors.Wrap(err, "failed to start an xDS stream") - } - defer func() { - s.log.Info("closing an xDS stream ...") - if err := stream.Close(); err != nil { - errs = multierr.Append(errs, errors.Wrapf(err, "failed to close an xDS stream")) - } - }() - - s.log.Info("sending first discovery request on a new xDS stream ...") - err = stream.RequestAssignments(s.config.ClientName) - if err != nil { - return errors.Wrap(err, "failed to send a discovery request") - } - - for { - select { - case <-ctx.Done(): - return nil - default: - } - - s.log.Info("waiting for a discovery response ...") - assignments, err := stream.WaitForAssignments() - if err != nil { - return errors.Wrap(err, "failed to receive a discovery response") - } - s.log.Info("received monitoring assignments", "len", len(assignments)) - s.log.V(1).Info("received monitoring assignments", "assignments", assignments) - - s.handler.Handle(assignments, ch) - - if err := stream.ACK(); err != nil { - if err == io.EOF { - break - } - return errors.Wrap(err, "failed to ACK a discovery response") - } - } - - return nil -} diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/suite_test.go b/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/suite_test.go deleted file mode 100644 index 48b6967fdd8f..000000000000 --- a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/suite_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package v1alpha1_test - -import ( - "testing" - - "github.com/kumahq/kuma/pkg/test" -) - -func TestXds(t *testing.T) { - test.RunSpecs(t, "Prometheus SD V1Alpha1 Suite") -} diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/xds.go b/app/kuma-prometheus-sd/pkg/discovery/xds/xds.go index 80828664df72..b1d3c90ac078 100644 --- a/app/kuma-prometheus-sd/pkg/discovery/xds/xds.go +++ b/app/kuma-prometheus-sd/pkg/discovery/xds/xds.go @@ -10,7 +10,6 @@ import ( "github.com/kumahq/kuma/app/kuma-prometheus-sd/pkg/discovery/xds/common" v1 "github.com/kumahq/kuma/app/kuma-prometheus-sd/pkg/discovery/xds/v1" - "github.com/kumahq/kuma/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1" ) type discoverer struct { @@ -24,8 +23,6 @@ func NewDiscoverer(config common.DiscoveryConfig, log logr.Logger) (discovery.Di switch config.ApiVersion { case common.V1: factory = v1.NewFactory() - case common.V1Alpha1: - factory = v1alpha1.NewFactory() default: return nil, errors.Errorf("invalid MADS apiVersion %s", config.ApiVersion) } diff --git a/app/kumactl/cmd/install/install_transparent_proxy.go b/app/kumactl/cmd/install/install_transparent_proxy.go index 37943bd7f651..7b5c21919ce7 100644 --- a/app/kumactl/cmd/install/install_transparent_proxy.go +++ b/app/kumactl/cmd/install/install_transparent_proxy.go @@ -213,7 +213,7 @@ func modifyIpTables(cmd *cobra.Command, args *transparentProxyArgs) error { } if !args.DryRun { - _, _ = cmd.OutOrStdout().Write([]byte("kumactl is about to apply the iptables rules that will enable transparent proxying on the machine. The SSH connection may drop. If that happens, just reconnect again.")) + _, _ = cmd.OutOrStdout().Write([]byte("kumactl is about to apply the iptables rules that will enable transparent proxying on the machine. The SSH connection may drop. If that happens, just reconnect again.\n")) } output, err := tp.Setup(&config.TransparentProxyConfig{ DryRun: args.DryRun, diff --git a/app/kumactl/cmd/root.go b/app/kumactl/cmd/root.go index 50eae1221428..b20882f35c78 100644 --- a/app/kumactl/cmd/root.go +++ b/app/kumactl/cmd/root.go @@ -28,7 +28,7 @@ import ( _ "github.com/kumahq/kuma/pkg/plugins/runtime/gateway/register" kuma_version "github.com/kumahq/kuma/pkg/version" - // import Envoy protobuf definitions so (un)marshalling Envoy protobuf works + // import Envoy protobuf definitions so (un)marshaling Envoy protobuf works _ "github.com/kumahq/kuma/pkg/xds/envoy" ) diff --git a/pkg/api-server/config_ws_test.go b/pkg/api-server/config_ws_test.go index a51547f19fef..cf49efea8a0a 100644 --- a/pkg/api-server/config_ws_test.go +++ b/pkg/api-server/config_ws_test.go @@ -144,7 +144,6 @@ var _ = Describe("Config WS", func() { "mode": "standalone", "monitoringAssignmentServer": { "apiVersions": [ - "v1alpha1", "v1" ], "assignmentRefreshInterval": "1s", diff --git a/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml b/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml index 6aead862600b..5a395881fa6e 100644 --- a/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml +++ b/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml @@ -91,7 +91,6 @@ monitoringAssignmentServer: port: 5676 # ENV: KUMA_MONITORING_ASSIGNMENT_SERVER_PORT # Which MADS API versions to serve apiVersions: # ENV: KUMA_MONITORING_ASSIGNMENT_SERVER_API_VERSIONS - - v1alpha1 - v1 # Interval for re-generating monitoring assignments for clients connected to the Control Plane. assignmentRefreshInterval: 1s # ENV: KUMA_MONITORING_ASSIGNMENT_SERVER_ASSIGNMENT_REFRESH_INTERVAL diff --git a/pkg/config/app/kuma-prometheus-sd/config.go b/pkg/config/app/kuma-prometheus-sd/config.go index c3f421787acd..fc08674b9cc9 100644 --- a/pkg/config/app/kuma-prometheus-sd/config.go +++ b/pkg/config/app/kuma-prometheus-sd/config.go @@ -105,8 +105,8 @@ func (c *MonitoringAssignmentClientConfig) Validate() (errs error) { if c.ApiVersion == "" { errs = multierr.Append(errs, errors.Errorf(".ApiVersion must be non-empty")) - } else if c.ApiVersion != mads.API_V1 && c.ApiVersion != mads.API_V1_ALPHA1 { - errs = multierr.Append(errs, errors.Errorf(".ApiVersion must be v1 or v1alpha1, got: %s", c.ApiVersion)) + } else if c.ApiVersion != mads.API_V1 { + errs = multierr.Append(errs, errors.Errorf(".ApiVersion must be v1, got: %s", c.ApiVersion)) } return diff --git a/pkg/config/app/kuma-prometheus-sd/config_test.go b/pkg/config/app/kuma-prometheus-sd/config_test.go index 469440a14114..b29848a288c2 100644 --- a/pkg/config/app/kuma-prometheus-sd/config_test.go +++ b/pkg/config/app/kuma-prometheus-sd/config_test.go @@ -35,7 +35,7 @@ var _ = Describe("Config", func() { env := map[string]string{ "KUMA_MONITORING_ASSIGNMENT_CLIENT_URL": "grpc://kuma-control-plane.internal:5682", "KUMA_MONITORING_ASSIGNMENT_CLIENT_NAME": "custom", - "KUMA_MONITORING_ASSIGNMENT_CLIENT_API_VERSION": "v1alpha1", + "KUMA_MONITORING_ASSIGNMENT_CLIENT_API_VERSION": "v1", "KUMA_PROMETHEUS_OUTPUT_FILE": "/path/to/file", } for key, value := range env { diff --git a/pkg/config/mads/config.go b/pkg/config/mads/config.go index 85c9e00a4d75..117a6b296940 100644 --- a/pkg/config/mads/config.go +++ b/pkg/config/mads/config.go @@ -17,7 +17,7 @@ func DefaultMonitoringAssignmentServerConfig() *MonitoringAssignmentServerConfig return &MonitoringAssignmentServerConfig{ Port: 5676, DefaultFetchTimeout: 30 * time.Second, - ApiVersions: []mads.ApiVersion{mads.API_V1_ALPHA1, mads.API_V1}, + ApiVersions: []mads.ApiVersion{mads.API_V1}, AssignmentRefreshInterval: 1 * time.Second, } } @@ -61,7 +61,7 @@ func (c *MonitoringAssignmentServerConfig) Validate() (errs error) { } for _, apiVersion := range c.ApiVersions { - if apiVersion != mads.API_V1 && apiVersion != mads.API_V1_ALPHA1 { + if apiVersion != mads.API_V1 { errs = multierr.Append(errs, errors.Errorf(".ApiVersions contains invalid version %s", apiVersion)) } } diff --git a/pkg/core/bootstrap/bootstrap.go b/pkg/core/bootstrap/bootstrap.go index a5ab64c57f80..ff66fb7a74b8 100644 --- a/pkg/core/bootstrap/bootstrap.go +++ b/pkg/core/bootstrap/bootstrap.go @@ -15,7 +15,9 @@ import ( "github.com/kumahq/kuma/pkg/core/dns/lookup" "github.com/kumahq/kuma/pkg/core/managers/apis/dataplane" "github.com/kumahq/kuma/pkg/core/managers/apis/dataplaneinsight" + externalservice_managers "github.com/kumahq/kuma/pkg/core/managers/apis/external_service" mesh_managers "github.com/kumahq/kuma/pkg/core/managers/apis/mesh" + ratelimit_managers "github.com/kumahq/kuma/pkg/core/managers/apis/ratelimit" "github.com/kumahq/kuma/pkg/core/managers/apis/zone" "github.com/kumahq/kuma/pkg/core/managers/apis/zoneingressinsight" "github.com/kumahq/kuma/pkg/core/managers/apis/zoneinsight" @@ -293,6 +295,22 @@ func initializeResourceManager(cfg kuma_cp.Config, builder *core_runtime.Builder mesh_managers.NewMeshManager(builder.ResourceStore(), customizableManager, builder.CaManagers(), registry.Global(), builder.MeshValidator()), ) + rateLimitValidator := ratelimit_managers.RateLimitValidator{ + Store: builder.ResourceStore(), + } + customizableManager.Customize( + mesh.RateLimitType, + ratelimit_managers.NewRateLimitManager(builder.ResourceStore(), rateLimitValidator), + ) + + externalServiceValidator := externalservice_managers.ExternalServiceValidator{ + Store: builder.ResourceStore(), + } + customizableManager.Customize( + mesh.ExternalServiceType, + externalservice_managers.NewExternalServiceManager(builder.ResourceStore(), externalServiceValidator), + ) + customizableManager.Customize( mesh.DataplaneType, dataplane.NewDataplaneManager(builder.ResourceStore(), builder.Config().Multizone.Zone.Name), diff --git a/pkg/core/managers/apis/external_service/external_service_manager.go b/pkg/core/managers/apis/external_service/external_service_manager.go new file mode 100644 index 000000000000..42b79df75098 --- /dev/null +++ b/pkg/core/managers/apis/external_service/external_service_manager.go @@ -0,0 +1,122 @@ +package externalservice + +import ( + "context" + "time" + + "github.com/pkg/errors" + + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + core_manager "github.com/kumahq/kuma/pkg/core/resources/manager" + core_model "github.com/kumahq/kuma/pkg/core/resources/model" + core_store "github.com/kumahq/kuma/pkg/core/resources/store" +) + +type externalServiceManager struct { + store core_store.ResourceStore + externalServiceValidator ExternalServiceValidator +} + +func NewExternalServiceManager( + store core_store.ResourceStore, + validator ExternalServiceValidator, +) core_manager.ResourceManager { + return &externalServiceManager{ + store: store, + externalServiceValidator: validator, + } +} + +func (m *externalServiceManager) Get(ctx context.Context, resource core_model.Resource, fs ...core_store.GetOptionsFunc) error { + externalService, err := m.externalService(resource) + if err != nil { + return err + } + return m.store.Get(ctx, externalService, fs...) +} + +func (m *externalServiceManager) List(ctx context.Context, list core_model.ResourceList, fs ...core_store.ListOptionsFunc) error { + externalServices, err := m.externalServices(list) + if err != nil { + return err + } + return m.store.List(ctx, externalServices, fs...) +} + +func (m *externalServiceManager) Create(ctx context.Context, resource core_model.Resource, fs ...core_store.CreateOptionsFunc) (errs error) { + opts := core_store.NewCreateOptions(fs...) + externalService, err := m.externalService(resource) + if err != nil { + return err + } + if err := resource.Validate(); err != nil { + return err + } + if err := m.externalServiceValidator.ValidateCreate(ctx, opts.Mesh, externalService); err != nil { + return err + } + + if err := m.store.Create(ctx, externalService, append(fs, core_store.CreatedAt(time.Now()))...); err != nil { + return err + } + return nil +} + +func (m *externalServiceManager) Delete(ctx context.Context, resource core_model.Resource, fs ...core_store.DeleteOptionsFunc) error { + externalService, err := m.externalService(resource) + if err != nil { + return err + } + opts := core_store.NewDeleteOptions(fs...) + + if err := m.externalServiceValidator.ValidateDelete(ctx, opts.Name); err != nil { + return err + } + if err := m.store.Delete(ctx, externalService, fs...); err != nil { + return err + } + return nil +} + +func (m *externalServiceManager) DeleteAll(ctx context.Context, list core_model.ResourceList, fs ...core_store.DeleteAllOptionsFunc) error { + if _, err := m.externalServices(list); err != nil { + return err + } + return core_manager.DeleteAllResources(m, ctx, list, fs...) +} + +func (m *externalServiceManager) Update(ctx context.Context, resource core_model.Resource, fs ...core_store.UpdateOptionsFunc) error { + externalService, err := m.externalService(resource) + if err != nil { + return err + } + if err := resource.Validate(); err != nil { + return err + } + + currentExternalService := core_mesh.NewExternalServiceResource() + if err := m.Get(ctx, currentExternalService, core_store.GetBy(core_model.MetaToResourceKey(externalService.GetMeta())), core_store.GetByVersion(externalService.GetMeta().GetVersion())); err != nil { + return err + } + if err := m.externalServiceValidator.ValidateUpdate(ctx, currentExternalService, externalService); err != nil { + return err + } + + return m.store.Update(ctx, externalService, append(fs, core_store.ModifiedAt(time.Now()))...) +} + +func (m *externalServiceManager) externalService(resource core_model.Resource) (*core_mesh.ExternalServiceResource, error) { + externalService, ok := resource.(*core_mesh.ExternalServiceResource) + if !ok { + return nil, errors.Errorf("invalid resource type: expected=%T, got=%T", (*core_mesh.ExternalServiceResource)(nil), resource) + } + return externalService, nil +} + +func (m *externalServiceManager) externalServices(list core_model.ResourceList) (*core_mesh.ExternalServiceResourceList, error) { + externalServices, ok := list.(*core_mesh.ExternalServiceResourceList) + if !ok { + return nil, errors.Errorf("invalid resource type: expected=%T, got=%T", (*core_mesh.ExternalServiceResourceList)(nil), list) + } + return externalServices, nil +} diff --git a/pkg/core/managers/apis/external_service/external_service_validator.go b/pkg/core/managers/apis/external_service/external_service_validator.go new file mode 100644 index 000000000000..962a3fbc2a11 --- /dev/null +++ b/pkg/core/managers/apis/external_service/external_service_validator.go @@ -0,0 +1,64 @@ +package externalservice + +import ( + "context" + + mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + "github.com/kumahq/kuma/pkg/core/resources/store" + "github.com/kumahq/kuma/pkg/core/validators" +) + +type ExternalServiceValidator struct { + Store store.ResourceStore +} + +func (r *ExternalServiceValidator) ValidateCreate(ctx context.Context, mesh string, resource *core_mesh.ExternalServiceResource) error { + return r.validateRateLimits(ctx, mesh, resource.Spec.GetTags()[mesh_proto.ServiceTag]) +} + +func (r *ExternalServiceValidator) ValidateUpdate(ctx context.Context, previousExternalService *core_mesh.ExternalServiceResource, newExternalService *core_mesh.ExternalServiceResource) error { + return r.validateRateLimits(ctx, previousExternalService.GetMeta().GetMesh(), newExternalService.Spec.GetTags()[mesh_proto.ServiceTag]) +} + +func (r *ExternalServiceValidator) ValidateDelete(ctx context.Context, name string) error { + return nil +} + +func (r *ExternalServiceValidator) validateRateLimits(ctx context.Context, mesh string, service string) error { + validationErr := &validators.ValidationError{} + // If referenced by a ratelimit, that ratelimit must only match kuma.io/service destinations + + rateLimits := &core_mesh.RateLimitResourceList{} + err := r.Store.List(ctx, rateLimits, store.ListByMesh(mesh)) + if err != nil { + if store.IsResourceNotFound(err) { + return nil + } else { + validationErr.AddViolation("externalservice", err.Error()) + return validationErr + } + } + + for _, rateLimit := range rateLimits.Items { + for _, dest := range rateLimit.Destinations() { + matchesThisService := false + matchesNonService := false + for tag, value := range dest.GetMatch() { + if tag == mesh_proto.ServiceTag { + if value == service || value == mesh_proto.MatchAllTag { + matchesThisService = true + } + } else { + matchesNonService = true + } + } + if matchesThisService && matchesNonService { + rlName := rateLimit.GetMeta().GetName() + validationErr.AddViolation("externalservice", "ExternalService would match RateLimit '"+rlName+"' which includes incompatible destination matches") + } + } + } + + return validationErr.OrNil() +} diff --git a/pkg/core/managers/apis/external_service/externalservice_manager_suite_test.go b/pkg/core/managers/apis/external_service/externalservice_manager_suite_test.go new file mode 100644 index 000000000000..50776b9c8cfe --- /dev/null +++ b/pkg/core/managers/apis/external_service/externalservice_manager_suite_test.go @@ -0,0 +1,11 @@ +package externalservice + +import ( + "testing" + + "github.com/kumahq/kuma/pkg/test" +) + +func TestExternalServiceManager(t *testing.T) { + test.RunSpecs(t, "ExternalService Manager Suite") +} diff --git a/pkg/core/managers/apis/external_service/externalservice_manager_test.go b/pkg/core/managers/apis/external_service/externalservice_manager_test.go new file mode 100644 index 000000000000..28a2521cee94 --- /dev/null +++ b/pkg/core/managers/apis/external_service/externalservice_manager_test.go @@ -0,0 +1,354 @@ +package externalservice + +import ( + "context" + "time" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" + ratelimit_managers "github.com/kumahq/kuma/pkg/core/managers/apis/ratelimit" + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + "github.com/kumahq/kuma/pkg/core/resources/manager" + "github.com/kumahq/kuma/pkg/core/resources/model" + "github.com/kumahq/kuma/pkg/core/resources/store" + "github.com/kumahq/kuma/pkg/core/validators" + "github.com/kumahq/kuma/pkg/plugins/resources/memory" + util_proto "github.com/kumahq/kuma/pkg/util/proto" +) + +var _ = Describe("ExternalService Manager", func() { + + var resStore store.ResourceStore + var rateLimitManager manager.ResourceManager + var externalServiceManager manager.ResourceManager + + BeforeEach(func() { + resStore = memory.NewStore() + rateLimitValidator := ratelimit_managers.RateLimitValidator{ + Store: resStore, + } + rateLimitManager = ratelimit_managers.NewRateLimitManager(resStore, rateLimitValidator) + + externalServiceValidator := ExternalServiceValidator{ + Store: resStore, + } + externalServiceManager = NewExternalServiceManager(resStore, externalServiceValidator) + }) + + Describe("Create()", func() { + It("Should allow outbound with only service tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + err = externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + + // then + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should allow outbound with only service tag = *", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2-name", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "*", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + err = externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + + // then + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should disallow outbound with service tag + other tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2-name", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + "version": "v1", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + err = externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + + // then + Expect(err).To(HaveOccurred()) + Expect(err).To(Equal(&validators.ValidationError{ + Violations: []validators.Violation{ + { + Field: "externalservice", + Message: "ExternalService would match RateLimit 'ratelimit1' which includes incompatible destination matches", + }, + }, + })) + }) + }) + + Describe("Update()", func() { + It("Should allow outbound with only service tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service3", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + err = externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + // then + externalService.Spec.Tags["kuma.io/service"] = "service2" + err = externalServiceManager.Update(context.Background(), &externalService) + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should disallow outbound with service tag + other tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2-name", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service3", + "version": "v1", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + err = rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + // then + externalService.Spec.Tags["kuma.io/service"] = "service3" + err = externalServiceManager.Update(context.Background(), &externalService) + Expect(err).To(HaveOccurred()) + Expect(err).To(Equal(&validators.ValidationError{ + Violations: []validators.Violation{ + { + Field: "externalservice", + Message: "ExternalService would match RateLimit 'ratelimit1' which includes incompatible destination matches", + }, + }, + })) + }) + + }) + +}) diff --git a/pkg/core/managers/apis/ratelimit/ratelimit_manager.go b/pkg/core/managers/apis/ratelimit/ratelimit_manager.go new file mode 100644 index 000000000000..2a5ffdca9306 --- /dev/null +++ b/pkg/core/managers/apis/ratelimit/ratelimit_manager.go @@ -0,0 +1,122 @@ +package ratelimit + +import ( + "context" + "time" + + "github.com/pkg/errors" + + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + core_manager "github.com/kumahq/kuma/pkg/core/resources/manager" + core_model "github.com/kumahq/kuma/pkg/core/resources/model" + core_store "github.com/kumahq/kuma/pkg/core/resources/store" +) + +type rateLimitManager struct { + store core_store.ResourceStore + rateLimitValidator RateLimitValidator +} + +func NewRateLimitManager( + store core_store.ResourceStore, + validator RateLimitValidator, +) core_manager.ResourceManager { + return &rateLimitManager{ + store: store, + rateLimitValidator: validator, + } +} + +func (m *rateLimitManager) Get(ctx context.Context, resource core_model.Resource, fs ...core_store.GetOptionsFunc) error { + rateLimit, err := m.rateLimit(resource) + if err != nil { + return err + } + return m.store.Get(ctx, rateLimit, fs...) +} + +func (m *rateLimitManager) List(ctx context.Context, list core_model.ResourceList, fs ...core_store.ListOptionsFunc) error { + rateLimits, err := m.rateLimits(list) + if err != nil { + return err + } + return m.store.List(ctx, rateLimits, fs...) +} + +func (m *rateLimitManager) Create(ctx context.Context, resource core_model.Resource, fs ...core_store.CreateOptionsFunc) (errs error) { + opts := core_store.NewCreateOptions(fs...) + rateLimit, err := m.rateLimit(resource) + if err != nil { + return err + } + if err := resource.Validate(); err != nil { + return err + } + if err := m.rateLimitValidator.ValidateCreate(ctx, opts.Mesh, rateLimit); err != nil { + return err + } + + if err := m.store.Create(ctx, rateLimit, append(fs, core_store.CreatedAt(time.Now()))...); err != nil { + return err + } + return nil +} + +func (m *rateLimitManager) Delete(ctx context.Context, resource core_model.Resource, fs ...core_store.DeleteOptionsFunc) error { + rateLimit, err := m.rateLimit(resource) + if err != nil { + return err + } + opts := core_store.NewDeleteOptions(fs...) + + if err := m.rateLimitValidator.ValidateDelete(ctx, opts.Name); err != nil { + return err + } + if err := m.store.Delete(ctx, rateLimit, fs...); err != nil { + return err + } + return nil +} + +func (m *rateLimitManager) DeleteAll(ctx context.Context, list core_model.ResourceList, fs ...core_store.DeleteAllOptionsFunc) error { + if _, err := m.rateLimits(list); err != nil { + return err + } + return core_manager.DeleteAllResources(m, ctx, list, fs...) +} + +func (m *rateLimitManager) Update(ctx context.Context, resource core_model.Resource, fs ...core_store.UpdateOptionsFunc) error { + rateLimit, err := m.rateLimit(resource) + if err != nil { + return err + } + if err := resource.Validate(); err != nil { + return err + } + + currentRateLimit := core_mesh.NewRateLimitResource() + if err := m.Get(ctx, currentRateLimit, core_store.GetBy(core_model.MetaToResourceKey(rateLimit.GetMeta())), core_store.GetByVersion(rateLimit.GetMeta().GetVersion())); err != nil { + return err + } + if err := m.rateLimitValidator.ValidateUpdate(ctx, currentRateLimit, rateLimit); err != nil { + return err + } + + return m.store.Update(ctx, rateLimit, append(fs, core_store.ModifiedAt(time.Now()))...) +} + +func (m *rateLimitManager) rateLimit(resource core_model.Resource) (*core_mesh.RateLimitResource, error) { + rateLimit, ok := resource.(*core_mesh.RateLimitResource) + if !ok { + return nil, errors.Errorf("invalid resource type: expected=%T, got=%T", (*core_mesh.RateLimitResource)(nil), resource) + } + return rateLimit, nil +} + +func (m *rateLimitManager) rateLimits(list core_model.ResourceList) (*core_mesh.RateLimitResourceList, error) { + rateLimits, ok := list.(*core_mesh.RateLimitResourceList) + if !ok { + return nil, errors.Errorf("invalid resource type: expected=%T, got=%T", (*core_mesh.RateLimitResourceList)(nil), list) + } + return rateLimits, nil +} diff --git a/pkg/core/managers/apis/ratelimit/ratelimit_manager_suite_test.go b/pkg/core/managers/apis/ratelimit/ratelimit_manager_suite_test.go new file mode 100644 index 000000000000..e0ee3874b73f --- /dev/null +++ b/pkg/core/managers/apis/ratelimit/ratelimit_manager_suite_test.go @@ -0,0 +1,11 @@ +package ratelimit + +import ( + "testing" + + "github.com/kumahq/kuma/pkg/test" +) + +func TestRateLimitManager(t *testing.T) { + test.RunSpecs(t, "RateLimit Manager Suite") +} diff --git a/pkg/core/managers/apis/ratelimit/ratelimit_manager_test.go b/pkg/core/managers/apis/ratelimit/ratelimit_manager_test.go new file mode 100644 index 000000000000..b2c2c34c867a --- /dev/null +++ b/pkg/core/managers/apis/ratelimit/ratelimit_manager_test.go @@ -0,0 +1,544 @@ +package ratelimit + +import ( + "context" + "time" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" + externalservice_managers "github.com/kumahq/kuma/pkg/core/managers/apis/external_service" + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + "github.com/kumahq/kuma/pkg/core/resources/manager" + "github.com/kumahq/kuma/pkg/core/resources/model" + "github.com/kumahq/kuma/pkg/core/resources/store" + "github.com/kumahq/kuma/pkg/core/validators" + "github.com/kumahq/kuma/pkg/plugins/resources/memory" + util_proto "github.com/kumahq/kuma/pkg/util/proto" +) + +var _ = Describe("RateLimit Manager", func() { + + var resStore store.ResourceStore + var rateLimitManager manager.ResourceManager + var externalServiceManager manager.ResourceManager + + BeforeEach(func() { + resStore = memory.NewStore() + rateLimitValidator := RateLimitValidator{ + Store: resStore, + } + rateLimitManager = NewRateLimitManager(resStore, rateLimitValidator) + + externalServiceValidator := externalservice_managers.ExternalServiceValidator{ + Store: resStore, + } + externalServiceManager = externalservice_managers.NewExternalServiceManager(resStore, externalServiceValidator) + }) + + Describe("Create()", func() { + It("Should treat as inbound and allow by default", func() { + // given + meshName := "mesh-1" + resKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + // when + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + "version": "v1", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(resKey)) + + // then + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should treat as inbound and allow by default, allow service=*", func() { + // given + meshName := "mesh-1" + resKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + // when + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "*", + "version": "v1", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(resKey)) + + // then + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should allow outbound with only service tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + err = rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + + // then + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should allow outbound with only service tag = *", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2-name", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "*", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + err = rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + + // then + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should disallow outbound with service tag + other tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2-name", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + "version": "v1", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + err = rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + + // then + Expect(err).To(HaveOccurred()) + Expect(err).To(Equal(&validators.ValidationError{ + Violations: []validators.Violation{ + { + Field: "ratelimit", + Message: "RateLimit applied to external service only supports kuma.io/service as destination match", + }, + }, + })) + }) + }) + + Describe("Update()", func() { + It("Should treat as inbound and allow by default", func() { + // given + meshName := "mesh-1" + resKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + // when + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + "version": "v1", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(resKey)) + Expect(err).ToNot(HaveOccurred()) + + // then + ratelimit.Spec.Destinations[0].Match["kuma.io/service"] = "service3" + err = rateLimitManager.Update(context.Background(), &ratelimit) + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should allow outbound with only service tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + err = rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + // then + ratelimit.Spec.Destinations[0].Match["kuma.io/service"] = "service3" + err = rateLimitManager.Update(context.Background(), &ratelimit) + Expect(err).ToNot(HaveOccurred()) + }) + + It("Should disallow outbound with service tag + other tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service2", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + err = rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + // then + ratelimit.Spec.Destinations[0].Match["version"] = "v1" + err = rateLimitManager.Update(context.Background(), &ratelimit) + Expect(err).To(HaveOccurred()) + Expect(err).To(Equal(&validators.ValidationError{ + Violations: []validators.Violation{ + { + Field: "ratelimit", + Message: "RateLimit applied to external service only supports kuma.io/service as destination match", + }, + }, + })) + }) + + It("Should disallow outbound with service=* + other tag", func() { + // given + meshName := "mesh-1" + rlKey := model.ResourceKey{ + Mesh: meshName, + Name: "ratelimit1", + } + + esKey := model.ResourceKey{ + Mesh: meshName, + Name: "service2", + } + + // when + externalService := core_mesh.ExternalServiceResource{ + Spec: &mesh_proto.ExternalService{ + Networking: &mesh_proto.ExternalService_Networking{ + Address: "example.com:80", + }, + Tags: map[string]string{ + "kuma.io/service": "service2", + }, + }, + } + ratelimit := core_mesh.RateLimitResource{ + Spec: &mesh_proto.RateLimit{ + Sources: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "service1", + }, + }, + }, + Destinations: []*mesh_proto.Selector{ + &mesh_proto.Selector{ + Match: map[string]string{ + "kuma.io/service": "*", + }, + }, + }, + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 10), + }, + }, + }, + } + err := externalServiceManager.Create(context.Background(), &externalService, store.CreateBy(esKey)) + Expect(err).ToNot(HaveOccurred()) + + err = rateLimitManager.Create(context.Background(), &ratelimit, store.CreateBy(rlKey)) + Expect(err).ToNot(HaveOccurred()) + + // then + ratelimit.Spec.Destinations[0].Match["version"] = "v1" + err = rateLimitManager.Update(context.Background(), &ratelimit) + Expect(err).To(HaveOccurred()) + Expect(err).To(Equal(&validators.ValidationError{ + Violations: []validators.Violation{ + { + Field: "ratelimit", + Message: "RateLimit applied to external service only supports kuma.io/service as destination match", + }, + }, + })) + }) + + }) + +}) diff --git a/pkg/core/managers/apis/ratelimit/ratelimit_validator.go b/pkg/core/managers/apis/ratelimit/ratelimit_validator.go new file mode 100644 index 000000000000..4c63ab275d4f --- /dev/null +++ b/pkg/core/managers/apis/ratelimit/ratelimit_validator.go @@ -0,0 +1,73 @@ +package ratelimit + +import ( + "context" + + mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + "github.com/kumahq/kuma/pkg/core/resources/store" + "github.com/kumahq/kuma/pkg/core/validators" +) + +type RateLimitValidator struct { + Store store.ResourceStore +} + +func (r *RateLimitValidator) ValidateCreate(ctx context.Context, mesh string, resource *core_mesh.RateLimitResource) error { + return r.validateDestinations(ctx, mesh, resource.Destinations()) +} + +func (r *RateLimitValidator) ValidateUpdate(ctx context.Context, previousRateLimit *core_mesh.RateLimitResource, newRateLimit *core_mesh.RateLimitResource) error { + return r.validateDestinations(ctx, previousRateLimit.GetMeta().GetMesh(), newRateLimit.Destinations()) +} + +func (r *RateLimitValidator) ValidateDelete(ctx context.Context, name string) error { + return nil +} + +func (r *RateLimitValidator) validateDestinations(ctx context.Context, mesh string, dests []*mesh_proto.Selector) error { + validationErr := &validators.ValidationError{} + // A ratelimit on an external service can only match kuma.io/service tags + externalServices := &core_mesh.ExternalServiceResourceList{} + err := r.Store.List(ctx, externalServices, store.ListByMesh(mesh)) + if err != nil { + if store.IsResourceNotFound(err) { + return nil + } else { + validationErr.AddViolation("ratelimit", err.Error()) + return validationErr + } + } + + esLookup := map[string]bool{} + for _, externalService := range externalServices.Items { + spec := externalService.GetSpec().(*mesh_proto.ExternalService) + for tag, value := range spec.GetTags() { + if tag == mesh_proto.ServiceTag { + esLookup[value] = true + } + } + } + + if len(esLookup) == 0 { + return nil + } + + for _, dest := range dests { + hasNonService := false + hasExternalService := false + for tag, value := range dest.GetMatch() { + if tag == mesh_proto.ServiceTag { + if _, exist := esLookup[value]; exist || value == mesh_proto.MatchAllTag { + hasExternalService = true + } + } else { + hasNonService = true + } + } + if hasNonService && hasExternalService { + validationErr.AddViolation("ratelimit", "RateLimit applied to external service only supports kuma.io/service as destination match") + } + } + return validationErr.OrNil() +} diff --git a/pkg/core/ratelimits/matcher.go b/pkg/core/ratelimits/matcher.go index 1857bd2a9110..a487439a68e4 100644 --- a/pkg/core/ratelimits/matcher.go +++ b/pkg/core/ratelimits/matcher.go @@ -22,7 +22,7 @@ type RateLimitMatcher struct { func (m *RateLimitMatcher) Match(ctx context.Context, dataplane *core_mesh.DataplaneResource, mesh *core_mesh.MeshResource) (core_xds.RateLimitsMap, error) { ratelimits := &core_mesh.RateLimitResourceList{} if err := m.ResourceManager.List(ctx, ratelimits, store.ListByMesh(dataplane.GetMeta().GetMesh())); err != nil { - return nil, errors.Wrap(err, "could not retrieve ratelimits") + return core_xds.RateLimitsMap{}, errors.Wrap(err, "could not retrieve ratelimits") } return buildRateLimitMap(dataplane, mesh, splitPoliciesBySourceMatch(ratelimits.Items)) @@ -40,18 +40,31 @@ func buildRateLimitMap( additionalInbounds, err := manager_dataplane.AdditionalInbounds(dataplane, mesh) if err != nil { - return nil, errors.Wrap(err, "could not fetch additional inbounds") + return core_xds.RateLimitsMap{}, errors.Wrap(err, "could not fetch additional inbounds") } inbounds := append(dataplane.Spec.GetNetworking().GetInbound(), additionalInbounds...) policyMap := policy.SelectInboundConnectionMatchingPolicies(dataplane, inbounds, policies) - result := core_xds.RateLimitsMap{} + result := core_xds.RateLimitsMap{ + Inbound: core_xds.InboundRateLimitsMap{}, + Outbound: core_xds.OutboundRateLimitsMap{}, + } for inbound, connectionPolicies := range policyMap { - result[inbound] = []*mesh_proto.RateLimit{} for _, policy := range connectionPolicies { - result[inbound] = append(result[inbound], policy.(*core_mesh.RateLimitResource).Spec) + result.Inbound[inbound] = append(result.Inbound[inbound], policy.(*core_mesh.RateLimitResource).Spec) + } + } + + outboundMap := policy.SelectOutboundConnectionPolicies(dataplane, policies) + + for _, outbound := range dataplane.Spec.GetNetworking().GetOutbound() { + serviceName := outbound.GetTagsIncludingLegacy()[mesh_proto.ServiceTag] + if policy, exists := outboundMap[serviceName]; exists { + oface := dataplane.Spec.GetNetworking().ToOutboundInterface(outbound) + result.Outbound[oface] = policy.(*core_mesh.RateLimitResource).Spec } } + return result, nil } diff --git a/pkg/core/ratelimits/matcher_test.go b/pkg/core/ratelimits/matcher_test.go index b2a9f198325d..89444be39b0d 100644 --- a/pkg/core/ratelimits/matcher_test.go +++ b/pkg/core/ratelimits/matcher_test.go @@ -36,6 +36,20 @@ var _ = Describe("Match", func() { } } + dataplaneWithOutboundsFunc := func(outbounds []*mesh_proto.Dataplane_Networking_Outbound) *mesh.DataplaneResource { + return &mesh.DataplaneResource{ + Meta: &model.ResourceMeta{ + Mesh: "default", + Name: "dp1", + }, + Spec: &mesh_proto.Dataplane{ + Networking: &mesh_proto.Dataplane_Networking{ + Outbound: outbounds, + }, + }, + } + } + policyWithDestinationsFunc := func(name string, creationTime time.Time, sources, destinations []*mesh_proto.Selector) *mesh.RateLimitResource { return &mesh.RateLimitResource{ Meta: &model.ResourceMeta{ @@ -77,12 +91,17 @@ var _ = Describe("Match", func() { allMatched, err := matcher.Match(context.Background(), given.dataplane, mesh) Expect(err).ToNot(HaveOccurred()) - for key := range allMatched { - Expect(len(allMatched[key])).To(Equal(len(given.expected[key]))) - for i, matched := range allMatched[key] { - Expect(matched).To(MatchProto(given.expected[key][i])) + inboundMatched := allMatched.Inbound + for key := range inboundMatched { + Expect(len(inboundMatched[key])).To(Equal(len(given.expected.Inbound[key]))) + for i, matched := range inboundMatched[key] { + Expect(matched).To(MatchProto(given.expected.Inbound[key][i])) } } + outboundMatched := allMatched.Outbound + for i, matched := range outboundMatched { + Expect(matched).To(MatchProto(given.expected.Outbound[i])) + } }, Entry("1 inbound dataplane, 2 policies", testCase{ dataplane: dataplaneWithInboundsFunc([]*mesh_proto.Dataplane_Networking_Inbound{ @@ -133,11 +152,84 @@ var _ = Describe("Match", func() { }), }, expected: core_xds.RateLimitsMap{ - mesh_proto.InboundInterface{ - WorkloadIP: "127.0.0.1", - WorkloadPort: 8080, - }: []*mesh_proto.RateLimit{ - policyWithDestinationsFunc("rl2", time.Unix(1, 0), + Inbound: core_xds.InboundRateLimitsMap{ + mesh_proto.InboundInterface{ + WorkloadIP: "127.0.0.1", + WorkloadPort: 8080, + }: []*mesh_proto.RateLimit{ + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + "kuma.io/protocol": "http", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + "kuma.io/protocol": "http", + }, + }, + }).Spec, + }}}}), + + Entry("1 outbound dataplane, 2 policies", testCase{ + dataplane: dataplaneWithOutboundsFunc([]*mesh_proto.Dataplane_Networking_Outbound{ + { + Port: 8080, + Tags: map[string]string{ + "kuma.io/service": "web", + "version": "0.1", + "region": "eu", + "kuma.io/protocol": "http", + }, + }, + }), + policies: []*mesh.RateLimitResource{ + policyWithDestinationsFunc("rl1", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + "kuma.io/protocol": "http", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "region": "us", + "kuma.io/protocol": "http", + }, + }, + }), + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + "kuma.io/protocol": "http", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + "kuma.io/protocol": "http", + }, + }, + }), + }, + expected: core_xds.RateLimitsMap{ + Outbound: core_xds.OutboundRateLimitsMap{ + mesh_proto.OutboundInterface{ + DataplaneIP: "127.0.0.1", + DataplanePort: 8080, + }: policyWithDestinationsFunc("rl2", time.Unix(1, 0), []*mesh_proto.Selector{ { Match: map[string]string{ @@ -154,7 +246,9 @@ var _ = Describe("Match", func() { }, }, }).Spec, - }}}), + }, + }, + }), Entry("should apply policy only to the first inbound", testCase{ dataplane: dataplaneWithInboundsFunc([]*mesh_proto.Dataplane_Networking_Inbound{ { @@ -196,10 +290,54 @@ var _ = Describe("Match", func() { }), }, expected: core_xds.RateLimitsMap{ - mesh_proto.InboundInterface{ - WorkloadIP: "127.0.0.1", - WorkloadPort: 8081, - }: []*mesh_proto.RateLimit{policyWithDestinationsFunc("rl1", time.Unix(1, 0), + Inbound: core_xds.InboundRateLimitsMap{ + mesh_proto.InboundInterface{ + WorkloadIP: "127.0.0.1", + WorkloadPort: 8081, + }: []*mesh_proto.RateLimit{policyWithDestinationsFunc("rl1", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + "kuma.io/protocol": "http", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "web-api", + "kuma.io/protocol": "http", + }, + }, + }).Spec, + }, + }, + }, + }), + Entry("should apply policy only to the first outbound", testCase{ + dataplane: dataplaneWithOutboundsFunc([]*mesh_proto.Dataplane_Networking_Outbound{ + { + Port: 8080, + Tags: map[string]string{ + "kuma.io/service": "web", + "version": "0.1", + "region": "eu", + "kuma.io/protocol": "http", + }, + }, + { + Port: 8081, + Tags: map[string]string{ + "kuma.io/service": "web-api", + "version": "0.1.2", + "region": "us", + "kuma.io/protocol": "http", + }, + }, + }), + policies: []*mesh.RateLimitResource{ + policyWithDestinationsFunc("rl1", time.Unix(1, 0), []*mesh_proto.Selector{ { Match: map[string]string{ @@ -215,11 +353,35 @@ var _ = Describe("Match", func() { "kuma.io/protocol": "http", }, }, - }).Spec, + }), + }, + expected: core_xds.RateLimitsMap{ + Outbound: core_xds.OutboundRateLimitsMap{ + mesh_proto.OutboundInterface{ + DataplaneIP: "127.0.0.1", + DataplanePort: 8081, + }: policyWithDestinationsFunc("rl1", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + "kuma.io/protocol": "http", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "web-api", + "kuma.io/protocol": "http", + }, + }, + }).Spec, }, }, }), - Entry("match 2 policies", testCase{ + + Entry("match 2 policies on inbound", testCase{ dataplane: dataplaneWithInboundsFunc([]*mesh_proto.Dataplane_Networking_Inbound{ { ServicePort: 8080, @@ -266,31 +428,101 @@ var _ = Describe("Match", func() { }), }, expected: core_xds.RateLimitsMap{ - mesh_proto.InboundInterface{ - WorkloadIP: "127.0.0.1", - WorkloadPort: 8080, - }: []*mesh_proto.RateLimit{ - policyWithDestinationsFunc("rl2", time.Unix(1, 0), - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "frontend", + Inbound: core_xds.InboundRateLimitsMap{ + mesh_proto.InboundInterface{ + WorkloadIP: "127.0.0.1", + WorkloadPort: 8080, + }: []*mesh_proto.RateLimit{ + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "frontend", + }, }, }, - }, - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "backend", - "kuma.io/protocol": "http", + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }).Spec, + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + }, }, }, - }).Spec, - policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }).Spec, + }}}}), + + Entry("match 2 policies on outbound", testCase{ + dataplane: dataplaneWithOutboundsFunc([]*mesh_proto.Dataplane_Networking_Outbound{ + { + Port: 8080, + Tags: map[string]string{ + "kuma.io/service": "backend", + "version": "0.1", + "region": "eu", + "kuma.io/protocol": "http", + }, + }, + }), + policies: []*mesh.RateLimitResource{ + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }), + policyWithDestinationsFunc("rl1", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "frontend", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }), + }, + expected: core_xds.RateLimitsMap{ + Outbound: core_xds.OutboundRateLimitsMap{ + mesh_proto.OutboundInterface{ + DataplaneIP: "127.0.0.1", + DataplanePort: 8080, + }: policyWithDestinationsFunc("rl2", time.Unix(1, 0), []*mesh_proto.Selector{ { Match: map[string]string{ - "kuma.io/service": "*", + "kuma.io/service": "frontend", }, }, }, @@ -302,8 +534,11 @@ var _ = Describe("Match", func() { }, }, }).Spec, - }}}), - Entry("match and sort 3 policies", testCase{ + }, + }, + }), + + Entry("match and sort 3 policies inbound", testCase{ dataplane: dataplaneWithInboundsFunc([]*mesh_proto.Dataplane_Networking_Inbound{ { ServicePort: 8080, @@ -372,64 +607,157 @@ var _ = Describe("Match", func() { }), }, expected: core_xds.RateLimitsMap{ - mesh_proto.InboundInterface{ - WorkloadIP: "127.0.0.1", - WorkloadPort: 8080, - }: []*mesh_proto.RateLimit{ - policyWithDestinationsFunc("rl3", time.Unix(1, 0), - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "frontend", - "kuma.io/zone": "eu", + Inbound: core_xds.InboundRateLimitsMap{ + mesh_proto.InboundInterface{ + WorkloadIP: "127.0.0.1", + WorkloadPort: 8080, + }: []*mesh_proto.RateLimit{ + policyWithDestinationsFunc("rl3", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "frontend", + "kuma.io/zone": "eu", + }, }, }, - }, - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "backend", - "kuma.io/protocol": "http", + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }).Spec, + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "frontend", + }, }, }, - }).Spec, - policyWithDestinationsFunc("rl2", time.Unix(1, 0), - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "frontend", + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }).Spec, + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "something_else", + }, }, }, - }, - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "backend", - "kuma.io/protocol": "http", + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }).Spec, + policyWithDestinationsFunc("rl1", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + }, }, }, - }).Spec, - policyWithDestinationsFunc("rl2", time.Unix(1, 0), - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "something_else", + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, }, + }).Spec, + }}}}), + + Entry("match and sort 3 policies outbound", testCase{ + dataplane: dataplaneWithOutboundsFunc([]*mesh_proto.Dataplane_Networking_Outbound{ + { + Port: 8080, + Tags: map[string]string{ + "kuma.io/service": "backend", + "version": "0.1", + "region": "eu", + "kuma.io/protocol": "http", + }, + }, + }), + policies: []*mesh.RateLimitResource{ + policyWithDestinationsFunc("rl1", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", }, }, - []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "backend", - "kuma.io/protocol": "http", - }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", }, - }).Spec, - policyWithDestinationsFunc("rl1", time.Unix(1, 0), + }, + }), + policyWithDestinationsFunc("rl2", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "frontend", + }, + }, + { + Match: map[string]string{ + "kuma.io/service": "something_else", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }), + policyWithDestinationsFunc("rl3", time.Unix(1, 0), + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "frontend", + "kuma.io/zone": "eu", + }, + }, + }, + []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend", + "kuma.io/protocol": "http", + }, + }, + }), + }, + expected: core_xds.RateLimitsMap{ + Outbound: core_xds.OutboundRateLimitsMap{ + mesh_proto.OutboundInterface{ + DataplaneIP: "127.0.0.1", + DataplanePort: 8080, + }: policyWithDestinationsFunc("rl3", time.Unix(1, 0), []*mesh_proto.Selector{ { Match: map[string]string{ - "kuma.io/service": "*", + "kuma.io/service": "frontend", + "kuma.io/zone": "eu", }, }, }, @@ -441,6 +769,9 @@ var _ = Describe("Match", func() { }, }, }).Spec, - }}}), + }, + }, + }, + ), ) }) diff --git a/pkg/core/resources/apis/mesh/external_service_validator.go b/pkg/core/resources/apis/mesh/external_service_validator.go index dbc41c25c1c4..cfa795721843 100644 --- a/pkg/core/resources/apis/mesh/external_service_validator.go +++ b/pkg/core/resources/apis/mesh/external_service_validator.go @@ -34,7 +34,7 @@ func validateExternalServiceNetworking(networking *mesh_proto.ExternalService_Ne if networking == nil { err.AddViolation("networking", "should have networking") } else { - err.Add(validateExtarnalServiceAddress(path, networking.Address)) + err.Add(validateExternalServiceAddress(path, networking.Address)) } if networking.GetTls().GetServerName() != nil && networking.GetTls().GetServerName().GetValue() == "" { @@ -43,7 +43,7 @@ func validateExternalServiceNetworking(networking *mesh_proto.ExternalService_Ne return err } -func validateExtarnalServiceAddress(path validators.PathBuilder, address string) validators.ValidationError { +func validateExternalServiceAddress(path validators.PathBuilder, address string) validators.ValidationError { var err validators.ValidationError if address == "" { err.AddViolationAt(path.Field("address"), "address can't be empty") diff --git a/pkg/core/runtime/reports/reports.go b/pkg/core/runtime/reports/reports.go index d5abf18c3cc6..9cd955a3e125 100644 --- a/pkg/core/runtime/reports/reports.go +++ b/pkg/core/runtime/reports/reports.go @@ -80,7 +80,7 @@ func fetchNumOfServices(rt core_runtime.Runtime) (int, int, error) { externalServicesList := mesh.ExternalServiceResourceList{} if err := rt.ReadOnlyResourceManager().List(context.Background(), &externalServicesList); err != nil { - return 0, 0, errors.Wrap(err, "coult not fetch external services") + return 0, 0, errors.Wrap(err, "could not fetch external services") } return internalServices, len(externalServicesList.Items), nil } diff --git a/pkg/core/xds/types.go b/pkg/core/xds/types.go index 8505cb055cac..8ddb6c92052e 100644 --- a/pkg/core/xds/types.go +++ b/pkg/core/xds/types.go @@ -100,8 +100,16 @@ type FaultInjectionMap map[mesh_proto.InboundInterface]*mesh_proto.FaultInjectio // TrafficPermissionMap holds the most specific TrafficPermissionResource for each InboundInterface type TrafficPermissionMap map[mesh_proto.InboundInterface]*core_mesh.TrafficPermissionResource -// RateLimitsMap holds all RateLimitResources for each InboundInterface -type RateLimitsMap map[mesh_proto.InboundInterface][]*mesh_proto.RateLimit +// InboundRateLimitsMap holds all RateLimitResources for each InboundInterface +type InboundRateLimitsMap map[mesh_proto.InboundInterface][]*mesh_proto.RateLimit + +// OutboundRateLimitsMap holds the RateLimitResource for each OutboundInterface +type OutboundRateLimitsMap map[mesh_proto.OutboundInterface]*mesh_proto.RateLimit + +type RateLimitsMap struct { + Inbound InboundRateLimitsMap + Outbound OutboundRateLimitsMap +} type CLACache interface { GetCLA(ctx context.Context, meshName, meshHash string, cluster envoy_common.Cluster, apiVersion envoy_common.APIVersion) (proto.Message, error) diff --git a/pkg/dns/vips_synchronizer.go b/pkg/dns/vips_synchronizer.go index fc0fab917e20..31ff25435702 100644 --- a/pkg/dns/vips_synchronizer.go +++ b/pkg/dns/vips_synchronizer.go @@ -50,7 +50,7 @@ func (d *vipsSynchronizer) Start(stop <-chan struct{}) error { select { case <-ticker.C: if err := d.synchronize(); err != nil { - vipsSynchronizerLog.Error(err, "unable to synchronise") + vipsSynchronizerLog.Error(err, "unable to synchronize") } case <-stop: vipsSynchronizerLog.Info("stopping") diff --git a/pkg/envoy/accesslog/v3/field_operator.go b/pkg/envoy/accesslog/v3/field_operator.go index 1b2aff605f47..b63d8bdd0aa2 100644 --- a/pkg/envoy/accesslog/v3/field_operator.go +++ b/pkg/envoy/accesslog/v3/field_operator.go @@ -70,19 +70,19 @@ func (f FieldOperator) FormatTcpLogEntry(entry *accesslog_data.TCPAccessLogEntry case CMD_BYTES_SENT: return f.formatUint(entry.GetConnectionProperties().GetSentBytes()) case CMD_PROTOCOL: - return "", nil // replicate Envoy's behaviour + return "", nil // replicate Envoy's behavior case CMD_RESPONSE_CODE: - return "0", nil // replicate Envoy's behaviour + return "0", nil // replicate Envoy's behavior case CMD_RESPONSE_CODE_DETAILS: - return "", nil // replicate Envoy's behaviour + return "", nil // replicate Envoy's behavior case CMD_REQUEST_DURATION: - return "", nil // replicate Envoy's behaviour + return "", nil // replicate Envoy's behavior case CMD_RESPONSE_DURATION: - return "", nil // replicate Envoy's behaviour + return "", nil // replicate Envoy's behavior case CMD_RESPONSE_TX_DURATION: - return "", nil // replicate Envoy's behaviour + return "", nil // replicate Envoy's behavior case CMD_GRPC_STATUS: - return "", nil // replace Envoy's behaviour + return "", nil // replace Envoy's behavior default: return f.formatAccessLogCommon(entry.GetCommonProperties()) } diff --git a/pkg/envoy/accesslog/v3/field_operator_test.go b/pkg/envoy/accesslog/v3/field_operator_test.go index f1bd305b0403..f8559efc78e7 100644 --- a/pkg/envoy/accesslog/v3/field_operator_test.go +++ b/pkg/envoy/accesslog/v3/field_operator_test.go @@ -251,19 +251,19 @@ var _ = Describe("FieldOperator", func() { }), Entry("PROTOCOL", testCase{ field: "PROTOCOL", - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("RESPONSE_CODE", testCase{ field: "RESPONSE_CODE", - expected: `0`, // replicate Envoy's behaviour + expected: `0`, // replicate Envoy's behavior }), Entry("RESPONSE_CODE_DETAILS", testCase{ field: "RESPONSE_CODE_DETAILS", - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("REQUEST_DURATION: ``", testCase{ field: "REQUEST_DURATION", - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("REQUEST_DURATION: `57` millis", testCase{ field: "REQUEST_DURATION", @@ -272,11 +272,11 @@ var _ = Describe("FieldOperator", func() { TimeToLastRxByte: util_proto.Duration(57000 * time.Microsecond), }, }, - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("RESPONSE_DURATION: ``", testCase{ field: "RESPONSE_DURATION", - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("RESPONSE_DURATION: `102` millis", testCase{ field: "RESPONSE_DURATION", @@ -285,11 +285,11 @@ var _ = Describe("FieldOperator", func() { TimeToFirstUpstreamRxByte: util_proto.Duration(102000 * time.Microsecond), }, }, - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("RESPONSE_TX_DURATION: ``", testCase{ field: "RESPONSE_TX_DURATION", - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("RESPONSE_TX_DURATION: no TimeToFirstUpstreamRxByte", testCase{ field: "RESPONSE_TX_DURATION", @@ -298,7 +298,7 @@ var _ = Describe("FieldOperator", func() { TimeToLastDownstreamTxByte: util_proto.Duration(123000 * time.Microsecond), }, }, - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("RESPONSE_TX_DURATION: no TimeToLastDownstreamTxByte", testCase{ field: "RESPONSE_TX_DURATION", @@ -307,7 +307,7 @@ var _ = Describe("FieldOperator", func() { TimeToFirstUpstreamRxByte: util_proto.Duration(102000 * time.Microsecond), }, }, - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), Entry("RESPONSE_TX_DURATION: `23` millis", testCase{ field: "RESPONSE_TX_DURATION", @@ -317,7 +317,7 @@ var _ = Describe("FieldOperator", func() { TimeToLastDownstreamTxByte: util_proto.Duration(123000 * time.Microsecond), }, }, - expected: ``, // replicate Envoy's behaviour + expected: ``, // replicate Envoy's behavior }), ) }) diff --git a/pkg/envoy/accesslog/v3/format.go b/pkg/envoy/accesslog/v3/format.go index b8b8938a5896..fb7749efda34 100644 --- a/pkg/envoy/accesslog/v3/format.go +++ b/pkg/envoy/accesslog/v3/format.go @@ -8,7 +8,7 @@ import ( ) const ( - unspecifiedValue = "-" // to replicate Envoy's behaviour + unspecifiedValue = "-" // to replicate Envoy's behavior ) // AccessLogFormat represents the entire access log format string. @@ -24,7 +24,7 @@ func (f *AccessLogFormat) FormatHttpLogEntry(entry *accesslog_data.HTTPAccessLog return "", err } if value == "" { - value = unspecifiedValue // to replicate Envoy's behaviour + value = unspecifiedValue // to replicate Envoy's behavior } values[i] = value } @@ -39,7 +39,7 @@ func (f *AccessLogFormat) FormatTcpLogEntry(entry *accesslog_data.TCPAccessLogEn return "", err } if value == "" { - value = unspecifiedValue // to replicate Envoy's behaviour + value = unspecifiedValue // to replicate Envoy's behavior } values[i] = value } diff --git a/pkg/envoy/accesslog/v3/format_parser_test.go b/pkg/envoy/accesslog/v3/format_parser_test.go index 8c874e9d7156..4a9a2de5ba01 100644 --- a/pkg/envoy/accesslog/v3/format_parser_test.go +++ b/pkg/envoy/accesslog/v3/format_parser_test.go @@ -160,17 +160,17 @@ var _ = Describe("ParseFormat()", func() { Entry("%PROTOCOL%", testCase{ format: `%PROTOCOL%`, expectedHTTP: `HTTP/1.1`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESPONSE_CODE%", testCase{ format: `%RESPONSE_CODE%`, expectedHTTP: `200`, - expectedTCP: `0`, // replicate Envoy's behaviour + expectedTCP: `0`, // replicate Envoy's behavior }), Entry("%RESPONSE_CODE_DETAILS%", testCase{ format: `%RESPONSE_CODE_DETAILS%`, expectedHTTP: `response code details`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%BYTES_SENT%", testCase{ format: `%BYTES_SENT%`, @@ -180,17 +180,17 @@ var _ = Describe("ParseFormat()", func() { Entry("%REQUEST_DURATION%", testCase{ format: `%REQUEST_DURATION%`, expectedHTTP: `57`, // time in millis - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESPONSE_DURATION%", testCase{ format: `%RESPONSE_DURATION%`, expectedHTTP: `102`, // time in millis - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESPONSE_TX_DURATION%", testCase{ format: `%RESPONSE_TX_DURATION%`, expectedHTTP: `21`, // time in millis - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%UPSTREAM_TRANSPORT_FAILURE_REASON%", testCase{ format: `%UPSTREAM_TRANSPORT_FAILURE_REASON%`, @@ -209,153 +209,153 @@ var _ = Describe("ParseFormat()", func() { }), Entry("%REQ()%", testCase{ // apparently, Envoy allows both `Header` and `AltHeader` to be empty format: `%REQ()%`, - expectedHTTP: `-`, // replicate Envoy's behaviour - expectedTCP: `-`, // replicate Envoy's behaviour + expectedHTTP: `-`, // replicate Envoy's behavior + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ():10%", testCase{ // apparently, Envoy allows both `Header` and `AltHeader` to be empty format: `%REQ():10%`, - expectedHTTP: `-`, // replicate Envoy's behaviour - expectedTCP: `-`, // replicate Envoy's behaviour + expectedHTTP: `-`, // replicate Envoy's behavior + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(:authority)%", testCase{ // pseudo header format: `%REQ(:authority)%`, expectedHTTP: `backend.internal:8080`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(:authority):7%", testCase{ // max length format: `%REQ(:authority):7%`, expectedHTTP: `backend`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(x-missing-header?:authority)%", testCase{ // altHeader format: `%REQ(x-missing-header?:authority)%`, expectedHTTP: `backend.internal:8080`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(x-missing-header?:authority):7%", testCase{ // altHeader w/ maxLen format: `%REQ(x-missing-header?:authority):7%`, expectedHTTP: `backend`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(x-missing-header?:AUTHORITY):7%", testCase{ // uppercase altHeader w/ maxLen format: `%REQ(x-missing-header?:AUTHORITY):7%`, expectedHTTP: `backend`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(:authority?:path)%", testCase{ // header over altHeader format: `%REQ(:authority?:path)%`, expectedHTTP: `backend.internal:8080`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(:authority?:path):7%", testCase{ // header over altHeader w/ maxLen format: `%REQ(:authority?:path):7%`, expectedHTTP: `backend`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%REQ(:AUTHORITY?:path):7%", testCase{ // uppercase header over altHeader w/ maxLen format: `%REQ(:AUTHORITY?:path):7%`, expectedHTTP: `backend`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP()%", testCase{ // apparently, Envoy allows both `Header` and `AltHeader` to be empty format: `%RESP()%`, - expectedHTTP: `-`, // replicate Envoy's behaviour - expectedTCP: `-`, // replicate Envoy's behaviour + expectedHTTP: `-`, // replicate Envoy's behavior + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP():10%", testCase{ // apparently, Envoy allows both `Header` and `AltHeader` to be empty format: `%RESP():10%`, - expectedHTTP: `-`, // replicate Envoy's behaviour - expectedTCP: `-`, // replicate Envoy's behaviour + expectedHTTP: `-`, // replicate Envoy's behavior + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(server)%", testCase{ // pseudo header format: `%RESP(server)%`, expectedHTTP: `Tomcat`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(server):3%", testCase{ // max length format: `%RESP(server):3%`, expectedHTTP: `Tom`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(x-missing-header?server)%", testCase{ // altHeader format: `%RESP(x-missing-header?server)%`, expectedHTTP: `Tomcat`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(x-missing-header?server):3%", testCase{ // altHeader w/ maxLen format: `%RESP(x-missing-header?server):3%`, expectedHTTP: `Tom`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(x-missing-header?SERVER):3%", testCase{ // uppercase altHeader w/ maxLen format: `%RESP(x-missing-header?SERVER):3%`, expectedHTTP: `Tom`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(server?content-type)%", testCase{ // header over altHeader format: `%RESP(server?:content-type)%`, expectedHTTP: `Tomcat`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(server?content-type):3%", testCase{ // header over altHeader w/ maxLen format: `%RESP(server?content-type):3%`, expectedHTTP: `Tom`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%RESP(SERVER?content-type):3%", testCase{ // uppercase header over altHeader w/ maxLen format: `%RESP(SERVER?content-type):3%`, expectedHTTP: `Tom`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER()%", testCase{ // apparently, Envoy allows both `Header` and `AltHeader` to be empty format: `%TRAILER()%`, - expectedHTTP: `-`, // replicate Envoy's behaviour - expectedTCP: `-`, // replicate Envoy's behaviour + expectedHTTP: `-`, // replicate Envoy's behavior + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER():10%", testCase{ // apparently, Envoy allows both `Header` and `AltHeader` to be empty format: `%TRAILER():10%`, - expectedHTTP: `-`, // replicate Envoy's behaviour - expectedTCP: `-`, // replicate Envoy's behaviour + expectedHTTP: `-`, // replicate Envoy's behavior + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(grpc-status)%", testCase{ // pseudo header format: `%TRAILER(grpc-status)%`, expectedHTTP: `14`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(grpc-status):1%", testCase{ // max length format: `%TRAILER(grpc-status):1%`, expectedHTTP: `1`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(x-missing-header?grpc-status)%", testCase{ // altHeader format: `%TRAILER(x-missing-header?grpc-status)%`, expectedHTTP: `14`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(x-missing-header?grpc-status):1%", testCase{ // altHeader w/ maxLen format: `%TRAILER(x-missing-header?grpc-status):1%`, expectedHTTP: `1`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(x-missing-header?GRPC-STATUS):1%", testCase{ // uppercase altHeader w/ maxLen format: `%TRAILER(x-missing-header?GRPC-STATUS):1%`, expectedHTTP: `1`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(grpc-status?grpc-message)%", testCase{ // header over altHeader format: `%TRAILER(grpc-status?:grpc-message)%`, expectedHTTP: `14`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(grpc-status?grpc-message):1%", testCase{ // header over altHeader w/ maxLen format: `%TRAILER(grpc-status?grpc-message):1%`, expectedHTTP: `1`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%TRAILER(GRPC-STATUS?grpc-message):1%", testCase{ // uppercase header over altHeader w/ maxLen format: `%TRAILER(GRPC-STATUS?grpc-message):1%`, expectedHTTP: `1`, - expectedTCP: `-`, // replicate Envoy's behaviour + expectedTCP: `-`, // replicate Envoy's behavior }), Entry("%DYNAMIC_METADATA()%", testCase{ // apparently, Envoy allows both `FilterNamespace` and `Path` to be empty format: `%DYNAMIC_METADATA()%`, diff --git a/pkg/kds/server/type_adjust_callbacks.go b/pkg/kds/server/type_adjust_callbacks.go index a09f8e0464c0..6e46ac7c3d66 100644 --- a/pkg/kds/server/type_adjust_callbacks.go +++ b/pkg/kds/server/type_adjust_callbacks.go @@ -11,9 +11,9 @@ import ( // We are setting TypeURL for DiscoveryRequest/DiscoveryResponse for our resource name like "TrafficRoute" / "Mesh" etc. // but the actual resource which we are sending is kuma.mesh.v1alpha1.KumaResource // -// The function which is marshalling DiscoveryResponse +// The function which is marshaling DiscoveryResponse // func (r *RawResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) -// Ignores the TypeURL from marshalling operation and overrides it with TypeURL of the request. +// Ignores the TypeURL from marshaling operation and overrides it with TypeURL of the request. // If we pass wrong TypeURL in envoy_api.DiscoveryResponse#Resources we won't be able to unmarshall it, therefore we need to adjust the type. type typeAdjustCallbacks struct { util_xds_v3.NoopCallbacks diff --git a/pkg/mads/mads.go b/pkg/mads/mads.go index cb4642a949a0..f21b93eb34f7 100644 --- a/pkg/mads/mads.go +++ b/pkg/mads/mads.go @@ -3,6 +3,5 @@ package mads type ApiVersion = string const ( - API_V1 = "v1" - API_V1_ALPHA1 = "v1alpha1" + API_V1 = "v1" ) diff --git a/pkg/mads/server/server.go b/pkg/mads/server/server.go index 7fda0fe77015..830e975201cc 100644 --- a/pkg/mads/server/server.go +++ b/pkg/mads/server/server.go @@ -20,7 +20,6 @@ import ( "github.com/kumahq/kuma/pkg/core/runtime/component" "github.com/kumahq/kuma/pkg/mads" mads_v1 "github.com/kumahq/kuma/pkg/mads/v1/service" - mads_v1alpha1 "github.com/kumahq/kuma/pkg/mads/v1alpha1/service" core_metrics "github.com/kumahq/kuma/pkg/metrics" util_prometheus "github.com/kumahq/kuma/pkg/util/prometheus" ) @@ -193,12 +192,6 @@ func SetupServer(rt core_runtime.Runtime) error { var grpcServices []GrpcService var httpServices []HttpService - if config.VersionIsEnabled(mads.API_V1_ALPHA1) { - log.Info("MADS v1alpha1 is enabled") - svc := mads_v1alpha1.NewService(config, rm, log.WithValues("apiVersion", mads.API_V1_ALPHA1)) - grpcServices = append(grpcServices, svc) - } - if config.VersionIsEnabled(mads.API_V1) { log.Info("MADS v1 is enabled") svc := mads_v1.NewService(config, rm, log.WithValues("apiVersion", mads.API_V1)) diff --git a/pkg/mads/v1/cache/snapshot_test.go b/pkg/mads/v1/cache/snapshot_test.go index a45bdc4f6372..6f654ff58c39 100644 --- a/pkg/mads/v1/cache/snapshot_test.go +++ b/pkg/mads/v1/cache/snapshot_test.go @@ -5,13 +5,13 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" - . "github.com/kumahq/kuma/pkg/mads/v1alpha1/cache" + observability_proto "github.com/kumahq/kuma/api/observability/v1" + . "github.com/kumahq/kuma/pkg/mads/v1/cache" ) var _ = Describe("Snapshot", func() { - expectedType := "type.googleapis.com/kuma.observability.v1alpha1.MonitoringAssignment" + expectedType := "type.googleapis.com/kuma.observability.v1.MonitoringAssignment" Describe("GetSupportedTypes()", func() { It("should always return ['type.googleapis.com/kuma.observability.v1alpha1.MonitoringAssignment']", func() { @@ -44,7 +44,8 @@ var _ = Describe("Snapshot", func() { // when snapshot = NewSnapshot("v2", map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, }) // then @@ -64,7 +65,8 @@ var _ = Describe("Snapshot", func() { // given assignments := map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, } // when @@ -77,7 +79,8 @@ var _ = Describe("Snapshot", func() { // given assignments := map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, } // when @@ -99,7 +102,8 @@ var _ = Describe("Snapshot", func() { // given assignments := map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, } // when @@ -112,7 +116,8 @@ var _ = Describe("Snapshot", func() { // given assignments := map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, } // when @@ -136,7 +141,8 @@ var _ = Describe("Snapshot", func() { // given assignments := map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, } snapshot := NewSnapshot("v1", assignments) @@ -152,7 +158,8 @@ var _ = Describe("Snapshot", func() { // given assignments := map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, } snapshot := NewSnapshot("v1", assignments) @@ -168,7 +175,8 @@ var _ = Describe("Snapshot", func() { // given assignments := map[string]envoy_types.Resource{ "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", + Mesh: "default", + Service: "backend", }, } snapshot := NewSnapshot("v1", assignments) diff --git a/pkg/mads/v1alpha1/cache/cache_suite_test.go b/pkg/mads/v1alpha1/cache/cache_suite_test.go deleted file mode 100644 index 490ff0a76caf..000000000000 --- a/pkg/mads/v1alpha1/cache/cache_suite_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package cache_test - -import ( - "testing" - - "github.com/kumahq/kuma/pkg/test" -) - -func TestCache(t *testing.T) { - test.RunSpecs(t, "Cache Suite") -} diff --git a/pkg/mads/v1alpha1/cache/snapshot.go b/pkg/mads/v1alpha1/cache/snapshot.go deleted file mode 100644 index 53f4b8e919be..000000000000 --- a/pkg/mads/v1alpha1/cache/snapshot.go +++ /dev/null @@ -1,102 +0,0 @@ -package cache - -import ( - envoy_types "github.com/envoyproxy/go-control-plane/pkg/cache/types" - envoy_cache "github.com/envoyproxy/go-control-plane/pkg/cache/v2" - "github.com/pkg/errors" - - "github.com/kumahq/kuma/pkg/mads/v1alpha1" - util_xds "github.com/kumahq/kuma/pkg/util/xds" -) - -// NewSnapshot creates a snapshot from response types and a version. -func NewSnapshot(version string, assignments map[string]envoy_types.Resource) *Snapshot { - withTtl := make(map[string]envoy_types.ResourceWithTtl, len(assignments)) - for name, res := range assignments { - withTtl[name] = envoy_types.ResourceWithTtl{ - Resource: res, - } - } - return &Snapshot{ - MonitoringAssignments: envoy_cache.Resources{Version: version, Items: withTtl}, - } -} - -// Snapshot is an internally consistent snapshot of xDS resources. -type Snapshot struct { - MonitoringAssignments envoy_cache.Resources -} - -var _ util_xds.Snapshot = &Snapshot{} - -// GetSupportedTypes returns a list of xDS types supported by this snapshot. -func (s *Snapshot) GetSupportedTypes() []string { - return []string{v1alpha1.MonitoringAssignmentType} -} - -// Consistent check verifies that the dependent resources are exactly listed in the -// snapshot. -func (s *Snapshot) Consistent() error { - if s == nil { - return errors.New("nil snapshot") - } - return nil -} - -// GetResources selects snapshot resources by type. -func (s *Snapshot) GetResources(typ string) map[string]envoy_types.Resource { - if s == nil { - return nil - } - - resources := s.GetResourcesAndTtl(typ) - if resources == nil { - return nil - } - - withoutTtl := make(map[string]envoy_types.Resource, len(resources)) - for name, res := range resources { - withoutTtl[name] = res.Resource - } - return withoutTtl -} - -func (s *Snapshot) GetResourcesAndTtl(typ string) map[string]envoy_types.ResourceWithTtl { - if s == nil { - return nil - } - switch typ { - case v1alpha1.MonitoringAssignmentType: - return s.MonitoringAssignments.Items - } - return nil -} - -// GetVersion returns the version for a resource type. -func (s *Snapshot) GetVersion(typ string) string { - if s == nil { - return "" - } - switch typ { - case v1alpha1.MonitoringAssignmentType: - return s.MonitoringAssignments.Version - } - return "" -} - -// WithVersion creates a new snapshot with a different version for a given resource type. -func (s *Snapshot) WithVersion(typ string, version string) util_xds.Snapshot { - if s == nil { - return nil - } - if s.GetVersion(typ) == version { - return s - } - switch typ { - case v1alpha1.MonitoringAssignmentType: - return &Snapshot{ - MonitoringAssignments: envoy_cache.Resources{Version: version, Items: s.MonitoringAssignments.Items}, - } - } - return s -} diff --git a/pkg/mads/v1alpha1/cache/snapshot_test.go b/pkg/mads/v1alpha1/cache/snapshot_test.go deleted file mode 100644 index a45bdc4f6372..000000000000 --- a/pkg/mads/v1alpha1/cache/snapshot_test.go +++ /dev/null @@ -1,183 +0,0 @@ -package cache_test - -import ( - envoy_types "github.com/envoyproxy/go-control-plane/pkg/cache/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" - . "github.com/kumahq/kuma/pkg/mads/v1alpha1/cache" -) - -var _ = Describe("Snapshot", func() { - - expectedType := "type.googleapis.com/kuma.observability.v1alpha1.MonitoringAssignment" - - Describe("GetSupportedTypes()", func() { - It("should always return ['type.googleapis.com/kuma.observability.v1alpha1.MonitoringAssignment']", func() { - // when - var snapshot *Snapshot - // then - Expect(snapshot.GetSupportedTypes()).To(Equal([]string{expectedType})) - - // when - snapshot = &Snapshot{} - // then - Expect(snapshot.GetSupportedTypes()).To(Equal([]string{expectedType})) - }) - }) - - Describe("Consistent()", func() { - It("should handle `nil`", func() { - // when - var snapshot *Snapshot - // then - Expect(snapshot.Consistent()).To(MatchError("nil snapshot")) - }) - - It("non-`nil` snapshot should be always consistet", func() { - // when - snapshot := NewSnapshot("v1", nil) - // then - Expect(snapshot.Consistent()).To(BeNil()) - - // when - snapshot = NewSnapshot("v2", map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - }) - // then - Expect(snapshot.Consistent()).To(BeNil()) - }) - }) - - Describe("GetResources()", func() { - It("should handle `nil`", func() { - // when - var snapshot *Snapshot - // then - Expect(snapshot.GetResources(expectedType)).To(BeNil()) - }) - - It("should return MonitoringAssignments", func() { - // given - assignments := map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - } - // when - snapshot := NewSnapshot("v1", assignments) - // then - Expect(snapshot.GetResources(expectedType)).To(Equal(assignments)) - }) - - It("should return `nil` for unsupported resource types", func() { - // given - assignments := map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - } - // when - snapshot := NewSnapshot("v1", assignments) - // then - Expect(snapshot.GetResources("unsupported type")).To(BeNil()) - }) - }) - - Describe("GetVersion()", func() { - It("should handle `nil`", func() { - // when - var snapshot *Snapshot - // then - Expect(snapshot.GetVersion(expectedType)).To(Equal("")) - }) - - It("should return proper version for a supported resource type", func() { - // given - assignments := map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - } - // when - snapshot := NewSnapshot("v1", assignments) - // then - Expect(snapshot.GetVersion(expectedType)).To(Equal("v1")) - }) - - It("should return an empty string for unsupported resource type", func() { - // given - assignments := map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - } - // when - snapshot := NewSnapshot("v1", assignments) - // then - Expect(snapshot.GetVersion("unsupported type")).To(Equal("")) - }) - }) - - Describe("WithVersion()", func() { - It("should handle `nil`", func() { - // given - var snapshot *Snapshot - // when - actual := snapshot.WithVersion(expectedType, "v1") - // then - Expect(actual).To(BeNil()) - }) - - It("should return a new snapshot if version has changed", func() { - // given - assignments := map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - } - snapshot := NewSnapshot("v1", assignments) - // when - actual := snapshot.WithVersion(expectedType, "v2") - // then - Expect(actual.GetVersion(expectedType)).To(Equal("v2")) - // and - Expect(actual).To(Equal(NewSnapshot("v2", assignments))) - }) - - It("should return the same snapshot if version has not changed", func() { - // given - assignments := map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - } - snapshot := NewSnapshot("v1", assignments) - // when - actual := snapshot.WithVersion(expectedType, "v1") - // then - Expect(actual.GetVersion(expectedType)).To(Equal("v1")) - // and - Expect(actual).To(BeIdenticalTo(snapshot)) - }) - - It("should return the same snapshot if resource type is not supported", func() { - // given - assignments := map[string]envoy_types.Resource{ - "backend": &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend", - }, - } - snapshot := NewSnapshot("v1", assignments) - // when - actual := snapshot.WithVersion("unsupported type", "v2") - // then - Expect(actual.GetVersion(expectedType)).To(Equal("v1")) - // and - Expect(actual).To(BeIdenticalTo(snapshot)) - }) - }) -}) diff --git a/pkg/mads/v1alpha1/client/client.go b/pkg/mads/v1alpha1/client/client.go deleted file mode 100644 index 9042eb846354..000000000000 --- a/pkg/mads/v1alpha1/client/client.go +++ /dev/null @@ -1,137 +0,0 @@ -package client - -import ( - "context" - "crypto/tls" - "fmt" - "net/url" - - envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" - envoy_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - "github.com/pkg/errors" - "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/metadata" - - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" - "github.com/kumahq/kuma/pkg/mads/v1alpha1" - util_proto "github.com/kumahq/kuma/pkg/util/proto" -) - -type Client struct { - conn *grpc.ClientConn - client observability_proto.MonitoringAssignmentDiscoveryServiceClient -} - -type Stream struct { - stream observability_proto.MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsClient - latestACKed *envoy.DiscoveryResponse - latestReceived *envoy.DiscoveryResponse -} - -func New(serverURL string) (*Client, error) { - url, err := url.Parse(serverURL) - if err != nil { - return nil, err - } - var dialOpts []grpc.DialOption - switch url.Scheme { - case "grpc": - dialOpts = append(dialOpts, grpc.WithInsecure()) - case "grpcs": - dialOpts = append(dialOpts, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{ - InsecureSkipVerify: true, // it's acceptable since we don't pass any secrets to the server - }))) - default: - return nil, errors.Errorf("unsupported scheme %q. Use one of %s", url.Scheme, []string{"grpc", "grpcs"}) - } - conn, err := grpc.Dial(url.Host, dialOpts...) - if err != nil { - return nil, err - } - client := observability_proto.NewMonitoringAssignmentDiscoveryServiceClient(conn) - return &Client{ - conn: conn, - client: client, - }, nil -} - -func (c *Client) StartStream() (*Stream, error) { - ctx := metadata.NewOutgoingContext(context.Background(), metadata.MD{}) - stream, err := c.client.StreamMonitoringAssignments(ctx) - if err != nil { - return nil, err - } - return &Stream{ - stream: stream, - }, nil -} - -func (c *Client) Close() error { - return c.conn.Close() -} - -func (s *Stream) RequestAssignments(clientId string) error { - return s.stream.Send(&envoy.DiscoveryRequest{ - VersionInfo: "", - ResponseNonce: "", - Node: &envoy_core.Node{ - Id: clientId, - }, - ResourceNames: []string{}, - TypeUrl: v1alpha1.MonitoringAssignmentType, - }) -} - -func (s *Stream) ACK() error { - if s.latestReceived == nil { - return nil - } - err := s.stream.Send(&envoy.DiscoveryRequest{ - VersionInfo: s.latestReceived.VersionInfo, - ResponseNonce: s.latestReceived.Nonce, - ResourceNames: []string{}, - TypeUrl: v1alpha1.MonitoringAssignmentType, - }) - if err == nil { - s.latestACKed = s.latestReceived - } - return err -} - -func (s *Stream) NACK(err error) error { - if s.latestReceived == nil { - return nil - } - return s.stream.Send(&envoy.DiscoveryRequest{ - VersionInfo: s.latestACKed.GetVersionInfo(), - ResponseNonce: s.latestReceived.Nonce, - ResourceNames: []string{}, - TypeUrl: v1alpha1.MonitoringAssignmentType, - ErrorDetail: &status.Status{ - Message: fmt.Sprintf("%s", err), - }, - }) -} - -func (s *Stream) WaitForAssignments() ([]*observability_proto.MonitoringAssignment, error) { - resp, err := s.stream.Recv() - if err != nil { - return nil, err - } - s.latestReceived = resp - assignments := make([]*observability_proto.MonitoringAssignment, len(resp.Resources)) - for i := range resp.Resources { - assignment := &observability_proto.MonitoringAssignment{} - if err := util_proto.UnmarshalAnyTo(resp.Resources[i], assignment); err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal MADS response: %v", resp) - } - assignments[i] = assignment - } - return assignments, nil -} - -func (s *Stream) Close() error { - return s.stream.CloseSend() -} diff --git a/pkg/mads/v1alpha1/generator/assignments.go b/pkg/mads/v1alpha1/generator/assignments.go deleted file mode 100644 index c4292f67aee4..000000000000 --- a/pkg/mads/v1alpha1/generator/assignments.go +++ /dev/null @@ -1,149 +0,0 @@ -package generator - -import ( - prom "github.com/prometheus/common/model" - - mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" - observability_v1alpha1 "github.com/kumahq/kuma/api/observability/v1alpha1" - "github.com/kumahq/kuma/pkg/core" - core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" - core_xds "github.com/kumahq/kuma/pkg/core/xds" - "github.com/kumahq/kuma/pkg/mads" - "github.com/kumahq/kuma/pkg/mads/generator" -) - -const ( - // meshLabel is the name of the label that holds the mesh name. - meshLabel = "mesh" - // dataplaneLabel is the name of the label that holds the dataplane name. - dataplaneLabel = "dataplane" -) - -var log = core.Log.WithName("mads").WithName("generator") - -// MonitoringAssignmentsGenerator knows how to generate MonitoringAssignment -// resources for a given set of Dataplanes. -// -// Beware of the following constraints when it comes to integration with Prometheus: -// -// 1. Prometheus model for all `sd`s except for `file_sd` looks like this: -// -// // Group is a set of targets with a common label set(production , test, staging etc.). -// type Group struct { -// // Targets is a list of targets identified by a label set. Each target is -// // uniquely identifiable in the group by its address label. -// Targets []model.LabelSet -// // Labels is a set of labels that is common across all targets in the group. -// Labels model.LabelSet -// -// // Source is an identifier that describes a group of targets. -// Source string -// } -// -// That is why Kuma's MonitoringAssignment was designed to be close to that model. -// -// 2. However, `file_sd` uses different model for reading data from a file: -// -// struct { -// Targets []string `yaml:"targets"` -// Labels model.LabelSet `yaml:"labels"` -// } -// -// Notice that Targets is just a list of addresses rather than a list of model.LabelSet. -// -// 3. Because of that mismatch, some form of conversion is unavoidable on client side, -// e.g. inside `kuma-prometheus-sd` -// -// 4. The next component that imposes its constraints is `custom-sd`- adapter -// (https://github.com/prometheus/prometheus/tree/master/documentation/examples/custom-sd) -// that is recommended for use by all `file_sd`-based `sd`s. -// -// This adapter is doing conversion from Prometheus model into `file_sd` model -// and it expects that `Targets` field has only 1 label - `__address__` - -// and the rest of the labels must be a part of `Labels` field. -// -// 5. Therefore, we need to convert MonitoringAssignment into a model that `custom-sd` expects. -// It could happen on server side, it could happen on client side. -// Given that we're trying to minimize amount of logic on the client side, -// the choice was made in favour of server side. -// -// In practice, it means that generated MonitoringAssignment will look the following way: -// -// name: /meshes/default/dataplanes/backend-01 -// targets: -// - labels: -// __address__: 192.168.0.1:8080 -// labels: -// __scheme__: http -// __metrics_path__: /metrics -// job: backend -// instance: backend-01 -// mesh: default -// dataplane: backend-01 -// env: prod -// envs: ,prod, -// service: backend -// services: ,backend, -// -type MonitoringAssignmentsGenerator struct { -} - -// Generate implements mads.ResourceGenerator -func (g MonitoringAssignmentsGenerator) Generate(args generator.Args) ([]*core_xds.Resource, error) { - meshIndex := mads.IndexMeshes(args.Meshes) - - resources := make([]*core_xds.Resource, 0, len(args.Dataplanes)) - for _, dataplane := range args.Dataplanes { - mesh, exist := meshIndex[dataplane.Meta.GetMesh()] - if !exist { - // might be the case when the entire mesh is in the process of being deleted - continue - } - - prometheusEndpoint, err := dataplane.GetPrometheusEndpoint(mesh) - if err != nil { - log.Info("could not get prometheus endpoint from the dataplane", err) - // does not return error to not break MADS for other dataplanes - continue - } - - if prometheusEndpoint == nil { - // Prometheus metrics are not enabled on that Mesh - continue - } - - assignment := &observability_v1alpha1.MonitoringAssignment{ - Name: mads.DataplaneAssignmentName(dataplane), - Targets: []*observability_v1alpha1.MonitoringAssignment_Target{{ - Labels: g.addressLabel(dataplane, prometheusEndpoint), - }}, - Labels: g.dataplaneLabels(dataplane, prometheusEndpoint), - } - - resources = append(resources, &core_xds.Resource{ - Name: assignment.Name, - Resource: assignment, - }) - } - - return resources, nil -} - -func (_ MonitoringAssignmentsGenerator) addressLabel(dataplane *core_mesh.DataplaneResource, endpoint *mesh_proto.PrometheusMetricsBackendConfig) map[string]string { - return map[string]string{ - prom.AddressLabel: mads.Address(dataplane, endpoint), - } -} - -func (g MonitoringAssignmentsGenerator) dataplaneLabels(dataplane *core_mesh.DataplaneResource, endpoint *mesh_proto.PrometheusMetricsBackendConfig) map[string]string { - labels := mads.DataplaneLabels(dataplane) - // then, we apply mandatory Prometheus labels on top - labels[prom.SchemeLabel] = "http" - labels[prom.MetricsPathLabel] = endpoint.GetPath() - labels[prom.JobLabel] = dataplane.Spec.GetIdentifyingService() - labels[prom.InstanceLabel] = dataplane.Meta.GetName() - labels[meshLabel] = dataplane.Meta.GetMesh() - labels[dataplaneLabel] = dataplane.Meta.GetName() - // notice that `service` tag is handled as part of user-defined tags - return labels -} diff --git a/pkg/mads/v1alpha1/generator/assignments_test.go b/pkg/mads/v1alpha1/generator/assignments_test.go deleted file mode 100644 index 3b44e22a0238..000000000000 --- a/pkg/mads/v1alpha1/generator/assignments_test.go +++ /dev/null @@ -1,621 +0,0 @@ -package generator_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" - - mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" - core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" - core_model "github.com/kumahq/kuma/pkg/core/resources/model" - core_xds "github.com/kumahq/kuma/pkg/core/xds" - mads_generator "github.com/kumahq/kuma/pkg/mads/generator" - . "github.com/kumahq/kuma/pkg/mads/v1alpha1/generator" - test_model "github.com/kumahq/kuma/pkg/test/resources/model" - "github.com/kumahq/kuma/pkg/util/proto" -) - -var _ = Describe("MonitoringAssignmentsGenerator", func() { - - Describe("Generate()", func() { - - type testCase struct { - meshes []*core_mesh.MeshResource - dataplanes []*core_mesh.DataplaneResource - expected []*core_xds.Resource - } - - DescribeTable("should generate proper MonitoringAssignment resources", - func(given testCase) { - // setup - generator := MonitoringAssignmentsGenerator{} - // when - resources, err := generator.Generate(mads_generator.Args{ - Meshes: given.meshes, - Dataplanes: given.dataplanes, - }) - // then - Expect(err).ToNot(HaveOccurred()) - // and - Expect(resources).To(Equal(given.expected)) - }, - Entry("no Meshes, no Dataplanes", testCase{ - expected: []*core_xds.Resource{}, - }), - Entry("Dataplane without Mesh", testCase{ - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - }, - }}, - }, - }, - }, - }, - expected: []*core_xds.Resource{}, - }), - Entry("Dataplane inside a Mesh without Prometheus enabled", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{}, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - }, - }}, - }, - Metrics: &mesh_proto.MetricsBackend{ - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 8765, - Path: "/even-more-non-standard-path", - }), - }, - }, - }, - }, - expected: []*core_xds.Resource{}, - }), - Entry("Dataplane without inbound interfaces", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "gateway-01", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Gateway: &mesh_proto.Dataplane_Networking_Gateway{ - Tags: map[string]string{ - "kuma.io/service": "gateway", - "region": "eu", - }, - }, - }, - }, - }, - }, - expected: []*core_xds.Resource{ - { - Name: "/meshes/demo/dataplanes/gateway-01", - Resource: &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/gateway-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": ":1234", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/non-standard-path", - "job": "gateway", - "instance": "gateway-01", - "mesh": "demo", - "dataplane": "gateway-01", - "region": "eu", - "regions": ",eu,", - "kuma_io_service": "gateway", - "kuma_io_services": ",gateway,", - }, - }, - }, - }, - }), - Entry("Dataplane with multiple inbound interfaces", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{ - { - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - "env": "prod", - "version": "v1", - }, - }, - { - Address: "192.168.0.2", - Port: 443, - ServicePort: 8443, - Tags: map[string]string{ - "kuma.io/service": "backend-https", - "env": "prod", - "version": "v2", - }, - }, - }, - }, - }, - }, - }, - expected: []*core_xds.Resource{ - { - Name: "/meshes/demo/dataplanes/backend-01", - Resource: &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/backend-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.1:1234", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/non-standard-path", - "job": "backend", - "instance": "backend-01", - "mesh": "demo", - "dataplane": "backend-01", - "env": "prod", - "envs": ",prod,", - "kuma_io_service": "backend", - "kuma_io_services": ",backend,backend-https,", // must have multiple values - "version": "v1", - "versions": ",v1,v2,", // must have multiple values - }, - }, - }, - }, - }), - Entry("Dataplane with a user-defined plural tag", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - "version": "v1", - "versions": "v1+v1.0.1", - }, - }}, - }, - }, - }, - }, - expected: []*core_xds.Resource{ - { - Name: "/meshes/demo/dataplanes/backend-01", - Resource: &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/backend-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.1:1234", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/non-standard-path", - "job": "backend", - "instance": "backend-01", - "mesh": "demo", - "dataplane": "backend-01", - "kuma_io_service": "backend", - "kuma_io_services": ",backend,", - "version": "v1", - "versions": "v1+v1.0.1", // must have user-defined value - "versionss": ",v1+v1.0.1,", - }, - }, - }, - }, - }), - Entry("Dataplane with unsafe characters in tag's name and value", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - "app:description": "?!,.:;", - "com.company/tag": "&*()-+", - }, - }}, - }, - }, - }, - }, - expected: []*core_xds.Resource{ - { - Name: "/meshes/demo/dataplanes/backend-01", - Resource: &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/backend-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.1:1234", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/non-standard-path", - "job": "backend", - "instance": "backend-01", - "mesh": "demo", - "dataplane": "backend-01", - "kuma_io_service": "backend", - "kuma_io_services": ",backend,", - "app_description": "?!,.:;", // tag name must be escaped - "app_descriptions": ",?!,.:;,", // tag name must be escaped - "com_company_tag": "&*()-+", // tag name must be escaped - "com_company_tags": ",&*()-+,", // tag name must be escaped - }, - }, - }, - }, - }), - Entry("multiple Meshes and Dataplanes", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "default", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - Mesh: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 2345, - Path: "/another-non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "default", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - "env": "prod", - }, - }}, - }, - }, - }, - { - Meta: &test_model.ResourceMeta{ - Name: "web-02", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.2", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 443, - ServicePort: 8443, - Tags: map[string]string{ - "kuma.io/service": "web", - "env": "intg", - }, - }}, - }, - Metrics: &mesh_proto.MetricsBackend{ - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 8765, - Path: "/even-more-non-standard-path", - }), - }, - }, - }, - }, - expected: []*core_xds.Resource{ - { - Name: "/meshes/default/dataplanes/backend-01", - Resource: &observability_proto.MonitoringAssignment{ - Name: "/meshes/default/dataplanes/backend-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.1:1234", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/non-standard-path", - "job": "backend", - "instance": "backend-01", - "mesh": "default", - "dataplane": "backend-01", - "env": "prod", - "envs": ",prod,", - "kuma_io_service": "backend", - "kuma_io_services": ",backend,", - }, - }, - }, - { - Name: "/meshes/demo/dataplanes/web-02", - Resource: &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/web-02", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.2:8765", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/even-more-non-standard-path", - "job": "web", - "instance": "web-02", - "mesh": "demo", - "dataplane": "web-02", - "env": "intg", - "envs": ",intg,", - "kuma_io_service": "web", - "kuma_io_services": ",web,", - }, - }, - }, - }, - }), - Entry("should include `k8s_kuma_io_namespace` and `k8s_kuma_io_name` labels on Kubernetes", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-5c89f4d995-85znn.my-namespace", - NameExtensions: core_model.ResourceNameExtensions{ - "k8s.kuma.io/namespace": "my-namespace", - "k8s.kuma.io/name": "backend-5c89f4d995-85znn", - }, - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - }, - }}, - }, - }, - }, - }, - expected: []*core_xds.Resource{ - { - Name: "/meshes/demo/dataplanes/backend-5c89f4d995-85znn.my-namespace", - Resource: &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/backend-5c89f4d995-85znn.my-namespace", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.1:1234", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/non-standard-path", - "job": "backend", - "instance": "backend-5c89f4d995-85znn.my-namespace", - "k8s_kuma_io_name": "backend-5c89f4d995-85znn", - "k8s_kuma_io_namespace": "my-namespace", - "mesh": "demo", - "dataplane": "backend-5c89f4d995-85znn.my-namespace", - "kuma_io_service": "backend", - "kuma_io_services": ",backend,", - }, - }, - }, - }, - }), - ) - }) -}) diff --git a/pkg/mads/v1alpha1/generator/generator_suite_test.go b/pkg/mads/v1alpha1/generator/generator_suite_test.go deleted file mode 100644 index 08bbd7154e76..000000000000 --- a/pkg/mads/v1alpha1/generator/generator_suite_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package generator_test - -import ( - "testing" - - "github.com/kumahq/kuma/pkg/test" -) - -func TestGenerator(t *testing.T) { - test.RunSpecs(t, "Generator Suite") -} diff --git a/pkg/mads/v1alpha1/reconcile/interfaces.go b/pkg/mads/v1alpha1/reconcile/interfaces.go deleted file mode 100644 index 786964344ee6..000000000000 --- a/pkg/mads/v1alpha1/reconcile/interfaces.go +++ /dev/null @@ -1,19 +0,0 @@ -package reconcile - -import ( - "context" - - envoy_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - - util_xds "github.com/kumahq/kuma/pkg/util/xds" -) - -// Reconciler re-computes configuration for a given node. -type Reconciler interface { - Reconcile(context.Context, *envoy_core.Node) error -} - -// Generates a snapshot of xDS resources for a given node. -type SnapshotGenerator interface { - GenerateSnapshot(context.Context, *envoy_core.Node) (util_xds.Snapshot, error) -} diff --git a/pkg/mads/v1alpha1/reconcile/reconcile_suite_test.go b/pkg/mads/v1alpha1/reconcile/reconcile_suite_test.go deleted file mode 100644 index 338fbfca58ac..000000000000 --- a/pkg/mads/v1alpha1/reconcile/reconcile_suite_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package reconcile_test - -import ( - "testing" - - "github.com/kumahq/kuma/pkg/test" -) - -func TestReconcile(t *testing.T) { - test.RunSpecs(t, "Reconcile Suite") -} diff --git a/pkg/mads/v1alpha1/reconcile/reconciler.go b/pkg/mads/v1alpha1/reconcile/reconciler.go deleted file mode 100644 index 61bf993a9d3d..000000000000 --- a/pkg/mads/v1alpha1/reconcile/reconciler.go +++ /dev/null @@ -1,41 +0,0 @@ -package reconcile - -import ( - "context" - - envoy_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - envoy_cache "github.com/envoyproxy/go-control-plane/pkg/cache/v2" - - util_xds "github.com/kumahq/kuma/pkg/util/xds" -) - -func NewReconciler(hasher envoy_cache.NodeHash, cache util_xds.SnapshotCache, - generator SnapshotGenerator, versioner util_xds.SnapshotVersioner) Reconciler { - return &reconciler{ - hasher: hasher, - cache: cache, - generator: generator, - versioner: versioner, - } -} - -type reconciler struct { - hasher envoy_cache.NodeHash - cache util_xds.SnapshotCache - generator SnapshotGenerator - versioner util_xds.SnapshotVersioner -} - -func (r *reconciler) Reconcile(ctx context.Context, node *envoy_core.Node) error { - newSnapshot, err := r.generator.GenerateSnapshot(ctx, node) - if err != nil { - return err - } - if err := newSnapshot.Consistent(); err != nil { - return err - } - id := r.hasher.ID(node) - old, _ := r.cache.GetSnapshot(id) - newSnapshot = r.versioner.Version(newSnapshot, old) - return r.cache.SetSnapshot(id, newSnapshot) -} diff --git a/pkg/mads/v1alpha1/reconcile/snapshot_generator.go b/pkg/mads/v1alpha1/reconcile/snapshot_generator.go deleted file mode 100644 index 69f67ebcf353..000000000000 --- a/pkg/mads/v1alpha1/reconcile/snapshot_generator.go +++ /dev/null @@ -1,78 +0,0 @@ -package reconcile - -import ( - "context" - - envoy_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - - core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" - core_manager "github.com/kumahq/kuma/pkg/core/resources/manager" - core_store "github.com/kumahq/kuma/pkg/core/resources/store" - core_xds "github.com/kumahq/kuma/pkg/core/xds" - "github.com/kumahq/kuma/pkg/mads/generator" - mads_cache "github.com/kumahq/kuma/pkg/mads/v1alpha1/cache" - util_xds "github.com/kumahq/kuma/pkg/util/xds" -) - -func NewSnapshotGenerator(resourceManager core_manager.ReadOnlyResourceManager, resourceGenerator generator.ResourceGenerator) SnapshotGenerator { - return &snapshotGenerator{ - resourceManager: resourceManager, - resourceGenerator: resourceGenerator, - } -} - -type snapshotGenerator struct { - resourceManager core_manager.ReadOnlyResourceManager - resourceGenerator generator.ResourceGenerator -} - -func (s *snapshotGenerator) GenerateSnapshot(ctx context.Context, _ *envoy_core.Node) (util_xds.Snapshot, error) { - meshes, err := s.getMeshesWithPrometheusEnabled(ctx) - if err != nil { - return nil, err - } - - dataplanes, err := s.getDataplanes(ctx, meshes) - if err != nil { - return nil, err - } - - args := generator.Args{ - Meshes: meshes, - Dataplanes: dataplanes, - } - - resources, err := s.resourceGenerator.Generate(args) - if err != nil { - return nil, err - } - - return mads_cache.NewSnapshot("", core_xds.ResourceList(resources).ToIndex()), nil -} - -func (s *snapshotGenerator) getMeshesWithPrometheusEnabled(ctx context.Context) ([]*core_mesh.MeshResource, error) { - meshList := &core_mesh.MeshResourceList{} - if err := s.resourceManager.List(ctx, meshList); err != nil { - return nil, err - } - - meshes := make([]*core_mesh.MeshResource, 0) - for _, mesh := range meshList.Items { - if mesh.HasPrometheusMetricsEnabled() { - meshes = append(meshes, mesh) - } - } - return meshes, nil -} - -func (s *snapshotGenerator) getDataplanes(ctx context.Context, meshes []*core_mesh.MeshResource) ([]*core_mesh.DataplaneResource, error) { - dataplanes := make([]*core_mesh.DataplaneResource, 0) - for _, mesh := range meshes { - dataplaneList := &core_mesh.DataplaneResourceList{} - if err := s.resourceManager.List(ctx, dataplaneList, core_store.ListByMesh(mesh.Meta.GetName())); err != nil { - return nil, err - } - dataplanes = append(dataplanes, dataplaneList.Items...) - } - return dataplanes, nil -} diff --git a/pkg/mads/v1alpha1/reconcile/snapshot_generator_test.go b/pkg/mads/v1alpha1/reconcile/snapshot_generator_test.go deleted file mode 100644 index 3f1b235c7c4f..000000000000 --- a/pkg/mads/v1alpha1/reconcile/snapshot_generator_test.go +++ /dev/null @@ -1,293 +0,0 @@ -package reconcile_test - -import ( - "context" - - envoy_types "github.com/envoyproxy/go-control-plane/pkg/cache/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" - - mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" - observability_proto "github.com/kumahq/kuma/api/observability/v1alpha1" - core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" - core_manager "github.com/kumahq/kuma/pkg/core/resources/manager" - core_model "github.com/kumahq/kuma/pkg/core/resources/model" - core_store "github.com/kumahq/kuma/pkg/core/resources/store" - mads_cache "github.com/kumahq/kuma/pkg/mads/v1alpha1/cache" - mads_generator "github.com/kumahq/kuma/pkg/mads/v1alpha1/generator" - . "github.com/kumahq/kuma/pkg/mads/v1alpha1/reconcile" - "github.com/kumahq/kuma/pkg/plugins/resources/memory" - test_model "github.com/kumahq/kuma/pkg/test/resources/model" - "github.com/kumahq/kuma/pkg/util/proto" -) - -var _ = Describe("snapshotGenerator", func() { - - Describe("GenerateSnapshot()", func() { - - var resourceManager core_manager.ResourceManager - var store core_store.ResourceStore - - BeforeEach(func() { - store = memory.NewStore() - resourceManager = core_manager.NewResourceManager(store) - }) - - type testCase struct { - meshes []*core_mesh.MeshResource - dataplanes []*core_mesh.DataplaneResource - expected *mads_cache.Snapshot - } - - DescribeTable("", - func(given testCase) { - // setup - ctx := context.Background() - for _, mesh := range given.meshes { - // when - err := resourceManager.Create(ctx, mesh, core_store.CreateBy(core_model.MetaToResourceKey(mesh.GetMeta()))) - // then - Expect(err).ToNot(HaveOccurred()) - } - for _, dataplane := range given.dataplanes { - // when - err := resourceManager.Create(ctx, dataplane, core_store.CreateBy(core_model.MetaToResourceKey(dataplane.GetMeta()))) - // then - Expect(err).ToNot(HaveOccurred()) - } - - // given - snapshotter := NewSnapshotGenerator(resourceManager, mads_generator.MonitoringAssignmentsGenerator{}) - // when - snapshot, err := snapshotter.GenerateSnapshot(context.Background(), nil) - // then - Expect(err).ToNot(HaveOccurred()) - // and - Expect(snapshot).To(Equal(given.expected)) - }, - Entry("no Meshes, no Dataplanes", testCase{ - expected: mads_cache.NewSnapshot("", nil), - }), - Entry("no Meshes with Prometheus enabled", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "default", - }, - Spec: &mesh_proto.Mesh{}, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "default", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - }, - }}, - }, - }, - }, - }, - expected: mads_cache.NewSnapshot("", nil), - }), - Entry("Mesh with Prometheus enabled but no Dataplanes", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "default", - }, - Spec: &mesh_proto.Mesh{}, - }, - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "default", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - }, - }}, - }, - }, - }, - }, - expected: mads_cache.NewSnapshot("", nil), - }), - Entry("Mesh with Prometheus enabled and some Dataplanes", testCase{ - meshes: []*core_mesh.MeshResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "default", - }, - Spec: &mesh_proto.Mesh{}, - }, - { - Meta: &test_model.ResourceMeta{ - Name: "demo", - }, - Spec: &mesh_proto.Mesh{ - Metrics: &mesh_proto.Metrics{ - EnabledBackend: "prometheus-1", - Backends: []*mesh_proto.MetricsBackend{ - { - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 1234, - Path: "/non-standard-path", - }), - }, - }, - }, - }, - }, - }, - dataplanes: []*core_mesh.DataplaneResource{ - { - Meta: &test_model.ResourceMeta{ - Name: "backend-01", - Mesh: "default", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.1", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 80, - ServicePort: 8080, - Tags: map[string]string{ - "kuma.io/service": "backend", - "env": "prod", - }, - }}, - }, - }, - }, - { - Meta: &test_model.ResourceMeta{ - Name: "backend-02", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.2", - Inbound: []*mesh_proto.Dataplane_Networking_Inbound{{ - Port: 443, - ServicePort: 8443, - Tags: map[string]string{ - "kuma.io/service": "backend", - "env": "intg", - }, - }}, - }, - }, - }, - { - Meta: &test_model.ResourceMeta{ - Name: "web-01", - Mesh: "demo", - }, - Spec: &mesh_proto.Dataplane{ - Networking: &mesh_proto.Dataplane_Networking{ - Address: "192.168.0.3", - Gateway: &mesh_proto.Dataplane_Networking_Gateway{ - Tags: map[string]string{ - "kuma.io/service": "web", - "env": "test", - }, - }, - }, - Metrics: &mesh_proto.MetricsBackend{ - Name: "prometheus-1", - Type: mesh_proto.MetricsPrometheusType, - Conf: proto.MustToStruct(&mesh_proto.PrometheusMetricsBackendConfig{ - Port: 8765, - Path: "/even-more-non-standard-path", - }), - }, - }, - }, - }, - expected: mads_cache.NewSnapshot("", map[string]envoy_types.Resource{ - "/meshes/demo/dataplanes/backend-02": &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/backend-02", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.2:1234", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/non-standard-path", - "job": "backend", - "instance": "backend-02", - "mesh": "demo", - "dataplane": "backend-02", - "env": "intg", - "envs": ",intg,", - "kuma_io_service": "backend", - "kuma_io_services": ",backend,", - }, - }, - "/meshes/demo/dataplanes/web-01": &observability_proto.MonitoringAssignment{ - Name: "/meshes/demo/dataplanes/web-01", - Targets: []*observability_proto.MonitoringAssignment_Target{{ - Labels: map[string]string{ - "__address__": "192.168.0.3:8765", - }, - }}, - Labels: map[string]string{ - "__scheme__": "http", - "__metrics_path__": "/even-more-non-standard-path", - "job": "web", - "instance": "web-01", - "mesh": "demo", - "dataplane": "web-01", - "env": "test", - "envs": ",test,", - "kuma_io_service": "web", - "kuma_io_services": ",web,", - }, - }, - }), - }), - ) - }) -}) diff --git a/pkg/mads/v1alpha1/service/components.go b/pkg/mads/v1alpha1/service/components.go deleted file mode 100644 index 6fe7ceecb9d1..000000000000 --- a/pkg/mads/v1alpha1/service/components.go +++ /dev/null @@ -1,64 +0,0 @@ -package service - -import ( - "context" - "time" - - envoy_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - envoy_cache "github.com/envoyproxy/go-control-plane/pkg/cache/v2" - envoy_xds "github.com/envoyproxy/go-control-plane/pkg/server/v2" - "github.com/go-logr/logr" - - "github.com/kumahq/kuma/pkg/core" - core_manager "github.com/kumahq/kuma/pkg/core/resources/manager" - mads_generator "github.com/kumahq/kuma/pkg/mads/v1alpha1/generator" - mads_reconcile "github.com/kumahq/kuma/pkg/mads/v1alpha1/reconcile" - util_watchdog "github.com/kumahq/kuma/pkg/util/watchdog" - util_xds "github.com/kumahq/kuma/pkg/util/xds" - util_xds_v2 "github.com/kumahq/kuma/pkg/util/xds/v2" -) - -func NewSnapshotGenerator(rm core_manager.ReadOnlyResourceManager) mads_reconcile.SnapshotGenerator { - return mads_reconcile.NewSnapshotGenerator(rm, mads_generator.MonitoringAssignmentsGenerator{}) -} - -func NewVersioner() util_xds.SnapshotVersioner { - return util_xds.SnapshotAutoVersioner{UUID: core.NewUUID} -} - -func NewReconciler(hasher envoy_cache.NodeHash, cache util_xds.SnapshotCache, - generator mads_reconcile.SnapshotGenerator, versioner util_xds.SnapshotVersioner) mads_reconcile.Reconciler { - return mads_reconcile.NewReconciler(hasher, cache, generator, versioner) -} - -func NewSyncTracker(reconciler mads_reconcile.Reconciler, refresh time.Duration, log logr.Logger) envoy_xds.Callbacks { - return util_xds_v2.NewWatchdogCallbacks(func(ctx context.Context, node *envoy_core.Node, streamID int64) (util_watchdog.Watchdog, error) { - log := log.WithValues("streamID", streamID, "node", node) - return &util_watchdog.SimpleWatchdog{ - NewTicker: func() *time.Ticker { - return time.NewTicker(refresh) - }, - OnTick: func() error { - log.V(1).Info("on tick") - return reconciler.Reconcile(ctx, node) - }, - OnError: func(err error) { - log.Error(err, "OnTick() failed") - }, - }, nil - }) -} - -func NewXdsContext(log logr.Logger) (envoy_cache.NodeHash, util_xds.SnapshotCache) { - hasher := hasher{} - logger := util_xds.NewLogger(log) - return hasher, util_xds.NewSnapshotCache(false, hasher, logger) -} - -type hasher struct { -} - -func (_ hasher) ID(node *envoy_core.Node) string { - // in the very first implementation, we don't differentiate clients - return "" -} diff --git a/pkg/mads/v1alpha1/service/grpc.go b/pkg/mads/v1alpha1/service/grpc.go deleted file mode 100644 index fdadaf806738..000000000000 --- a/pkg/mads/v1alpha1/service/grpc.go +++ /dev/null @@ -1,11 +0,0 @@ -package service - -import ( - "google.golang.org/grpc" - - observability_v1alpha1 "github.com/kumahq/kuma/api/observability/v1alpha1" -) - -func (s *service) RegisterWithGrpcServer(server *grpc.Server) { - observability_v1alpha1.RegisterMonitoringAssignmentDiscoveryServiceServer(server, s.server) -} diff --git a/pkg/mads/v1alpha1/service/mads.go b/pkg/mads/v1alpha1/service/mads.go deleted file mode 100644 index 6c300ec48ce8..000000000000 --- a/pkg/mads/v1alpha1/service/mads.go +++ /dev/null @@ -1,40 +0,0 @@ -package service - -import ( - "context" - - envoy_api "github.com/envoyproxy/go-control-plane/envoy/api/v2" - envoy_cache "github.com/envoyproxy/go-control-plane/pkg/cache/v2" - "github.com/envoyproxy/go-control-plane/pkg/server/sotw/v2" - envoy_server "github.com/envoyproxy/go-control-plane/pkg/server/v2" - - observability_v1alpha1 "github.com/kumahq/kuma/api/observability/v1alpha1" - mads_v1alpha1 "github.com/kumahq/kuma/pkg/mads/v1alpha1" -) - -type Server interface { - observability_v1alpha1.MonitoringAssignmentDiscoveryServiceServer -} - -func NewServer(config envoy_cache.Cache, callbacks envoy_server.Callbacks) Server { - sotwServer := sotw.NewServer(context.Background(), config, callbacks) - return &server{sotwServer} -} - -var _ Server = &server{} - -type server struct { - sotw.Server -} - -func (s *server) DeltaMonitoringAssignments(stream observability_v1alpha1.MonitoringAssignmentDiscoveryService_DeltaMonitoringAssignmentsServer) error { - panic("not implemented") // we don't use delta on MADS for now -} - -func (s *server) StreamMonitoringAssignments(stream observability_v1alpha1.MonitoringAssignmentDiscoveryService_StreamMonitoringAssignmentsServer) error { - return s.StreamHandler(stream, mads_v1alpha1.MonitoringAssignmentType) -} - -func (s *server) FetchMonitoringAssignments(ctx context.Context, request *envoy_api.DiscoveryRequest) (*envoy_api.DiscoveryResponse, error) { - panic("not implemented") // we don't need Fetch operation on MADS for now -} diff --git a/pkg/mads/v1alpha1/service/service.go b/pkg/mads/v1alpha1/service/service.go deleted file mode 100644 index 8d15eb113d74..000000000000 --- a/pkg/mads/v1alpha1/service/service.go +++ /dev/null @@ -1,35 +0,0 @@ -package service - -import ( - "github.com/go-logr/logr" - - "github.com/kumahq/kuma/pkg/config/mads" - core_manager "github.com/kumahq/kuma/pkg/core/resources/manager" - util_xds "github.com/kumahq/kuma/pkg/util/xds" - util_xds_v2 "github.com/kumahq/kuma/pkg/util/xds/v2" -) - -type service struct { - server Server - config *mads.MonitoringAssignmentServerConfig - log logr.Logger -} - -func NewService(config *mads.MonitoringAssignmentServerConfig, rm core_manager.ReadOnlyResourceManager, log logr.Logger) *service { - hasher, cache := NewXdsContext(log) - generator := NewSnapshotGenerator(rm) - versioner := NewVersioner() - reconciler := NewReconciler(hasher, cache, generator, versioner) - syncTracker := NewSyncTracker(reconciler, config.AssignmentRefreshInterval, log) - callbacks := util_xds_v2.CallbacksChain{ - util_xds_v2.AdaptCallbacks(util_xds.LoggingCallbacks{Log: log}), - syncTracker, - } - srv := NewServer(cache, callbacks) - - return &service{ - server: srv, - config: config, - log: log, - } -} diff --git a/pkg/mads/v1alpha1/types.go b/pkg/mads/v1alpha1/types.go deleted file mode 100644 index 9c2908af8353..000000000000 --- a/pkg/mads/v1alpha1/types.go +++ /dev/null @@ -1,5 +0,0 @@ -package v1alpha1 - -const ( - MonitoringAssignmentType = "type.googleapis.com/kuma.observability.v1alpha1.MonitoringAssignment" -) diff --git a/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go b/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go index eeea1c078e64..9b48d76b4b80 100644 --- a/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go +++ b/pkg/plugins/runtime/k8s/controllers/pod_converter_test.go @@ -453,7 +453,7 @@ var _ = Describe("InboundTagsForService(..)", func() { podLabels: nil, expected: map[string]string{ "kuma.io/service": "example_demo_svc_80", - "kuma.io/protocol": "tcp", // we want Kuma's default behaviour to be explicit to a user + "kuma.io/protocol": "tcp", // we want Kuma's default behavior to be explicit to a user }, }), Entry("Pod with labels", testCase{ @@ -466,7 +466,7 @@ var _ = Describe("InboundTagsForService(..)", func() { "app": "example", "version": "0.1", "kuma.io/service": "example_demo_svc_80", - "kuma.io/protocol": "tcp", // we want Kuma's default behaviour to be explicit to a user + "kuma.io/protocol": "tcp", // we want Kuma's default behavior to be explicit to a user }, }), Entry("Pod with `service` label", testCase{ @@ -480,7 +480,7 @@ var _ = Describe("InboundTagsForService(..)", func() { "app": "example", "version": "0.1", "kuma.io/service": "example_demo_svc_80", - "kuma.io/protocol": "tcp", // we want Kuma's default behaviour to be explicit to a user + "kuma.io/protocol": "tcp", // we want Kuma's default behavior to be explicit to a user }, }), Entry("Service with a `.service.kuma.io/protocol` annotation and an unknown value", testCase{ @@ -496,7 +496,7 @@ var _ = Describe("InboundTagsForService(..)", func() { "app": "example", "version": "0.1", "kuma.io/service": "example_demo_svc_80", - "kuma.io/protocol": "not-yet-supported-protocol", // we want Kuma's behaviour to be straightforward to a user (just copy annotation value "as is") + "kuma.io/protocol": "not-yet-supported-protocol", // we want Kuma's behavior to be straightforward to a user (just copy annotation value "as is") }, }), Entry("Service with a `.service.kuma.io/protocol` annotation and a known value", testCase{ @@ -623,11 +623,11 @@ var _ = Describe("ProtocolTagFor(..)", func() { }, Entry("no appProtocol", testCase{ appProtocol: nil, - expected: "tcp", // we want Kuma's default behaviour to be explicit to a user + expected: "tcp", // we want Kuma's default behavior to be explicit to a user }), Entry("appProtocol has an empty value", testCase{ appProtocol: utilpointer.StringPtr(""), - expected: "tcp", // we want Kuma's default behaviour to be explicit to a user + expected: "tcp", // we want Kuma's default behavior to be explicit to a user }), Entry("no appProtocol but with `.service.kuma.io/protocol` annotation", testCase{ appProtocol: nil, @@ -638,11 +638,11 @@ var _ = Describe("ProtocolTagFor(..)", func() { }), Entry("appProtocol has an unknown value", testCase{ appProtocol: utilpointer.StringPtr("not-yet-supported-protocol"), - expected: "not-yet-supported-protocol", // we want Kuma's behaviour to be straightforward to a user (just copy appProtocol value "as is") + expected: "not-yet-supported-protocol", // we want Kuma's behavior to be straightforward to a user (just copy appProtocol value "as is") }), Entry("appProtocol has a non-lowercase value", testCase{ appProtocol: utilpointer.StringPtr("HtTp"), - expected: "HtTp", // we want Kuma's behaviour to be straightforward to a user (just copy appProtocol value "as is") + expected: "HtTp", // we want Kuma's behavior to be straightforward to a user (just copy appProtocol value "as is") }), Entry("appProtocol has a known value: http", testCase{ appProtocol: utilpointer.StringPtr("http"), diff --git a/pkg/plugins/runtime/k8s/plugin.go b/pkg/plugins/runtime/k8s/plugin.go index 1c9795a6af83..da6369043814 100644 --- a/pkg/plugins/runtime/k8s/plugin.go +++ b/pkg/plugins/runtime/k8s/plugin.go @@ -11,6 +11,8 @@ import ( config_core "github.com/kumahq/kuma/pkg/config/core" "github.com/kumahq/kuma/pkg/core" + externalservice "github.com/kumahq/kuma/pkg/core/managers/apis/external_service" + "github.com/kumahq/kuma/pkg/core/managers/apis/ratelimit" "github.com/kumahq/kuma/pkg/core/managers/apis/zone" core_plugins "github.com/kumahq/kuma/pkg/core/plugins" core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" @@ -241,6 +243,18 @@ func addValidators(mgr kube_ctrl.Manager, rt core_runtime.Runtime, converter k8s k8sMeshValidator := k8s_webhooks.NewMeshValidatorWebhook(rt.MeshValidator(), converter, rt.ResourceManager()) composite.AddValidator(k8sMeshValidator) + rateLimitValidator := ratelimit.RateLimitValidator{ + Store: rt.ResourceStore(), + } + k8sRateLimitValidator := k8s_webhooks.NewRateLimitValidatorWebhook(rateLimitValidator, converter) + composite.AddValidator(k8sRateLimitValidator) + + externalServiceValidator := externalservice.ExternalServiceValidator{ + Store: rt.ResourceStore(), + } + k8sExternalServiceValidator := k8s_webhooks.NewExternalServiceValidatorWebhook(externalServiceValidator, converter) + composite.AddValidator(k8sExternalServiceValidator) + coreZoneValidator := zone.Validator{Store: rt.ResourceStore()} k8sZoneValidator := k8s_webhooks.NewZoneValidatorWebhook(coreZoneValidator) composite.AddValidator(k8sZoneValidator) diff --git a/pkg/plugins/runtime/k8s/webhooks/defaulter.go b/pkg/plugins/runtime/k8s/webhooks/defaulter.go index cccca31ebacb..3ffabc7d8554 100644 --- a/pkg/plugins/runtime/k8s/webhooks/defaulter.go +++ b/pkg/plugins/runtime/k8s/webhooks/defaulter.go @@ -66,10 +66,10 @@ func (h *defaultingHandler) Handle(ctx context.Context, req admission.Request) a return admission.Errored(http.StatusInternalServerError, err) } - marshalled, err := json.Marshal(obj) + marshaled, err := json.Marshal(obj) if err != nil { return admission.Errored(http.StatusInternalServerError, err) } - return admission.PatchResponseFromRaw(req.Object.Raw, marshalled) + return admission.PatchResponseFromRaw(req.Object.Raw, marshaled) } diff --git a/pkg/plugins/runtime/k8s/webhooks/externalservice_validator.go b/pkg/plugins/runtime/k8s/webhooks/externalservice_validator.go new file mode 100644 index 000000000000..95ad68b9d510 --- /dev/null +++ b/pkg/plugins/runtime/k8s/webhooks/externalservice_validator.go @@ -0,0 +1,103 @@ +package webhooks + +import ( + "context" + "net/http" + + "k8s.io/api/admission/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + externalservice_managers "github.com/kumahq/kuma/pkg/core/managers/apis/external_service" + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + "github.com/kumahq/kuma/pkg/core/validators" + k8s_common "github.com/kumahq/kuma/pkg/plugins/common/k8s" + mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1" +) + +func NewExternalServiceValidatorWebhook(validator externalservice_managers.ExternalServiceValidator, converter k8s_common.Converter) k8s_common.AdmissionValidator { + return &ExternalServiceValidator{ + validator: validator, + converter: converter, + } +} + +type ExternalServiceValidator struct { + validator externalservice_managers.ExternalServiceValidator + converter k8s_common.Converter + decoder *admission.Decoder +} + +func (h *ExternalServiceValidator) InjectDecoder(d *admission.Decoder) error { + h.decoder = d + return nil +} + +func (h *ExternalServiceValidator) Handle(ctx context.Context, req admission.Request) admission.Response { + switch req.Operation { + case v1beta1.Delete: + return h.ValidateDelete(ctx, req) + case v1beta1.Create: + return h.ValidateCreate(ctx, req) + case v1beta1.Update: + return h.ValidateUpdate(ctx, req) + } + return admission.Allowed("") +} + +func (h *ExternalServiceValidator) ValidateDelete(ctx context.Context, req admission.Request) admission.Response { + if err := h.validator.ValidateDelete(ctx, req.Name); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + return admission.Allowed("") +} + +func (h *ExternalServiceValidator) ValidateCreate(ctx context.Context, req admission.Request) admission.Response { + coreRes := core_mesh.NewExternalServiceResource() + k8sRes := &mesh_k8s.ExternalService{} + if err := h.decoder.Decode(req, k8sRes); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + if err := h.converter.ToCoreResource(k8sRes, coreRes); err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + if err := h.validator.ValidateCreate(ctx, k8sRes.Mesh, coreRes); err != nil { + if kumaErr, ok := err.(*validators.ValidationError); ok { + return convertSpecValidationError(kumaErr, k8sRes) + } + return admission.Denied(err.Error()) + } + return admission.Allowed("") +} + +func (h *ExternalServiceValidator) ValidateUpdate(ctx context.Context, req admission.Request) admission.Response { + coreRes := core_mesh.NewExternalServiceResource() + k8sRes := &mesh_k8s.ExternalService{} + if err := h.decoder.DecodeRaw(req.Object, k8sRes); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + if err := h.converter.ToCoreResource(k8sRes, coreRes); err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + + oldCoreRes := core_mesh.NewExternalServiceResource() + oldK8sRes := &mesh_k8s.ExternalService{} + if err := h.decoder.DecodeRaw(req.OldObject, oldK8sRes); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + if err := h.converter.ToCoreResource(oldK8sRes, oldCoreRes); err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + + if err := h.validator.ValidateUpdate(ctx, oldCoreRes, coreRes); err != nil { + if kumaErr, ok := err.(*validators.ValidationError); ok { + return convertSpecValidationError(kumaErr, k8sRes) + } + return admission.Denied(err.Error()) + } + return admission.Allowed("") +} + +func (h *ExternalServiceValidator) Supports(req admission.Request) bool { + gvk := mesh_k8s.GroupVersion.WithKind("ExternalService") + return req.Kind.Kind == gvk.Kind && req.Kind.Version == gvk.Version && req.Kind.Group == gvk.Group +} diff --git a/pkg/plugins/runtime/k8s/webhooks/ratelimit_validator.go b/pkg/plugins/runtime/k8s/webhooks/ratelimit_validator.go new file mode 100644 index 000000000000..d1400ea801a8 --- /dev/null +++ b/pkg/plugins/runtime/k8s/webhooks/ratelimit_validator.go @@ -0,0 +1,103 @@ +package webhooks + +import ( + "context" + "net/http" + + "k8s.io/api/admission/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + ratelimit_managers "github.com/kumahq/kuma/pkg/core/managers/apis/ratelimit" + core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" + "github.com/kumahq/kuma/pkg/core/validators" + k8s_common "github.com/kumahq/kuma/pkg/plugins/common/k8s" + mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1" +) + +func NewRateLimitValidatorWebhook(validator ratelimit_managers.RateLimitValidator, converter k8s_common.Converter) k8s_common.AdmissionValidator { + return &RateLimitValidator{ + validator: validator, + converter: converter, + } +} + +type RateLimitValidator struct { + validator ratelimit_managers.RateLimitValidator + converter k8s_common.Converter + decoder *admission.Decoder +} + +func (h *RateLimitValidator) InjectDecoder(d *admission.Decoder) error { + h.decoder = d + return nil +} + +func (h *RateLimitValidator) Handle(ctx context.Context, req admission.Request) admission.Response { + switch req.Operation { + case v1beta1.Delete: + return h.ValidateDelete(ctx, req) + case v1beta1.Create: + return h.ValidateCreate(ctx, req) + case v1beta1.Update: + return h.ValidateUpdate(ctx, req) + } + return admission.Allowed("") +} + +func (h *RateLimitValidator) ValidateDelete(ctx context.Context, req admission.Request) admission.Response { + if err := h.validator.ValidateDelete(ctx, req.Name); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + return admission.Allowed("") +} + +func (h *RateLimitValidator) ValidateCreate(ctx context.Context, req admission.Request) admission.Response { + coreRes := core_mesh.NewRateLimitResource() + k8sRes := &mesh_k8s.RateLimit{} + if err := h.decoder.Decode(req, k8sRes); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + if err := h.converter.ToCoreResource(k8sRes, coreRes); err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + if err := h.validator.ValidateCreate(ctx, k8sRes.Mesh, coreRes); err != nil { + if kumaErr, ok := err.(*validators.ValidationError); ok { + return convertSpecValidationError(kumaErr, k8sRes) + } + return admission.Denied(err.Error()) + } + return admission.Allowed("") +} + +func (h *RateLimitValidator) ValidateUpdate(ctx context.Context, req admission.Request) admission.Response { + coreRes := core_mesh.NewRateLimitResource() + k8sRes := &mesh_k8s.RateLimit{} + if err := h.decoder.DecodeRaw(req.Object, k8sRes); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + if err := h.converter.ToCoreResource(k8sRes, coreRes); err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + + oldCoreRes := core_mesh.NewRateLimitResource() + oldK8sRes := &mesh_k8s.RateLimit{} + if err := h.decoder.DecodeRaw(req.OldObject, oldK8sRes); err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + if err := h.converter.ToCoreResource(oldK8sRes, oldCoreRes); err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + + if err := h.validator.ValidateUpdate(ctx, oldCoreRes, coreRes); err != nil { + if kumaErr, ok := err.(*validators.ValidationError); ok { + return convertSpecValidationError(kumaErr, k8sRes) + } + return admission.Denied(err.Error()) + } + return admission.Allowed("") +} + +func (h *RateLimitValidator) Supports(req admission.Request) bool { + gvk := mesh_k8s.GroupVersion.WithKind("RateLimit") + return req.Kind.Kind == gvk.Kind && req.Kind.Version == gvk.Version && req.Kind.Group == gvk.Group +} diff --git a/pkg/util/proto/any.go b/pkg/util/proto/any.go index 2756171c04af..96ce032e221b 100644 --- a/pkg/util/proto/any.go +++ b/pkg/util/proto/any.go @@ -14,7 +14,7 @@ import ( const googleApis = "type.googleapis.com/" // When saving Snapshot in SnapshotCache we generate version based on proto.Equal() -// Therefore we need deterministic way of marshalling Any which is part of the Protobuf on which we execute Equal() +// Therefore we need deterministic way of marshaling Any which is part of the Protobuf on which we execute Equal() // // Based on proto.MarshalAny func MarshalAnyDeterministic(pb proto.Message) (*any.Any, error) { diff --git a/pkg/util/xds/v3/versioner.go b/pkg/util/xds/v3/versioner.go index 1c93f46af3a3..a6519f354854 100644 --- a/pkg/util/xds/v3/versioner.go +++ b/pkg/util/xds/v3/versioner.go @@ -24,7 +24,7 @@ func (v SnapshotAutoVersioner) Version(new, old Snapshot) Snapshot { for _, typ := range new.GetSupportedTypes() { version := new.GetVersion(typ) if version != "" { - // favour a version assigned by resource generator + // favor a version assigned by resource generator continue } if old != nil && v.equal(new.GetResources(typ), old.GetResources(typ)) { diff --git a/pkg/util/xds/versioner.go b/pkg/util/xds/versioner.go index b857c77bbb89..cbf67e06a214 100644 --- a/pkg/util/xds/versioner.go +++ b/pkg/util/xds/versioner.go @@ -24,7 +24,7 @@ func (v SnapshotAutoVersioner) Version(new, old Snapshot) Snapshot { for _, typ := range new.GetSupportedTypes() { version := new.GetVersion(typ) if version != "" { - // favour a version assigned by resource generator + // favor a version assigned by resource generator continue } if old != nil && v.equal(new.GetResources(typ), old.GetResources(typ)) { diff --git a/pkg/xds/bootstrap/generator.go b/pkg/xds/bootstrap/generator.go index d7ff93d5e93d..0121e1a3d5e7 100644 --- a/pkg/xds/bootstrap/generator.go +++ b/pkg/xds/bootstrap/generator.go @@ -31,7 +31,7 @@ import ( util_proto "github.com/kumahq/kuma/pkg/util/proto" "github.com/kumahq/kuma/pkg/xds/bootstrap/types" - // import Envoy protobuf definitions so (un)marshalling Envoy protobuf works in tests (normally it is imported in root.go) + // import Envoy protobuf definitions so (un)marshaling Envoy protobuf works in tests (normally it is imported in root.go) envoy_common "github.com/kumahq/kuma/pkg/xds/envoy" ) diff --git a/pkg/xds/cache/cla/cache_test.go b/pkg/xds/cache/cla/cache_test.go index 9f47e1adcea0..9486ef55e319 100644 --- a/pkg/xds/cache/cla/cache_test.go +++ b/pkg/xds/cache/cla/cache_test.go @@ -146,9 +146,9 @@ var _ = Describe("ClusterLoadAssignment Cache", func() { cla, err := claCache.GetCLA(context.Background(), "mesh-0", "", envoy_common.NewCluster(envoy_common.WithService("backend")), envoy_common.APIV3) Expect(err).ToNot(HaveOccurred()) - marshalled, err := json.Marshal(cla) // to imitate Read access to 'cla' + marshaled, err := json.Marshal(cla) // to imitate Read access to 'cla' Expect(err).ToNot(HaveOccurred()) - Expect(len(marshalled) > 0).To(BeTrue()) + Expect(len(marshaled) > 0).To(BeTrue()) wg.Done() }() } diff --git a/pkg/xds/envoy/listeners/v3/access_log_configurer.go b/pkg/xds/envoy/listeners/v3/access_log_configurer.go index d911dc971c02..f0cc808b03eb 100644 --- a/pkg/xds/envoy/listeners/v3/access_log_configurer.go +++ b/pkg/xds/envoy/listeners/v3/access_log_configurer.go @@ -89,14 +89,14 @@ func tcpAccessLog(format *accesslog.AccessLogFormat, cfgStr *structpb.Struct) (* if err := format.ConfigureHttpLog(httpGrpcAccessLog); err != nil { return nil, errors.Wrapf(err, "failed to configure %T according to the format string: %s", httpGrpcAccessLog, format) } - marshalled, err := proto.MarshalAnyDeterministic(httpGrpcAccessLog) + marshaled, err := proto.MarshalAnyDeterministic(httpGrpcAccessLog) if err != nil { return nil, errors.Wrapf(err, "could not marshall %T", httpGrpcAccessLog) } return &envoy_accesslog.AccessLog{ Name: "envoy.access_loggers.http_grpc", ConfigType: &envoy_accesslog.AccessLog_TypedConfig{ - TypedConfig: marshalled, + TypedConfig: marshaled, }, }, nil } @@ -121,14 +121,14 @@ func fileAccessLog(format *accesslog.AccessLogFormat, cfgStr *structpb.Struct) ( }, Path: cfg.Path, } - marshalled, err := proto.MarshalAnyDeterministic(fileAccessLog) + marshaled, err := proto.MarshalAnyDeterministic(fileAccessLog) if err != nil { return nil, errors.Wrapf(err, "could not marshall %T", fileAccessLog) } return &envoy_accesslog.AccessLog{ Name: "envoy.access_loggers.file", ConfigType: &envoy_accesslog.AccessLog_TypedConfig{ - TypedConfig: marshalled, + TypedConfig: marshaled, }, }, nil } diff --git a/pkg/xds/envoy/listeners/v3/http_access_log_configurer.go b/pkg/xds/envoy/listeners/v3/http_access_log_configurer.go index d43b9e9736f7..8009328d71ae 100644 --- a/pkg/xds/envoy/listeners/v3/http_access_log_configurer.go +++ b/pkg/xds/envoy/listeners/v3/http_access_log_configurer.go @@ -5,8 +5,7 @@ import ( envoy_hcm "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3" ) -const defaultHttpAccessLogFormat = `[%START_TIME%] %KUMA_MESH% "%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% "%REQ(X-FORWARDED-FOR)%" "%REQ(USER-AGENT)%" "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%KUMA_SOURCE_SERVICE%" "%KUMA_DESTINATION_SERVICE%" "%KUMA_SOURCE_ADDRESS_WITHOUT_PORT%" "%UPSTREAM_HOST%" -` // intentional newline at the end +const defaultHttpAccessLogFormat = `[%START_TIME%] %KUMA_MESH% "%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% "%REQ(X-FORWARDED-FOR)%" "%REQ(USER-AGENT)%" "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%KUMA_SOURCE_SERVICE%" "%KUMA_DESTINATION_SERVICE%" "%KUMA_SOURCE_ADDRESS_WITHOUT_PORT%" "%UPSTREAM_HOST%"` type HttpAccessLogConfigurer struct { AccessLogConfigurer diff --git a/pkg/xds/envoy/listeners/v3/http_access_log_configurer_test.go b/pkg/xds/envoy/listeners/v3/http_access_log_configurer_test.go index 101f8c628c7f..c1900558ce1d 100644 --- a/pkg/xds/envoy/listeners/v3/http_access_log_configurer_test.go +++ b/pkg/xds/envoy/listeners/v3/http_access_log_configurer_test.go @@ -125,7 +125,6 @@ var _ = Describe("HttpAccessLogConfigurer", func() { textFormatSource: inlineString: |+ [%START_TIME%] demo "%REQ(:method)% %REQ(x-envoy-original-path?:path)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(x-envoy-upstream-service-time)% "%REQ(x-forwarded-for)%" "%REQ(user-agent)%" "%REQ(x-request-id)%" "%REQ(:authority)%" "web" "backend" "192.168.0.1" "%UPSTREAM_HOST%" - path: /tmp/log httpFilters: - name: envoy.filters.http.router @@ -142,7 +141,6 @@ var _ = Describe("HttpAccessLogConfigurer", func() { backend: &mesh_proto.LoggingBackend{ Name: "tcp", Format: `[%START_TIME%] "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%REQ(ORIGIN)%" "%REQ(CONTENT-TYPE)%" "%KUMA_SOURCE_SERVICE%" "%KUMA_DESTINATION_SERVICE%" "%KUMA_SOURCE_ADDRESS%" "%KUMA_SOURCE_ADDRESS_WITHOUT_PORT%" "%UPSTREAM_HOST%" - "%RESP(SERVER):5%" "%TRAILER(GRPC-MESSAGE):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12" `, // intentional newline at the end Type: mesh_proto.LoggingTcpType, @@ -177,9 +175,8 @@ var _ = Describe("HttpAccessLogConfigurer", func() { clusterName: access_log_sink logName: |+ 127.0.0.1:1234;[%START_TIME%] "%REQ(x-request-id)%" "%REQ(:authority)%" "%REQ(origin)%" "%REQ(content-type)%" "web" "backend" "192.168.0.1:0" "192.168.0.1" "%UPSTREAM_HOST%" - "%RESP(server):5%" "%TRAILER(grpc-message):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12" - + transportApiVersion: V3 httpFilters: - name: envoy.filters.http.router diff --git a/pkg/xds/envoy/listeners/v3/network_access_log_configurer.go b/pkg/xds/envoy/listeners/v3/network_access_log_configurer.go index b1004619a155..bfd6add9ad44 100644 --- a/pkg/xds/envoy/listeners/v3/network_access_log_configurer.go +++ b/pkg/xds/envoy/listeners/v3/network_access_log_configurer.go @@ -5,8 +5,7 @@ import ( envoy_tcp "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/tcp_proxy/v3" ) -const defaultNetworkAccessLogFormat = `[%START_TIME%] %RESPONSE_FLAGS% %KUMA_MESH% %KUMA_SOURCE_ADDRESS_WITHOUT_PORT%(%KUMA_SOURCE_SERVICE%)->%UPSTREAM_HOST%(%KUMA_DESTINATION_SERVICE%) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes -` // intentional newline at the end +const defaultNetworkAccessLogFormat = `[%START_TIME%] %RESPONSE_FLAGS% %KUMA_MESH% %KUMA_SOURCE_ADDRESS_WITHOUT_PORT%(%KUMA_SOURCE_SERVICE%)->%UPSTREAM_HOST%(%KUMA_DESTINATION_SERVICE%) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes` type NetworkAccessLogConfigurer struct { AccessLogConfigurer diff --git a/pkg/xds/envoy/listeners/v3/network_access_log_configurer_test.go b/pkg/xds/envoy/listeners/v3/network_access_log_configurer_test.go index a1ed1437fe0e..ae55e3ebb9f9 100644 --- a/pkg/xds/envoy/listeners/v3/network_access_log_configurer_test.go +++ b/pkg/xds/envoy/listeners/v3/network_access_log_configurer_test.go @@ -130,7 +130,6 @@ var _ = Describe("NetworkAccessLogConfigurer", func() { textFormatSource: inlineString: |+ [%START_TIME%] %RESPONSE_FLAGS% demo 192.168.0.1(backend)->%UPSTREAM_HOST%(db) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes - path: /tmp/log cluster: db statPrefix: db @@ -149,7 +148,6 @@ var _ = Describe("NetworkAccessLogConfigurer", func() { backend: &mesh_proto.LoggingBackend{ Name: "tcp", Format: `[%START_TIME%] "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%REQ(ORIGIN)%" "%REQ(CONTENT-TYPE)%" "%KUMA_SOURCE_SERVICE%" "%KUMA_DESTINATION_SERVICE%" "%KUMA_SOURCE_ADDRESS%" "%KUMA_SOURCE_ADDRESS_WITHOUT_PORT%" "%UPSTREAM_HOST% - "%RESP(SERVER):5%" "%TRAILER(GRPC-MESSAGE):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12" `, // intentional newline at the end Type: mesh_proto.LoggingTcpType, @@ -184,9 +182,8 @@ var _ = Describe("NetworkAccessLogConfigurer", func() { clusterName: access_log_sink logName: |+ 127.0.0.1:1234;[%START_TIME%] "%REQ(x-request-id)%" "%REQ(:authority)%" "%REQ(origin)%" "%REQ(content-type)%" "backend" "db" "192.168.0.1:0" "192.168.0.1" "%UPSTREAM_HOST% - "%RESP(server):5%" "%TRAILER(grpc-message):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12" - + transportApiVersion: V3 cluster: db statPrefix: db diff --git a/pkg/xds/generator/inbound_proxy_generator.go b/pkg/xds/generator/inbound_proxy_generator.go index d9d6ce5a38fa..ba7beed6bcec 100644 --- a/pkg/xds/generator/inbound_proxy_generator.go +++ b/pkg/xds/generator/inbound_proxy_generator.go @@ -58,7 +58,7 @@ func (g InboundProxyGenerator) Generate(ctx xds_context.Context, proxy *model.Pr routes, err := g.buildInboundRoutes( envoy_common.NewCluster(envoy_common.WithService(localClusterName)), - proxy.Policies.RateLimits[endpoint]) + proxy.Policies.RateLimits.Inbound[endpoint]) if err != nil { return nil, err } @@ -74,7 +74,7 @@ func (g InboundProxyGenerator) Generate(ctx xds_context.Context, proxy *model.Pr filterChainBuilder. Configure(envoy_listeners.HttpConnectionManager(localClusterName, true)). Configure(envoy_listeners.FaultInjection(proxy.Policies.FaultInjections[endpoint])). - Configure(envoy_listeners.RateLimit(proxy.Policies.RateLimits[endpoint])). + Configure(envoy_listeners.RateLimit(proxy.Policies.RateLimits.Inbound[endpoint])). Configure(envoy_listeners.Tracing(proxy.Policies.TracingBackend, service)). Configure(envoy_listeners.HttpInboundRoutes(service, routes)) case core_mesh.ProtocolGRPC: @@ -82,7 +82,7 @@ func (g InboundProxyGenerator) Generate(ctx xds_context.Context, proxy *model.Pr Configure(envoy_listeners.HttpConnectionManager(localClusterName, true)). Configure(envoy_listeners.GrpcStats()). Configure(envoy_listeners.FaultInjection(proxy.Policies.FaultInjections[endpoint])). - Configure(envoy_listeners.RateLimit(proxy.Policies.RateLimits[endpoint])). + Configure(envoy_listeners.RateLimit(proxy.Policies.RateLimits.Inbound[endpoint])). Configure(envoy_listeners.Tracing(proxy.Policies.TracingBackend, service)). Configure(envoy_listeners.HttpInboundRoutes(service, routes)) case core_mesh.ProtocolKafka: @@ -105,7 +105,6 @@ func (g InboundProxyGenerator) Generate(ctx xds_context.Context, proxy *model.Pr listenerBuilder := envoy_listeners.NewListenerBuilder(proxy.APIVersion). Configure(envoy_listeners.InboundListener(inboundListenerName, endpoint.DataplaneIP, endpoint.DataplanePort, model.SocketAddressProtocolTCP)). - Configure(envoy_listeners.TLSInspector()). Configure(envoy_listeners.TransparentProxying(proxy.Dataplane.Spec.Networking.GetTransparentProxying())) switch ctx.Mesh.Resource.GetEnabledCertificateAuthorityBackend().GetMode() { @@ -114,6 +113,7 @@ func (g InboundProxyGenerator) Generate(ctx xds_context.Context, proxy *model.Pr Configure(envoy_listeners.FilterChain(filterChainBuilder(true))) case mesh_proto.CertificateAuthorityBackend_PERMISSIVE: listenerBuilder. + Configure(envoy_listeners.TLSInspector()). Configure(envoy_listeners.FilterChain(filterChainBuilder(false). Configure(envoy_listeners.FilterChainMatch("raw_buffer", nil, nil)))). Configure(envoy_listeners.FilterChain(filterChainBuilder(false). diff --git a/pkg/xds/generator/inbound_proxy_generator_test.go b/pkg/xds/generator/inbound_proxy_generator_test.go index b6c16a286c35..a0903e5a53a0 100644 --- a/pkg/xds/generator/inbound_proxy_generator_test.go +++ b/pkg/xds/generator/inbound_proxy_generator_test.go @@ -136,61 +136,63 @@ var _ = Describe("InboundProxyGenerator", func() { }, }, RateLimits: model.RateLimitsMap{ - mesh_proto.InboundInterface{ - DataplaneAdvertisedIP: "192.168.0.1", - DataplaneIP: "192.168.0.1", - DataplanePort: 80, - WorkloadIP: "127.0.0.1", - WorkloadPort: 8080, - }: []*mesh_proto.RateLimit{ - { - Sources: []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "frontend", + Inbound: model.InboundRateLimitsMap{ + mesh_proto.InboundInterface{ + DataplaneAdvertisedIP: "192.168.0.1", + DataplaneIP: "192.168.0.1", + DataplanePort: 80, + WorkloadIP: "127.0.0.1", + WorkloadPort: 8080, + }: []*mesh_proto.RateLimit{ + { + Sources: []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "frontend", + }, }, }, - }, - Destinations: []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "backend1", + Destinations: []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend1", + }, }, }, - }, - Conf: &mesh_proto.RateLimit_Conf{ - Http: &mesh_proto.RateLimit_Conf_Http{ - Requests: 200, - Interval: util_proto.Duration(time.Second * 10), + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 200, + Interval: util_proto.Duration(time.Second * 10), + }, }, }, - }, - { - Sources: []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "*", + { + Sources: []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "*", + }, }, }, - }, - Destinations: []*mesh_proto.Selector{ - { - Match: map[string]string{ - "kuma.io/service": "backend1", + Destinations: []*mesh_proto.Selector{ + { + Match: map[string]string{ + "kuma.io/service": "backend1", + }, }, }, - }, - Conf: &mesh_proto.RateLimit_Conf{ - Http: &mesh_proto.RateLimit_Conf_Http{ - Requests: 100, - Interval: util_proto.Duration(time.Second * 2), - OnRateLimit: &mesh_proto.RateLimit_Conf_Http_OnRateLimit{ - Status: util_proto.UInt32(404), - Headers: []*mesh_proto.RateLimit_Conf_Http_OnRateLimit_HeaderValue{ - { - Key: "x-rate-limited", - Value: "true", - Append: util_proto.Bool(false), + Conf: &mesh_proto.RateLimit_Conf{ + Http: &mesh_proto.RateLimit_Conf_Http{ + Requests: 100, + Interval: util_proto.Duration(time.Second * 2), + OnRateLimit: &mesh_proto.RateLimit_Conf_Http_OnRateLimit{ + Status: util_proto.UInt32(404), + Headers: []*mesh_proto.RateLimit_Conf_Http_OnRateLimit_HeaderValue{ + { + Key: "x-rate-limited", + Value: "true", + Append: util_proto.Bool(false), + }, }, }, }, diff --git a/pkg/xds/generator/outbound_proxy_generator.go b/pkg/xds/generator/outbound_proxy_generator.go index dba90688b6d9..b7d744075d1a 100644 --- a/pkg/xds/generator/outbound_proxy_generator.go +++ b/pkg/xds/generator/outbound_proxy_generator.go @@ -88,6 +88,10 @@ func (g OutboundProxyGenerator) Generate(ctx xds_context.Context, proxy *model.P func (_ OutboundProxyGenerator) generateLDS(proxy *model.Proxy, routes envoy_common.Routes, outbound *mesh_proto.Dataplane_Networking_Outbound, protocol core_mesh.Protocol) (envoy_common.NamedResource, error) { oface := proxy.Dataplane.Spec.Networking.ToOutboundInterface(outbound) + rateLimits := []*mesh_proto.RateLimit{} + if rateLimit, exists := proxy.Policies.RateLimits.Outbound[oface]; exists { + rateLimits = append(rateLimits, rateLimit) + } meshName := proxy.Dataplane.Meta.GetMesh() sourceService := proxy.Dataplane.Spec.GetIdentifyingService() serviceName := outbound.GetTagsIncludingLegacy()[mesh_proto.ServiceTag] @@ -106,12 +110,14 @@ func (_ OutboundProxyGenerator) generateLDS(proxy *model.Proxy, routes envoy_com Configure(envoy_listeners.Tracing(proxy.Policies.TracingBackend, sourceService)). Configure(envoy_listeners.HttpAccessLog(meshName, envoy_common.TrafficDirectionOutbound, sourceService, serviceName, proxy.Policies.Logs[serviceName], proxy)). Configure(envoy_listeners.HttpOutboundRoute(serviceName, routes, proxy.Dataplane.Spec.TagSet())). + Configure(envoy_listeners.RateLimit(rateLimits)). Configure(envoy_listeners.Retry(retryPolicy, protocol)). Configure(envoy_listeners.GrpcStats()) case core_mesh.ProtocolHTTP, core_mesh.ProtocolHTTP2: filterChainBuilder. Configure(envoy_listeners.HttpConnectionManager(serviceName, false)). Configure(envoy_listeners.Tracing(proxy.Policies.TracingBackend, sourceService)). + Configure(envoy_listeners.RateLimit(rateLimits)). Configure(envoy_listeners.HttpAccessLog( meshName, envoy_common.TrafficDirectionOutbound, @@ -249,7 +255,8 @@ func (_ OutboundProxyGenerator) inferProtocol(proxy *model.Proxy, clusters []env return InferServiceProtocol(allEndpoints) } -func (_ OutboundProxyGenerator) determineRoutes(proxy *model.Proxy, outbound *mesh_proto.Dataplane_Networking_Outbound, splitCounter *splitCounter) (routes envoy_common.Routes, err error) { +func (_ OutboundProxyGenerator) determineRoutes(proxy *model.Proxy, outbound *mesh_proto.Dataplane_Networking_Outbound, splitCounter *splitCounter) (envoy_common.Routes, error) { + var routes envoy_common.Routes oface := proxy.Dataplane.Spec.Networking.ToOutboundInterface(outbound) route := proxy.Routing.TrafficRoutes[oface] @@ -268,8 +275,10 @@ func (_ OutboundProxyGenerator) determineRoutes(proxy *model.Proxy, outbound *me // If we have same split in many HTTP matches we can use the same cluster with different weight clusterCache := map[string]string{} - clustersFromSplit := func(splits []*mesh_proto.TrafficRoute_Split) []envoy_common.Cluster { - var clusters []envoy_common.Cluster + // Return internal, external + clustersFromSplit := func(splits []*mesh_proto.TrafficRoute_Split) ([]envoy_common.Cluster, []envoy_common.Cluster) { + var clustersInternal []envoy_common.Cluster + var clustersExternal []envoy_common.Cluster for _, destination := range splits { service := destination.Destination[mesh_proto.ServiceTag] if destination.GetWeight().GetValue() == 0 { @@ -308,27 +317,41 @@ func (_ OutboundProxyGenerator) determineRoutes(proxy *model.Proxy, outbound *me clusterCache[cluster.Tags().String()] = cluster.Name() } - clusters = append(clusters, cluster) + if isExternalService { + clustersExternal = append(clustersExternal, cluster) + } else { + clustersInternal = append(clustersInternal, cluster) + } } - return clusters + return clustersInternal, clustersExternal } - for _, http := range route.Spec.GetConf().GetHttp() { - route := envoy_common.Route{ - Match: http.Match, - Modify: http.Modify, - Clusters: clustersFromSplit(http.GetSplitWithDestination()), + appendRoute := func(routes envoy_common.Routes, match *mesh_proto.TrafficRoute_Http_Match, modify *mesh_proto.TrafficRoute_Http_Modify, + clusters []envoy_common.Cluster, rateLimit *mesh_proto.RateLimit) envoy_common.Routes { + if len(clusters) == 0 { + return routes } - routes = append(routes, route) - } - if defaultDestination := route.Spec.GetConf().GetSplitWithDestination(); len(defaultDestination) > 0 { - cfs := clustersFromSplit(defaultDestination) route := envoy_common.Route{ - Match: nil, - Clusters: cfs, + Match: match, + Modify: modify, + RateLimit: rateLimit, + Clusters: clusters, } - routes = append(routes, route) + return append(routes, route) } - return + + for _, http := range route.Spec.GetConf().GetHttp() { + clustersInternal, clustersExternal := clustersFromSplit(http.GetSplitWithDestination()) + routes = appendRoute(routes, http.Match, http.Modify, clustersInternal, nil) + routes = appendRoute(routes, http.Match, http.Modify, clustersExternal, proxy.Policies.RateLimits.Outbound[oface]) + } + + if defaultDestination := route.Spec.GetConf().GetSplitWithDestination(); len(defaultDestination) != 0 { + clustersInternal, clustersExternal := clustersFromSplit(defaultDestination) + routes = appendRoute(routes, nil, nil, clustersInternal, nil) + routes = appendRoute(routes, nil, nil, clustersExternal, proxy.Policies.RateLimits.Outbound[oface]) + } + + return routes, nil } diff --git a/pkg/xds/generator/prometheus_endpoint_generator.go b/pkg/xds/generator/prometheus_endpoint_generator.go index 966ffb7928ed..c6b3a8b78a32 100644 --- a/pkg/xds/generator/prometheus_endpoint_generator.go +++ b/pkg/xds/generator/prometheus_endpoint_generator.go @@ -27,7 +27,7 @@ const OriginPrometheus = "prometheus" // When generating such a listener, it's important not to overshadow // a port that is already in use by the application or other Envoy listeners. // In the latter case we prefer not generate Prometheus endpoint at all -// rather than introduce undeterministic behaviour. +// rather than introduce undeterministic behavior. type PrometheusEndpointGenerator struct { } diff --git a/pkg/xds/generator/testdata/inbound-proxy/3-envoy-config.golden.yaml b/pkg/xds/generator/testdata/inbound-proxy/3-envoy-config.golden.yaml index b68bcbed7aae..8caa6ecd34ef 100644 --- a/pkg/xds/generator/testdata/inbound-proxy/3-envoy-config.golden.yaml +++ b/pkg/xds/generator/testdata/inbound-proxy/3-envoy-config.golden.yaml @@ -70,10 +70,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:443 trafficDirection: INBOUND - name: inbound:192.168.0.1:80 @@ -222,10 +218,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: inbound:192.168.0.2:443 @@ -267,10 +259,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.2:443 trafficDirection: INBOUND - name: inbound:192.168.0.2:80 @@ -331,9 +319,5 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.2:80 trafficDirection: INBOUND diff --git a/pkg/xds/generator/testdata/inbound-proxy/4-envoy-config.golden.yaml b/pkg/xds/generator/testdata/inbound-proxy/4-envoy-config.golden.yaml index 7ed272b68840..c8ff85acb3c1 100644 --- a/pkg/xds/generator/testdata/inbound-proxy/4-envoy-config.golden.yaml +++ b/pkg/xds/generator/testdata/inbound-proxy/4-envoy-config.golden.yaml @@ -71,10 +71,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:443 trafficDirection: INBOUND - name: inbound:192.168.0.1:80 @@ -224,10 +220,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: inbound:192.168.0.2:443 @@ -270,10 +262,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.2:443 trafficDirection: INBOUND - name: inbound:192.168.0.2:80 @@ -335,9 +323,5 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.2:80 trafficDirection: INBOUND diff --git a/pkg/xds/generator/testdata/outbound-proxy/03.envoy.golden.yaml b/pkg/xds/generator/testdata/outbound-proxy/03.envoy.golden.yaml index 570ecb274e60..b85889dde6d7 100644 --- a/pkg/xds/generator/testdata/outbound-proxy/03.envoy.golden.yaml +++ b/pkg/xds/generator/testdata/outbound-proxy/03.envoy.golden.yaml @@ -320,9 +320,8 @@ resources: '@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog logFormat: textFormatSource: - inlineString: |+ + inlineString: | [%START_TIME%] mesh1 "%REQ(:method)% %REQ(x-envoy-original-path?:path)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(x-envoy-upstream-service-time)% "%REQ(x-forwarded-for)%" "%REQ(user-agent)%" "%REQ(x-request-id)%" "%REQ(:authority)%" "gateway" "api-http" "10.0.0.1" "%UPSTREAM_HOST%" - path: /var/log httpFilters: - name: envoy.filters.http.router @@ -366,9 +365,8 @@ resources: grpcService: envoyGrpc: clusterName: access_log_sink - logName: |+ + logName: | logstash:1234;[%START_TIME%] %RESPONSE_FLAGS% mesh1 10.0.0.1(gateway)->%UPSTREAM_HOST%(api-tcp) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes - transportApiVersion: V3 cluster: api-tcp statPrefix: api-tcp diff --git a/pkg/xds/generator/testdata/outbound-proxy/04.envoy.golden.yaml b/pkg/xds/generator/testdata/outbound-proxy/04.envoy.golden.yaml index 57ef721bf8b6..1956c2feed6a 100644 --- a/pkg/xds/generator/testdata/outbound-proxy/04.envoy.golden.yaml +++ b/pkg/xds/generator/testdata/outbound-proxy/04.envoy.golden.yaml @@ -358,9 +358,8 @@ resources: '@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog logFormat: textFormatSource: - inlineString: |+ + inlineString: | [%START_TIME%] mesh1 "%REQ(:method)% %REQ(x-envoy-original-path?:path)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(x-envoy-upstream-service-time)% "%REQ(x-forwarded-for)%" "%REQ(user-agent)%" "%REQ(x-request-id)%" "%REQ(:authority)%" "web" "api-http" "10.0.0.1" "%UPSTREAM_HOST%" - path: /var/log httpFilters: - name: envoy.filters.http.router @@ -405,9 +404,8 @@ resources: grpcService: envoyGrpc: clusterName: access_log_sink - logName: |+ + logName: | logstash:1234;[%START_TIME%] %RESPONSE_FLAGS% mesh1 10.0.0.1(web)->%UPSTREAM_HOST%(api-tcp) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes - transportApiVersion: V3 cluster: api-tcp statPrefix: api-tcp diff --git a/pkg/xds/generator/testdata/profile-source/1-envoy-config.golden.yaml b/pkg/xds/generator/testdata/profile-source/1-envoy-config.golden.yaml index ba415dc46e1c..110a774f1a05 100644 --- a/pkg/xds/generator/testdata/profile-source/1-envoy-config.golden.yaml +++ b/pkg/xds/generator/testdata/profile-source/1-envoy-config.golden.yaml @@ -180,10 +180,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: kuma:envoy:admin diff --git a/pkg/xds/generator/testdata/profile-source/2-envoy-config.golden.yaml b/pkg/xds/generator/testdata/profile-source/2-envoy-config.golden.yaml index 5ee9822b69f0..2e74986e3975 100644 --- a/pkg/xds/generator/testdata/profile-source/2-envoy-config.golden.yaml +++ b/pkg/xds/generator/testdata/profile-source/2-envoy-config.golden.yaml @@ -201,10 +201,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: inbound:passthrough:ipv4 diff --git a/pkg/xds/generator/testdata/profile-source/3-envoy-config.golden.yaml b/pkg/xds/generator/testdata/profile-source/3-envoy-config.golden.yaml index ea00401e2b08..e75013b5f9ce 100644 --- a/pkg/xds/generator/testdata/profile-source/3-envoy-config.golden.yaml +++ b/pkg/xds/generator/testdata/profile-source/3-envoy-config.golden.yaml @@ -214,10 +214,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: kuma:envoy:admin diff --git a/pkg/xds/generator/testdata/profile-source/4-envoy-config.golden.yaml b/pkg/xds/generator/testdata/profile-source/4-envoy-config.golden.yaml index a838f61bc5ca..bce9fee86a7a 100644 --- a/pkg/xds/generator/testdata/profile-source/4-envoy-config.golden.yaml +++ b/pkg/xds/generator/testdata/profile-source/4-envoy-config.golden.yaml @@ -235,10 +235,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: inbound:passthrough:ipv4 diff --git a/pkg/xds/generator/testdata/template-proxy/1-envoy-config.golden.yaml b/pkg/xds/generator/testdata/template-proxy/1-envoy-config.golden.yaml index 655aac5392f4..0ff294b86a2f 100644 --- a/pkg/xds/generator/testdata/template-proxy/1-envoy-config.golden.yaml +++ b/pkg/xds/generator/testdata/template-proxy/1-envoy-config.golden.yaml @@ -91,10 +91,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: inbound:passthrough:ipv4 diff --git a/pkg/xds/generator/testdata/transparent-proxy/03.envoy.golden.yaml b/pkg/xds/generator/testdata/transparent-proxy/03.envoy.golden.yaml index ef157ead0e01..f46b186d331e 100644 --- a/pkg/xds/generator/testdata/transparent-proxy/03.envoy.golden.yaml +++ b/pkg/xds/generator/testdata/transparent-proxy/03.envoy.golden.yaml @@ -54,9 +54,8 @@ resources: '@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog logFormat: textFormatSource: - inlineString: |+ + inlineString: | [%START_TIME%] %RESPONSE_FLAGS% default (unknown)->%UPSTREAM_HOST%(external) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes - path: /var/log cluster: outbound:passthrough:ipv4 statPrefix: outbound_passthrough_ipv4 diff --git a/pkg/xds/server/v3/testdata/envoy-config.golden.yaml b/pkg/xds/server/v3/testdata/envoy-config.golden.yaml index 4fcbb681ca8a..d78b798347f8 100644 --- a/pkg/xds/server/v3/testdata/envoy-config.golden.yaml +++ b/pkg/xds/server/v3/testdata/envoy-config.golden.yaml @@ -91,10 +91,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:443 trafficDirection: INBOUND - name: inbound:192.168.0.1:80 @@ -150,10 +146,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.1:80 trafficDirection: INBOUND - name: inbound:192.168.0.2:443 @@ -196,10 +188,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.2:443 trafficDirection: INBOUND - name: inbound:192.168.0.2:80 @@ -242,10 +230,6 @@ resources: ads: {} resourceApiVersion: V3 requireClientCertificate: true - listenerFilters: - - name: envoy.filters.listener.tls_inspector - typedConfig: - '@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector name: inbound:192.168.0.2:80 trafficDirection: INBOUND - name: inbound:passthrough:ipv4 diff --git a/test/e2e/ratelimit/ratelimit_universal.go b/test/e2e/ratelimit/ratelimit_universal.go index 5cccce04bdd4..da5cd462eed5 100644 --- a/test/e2e/ratelimit/ratelimit_universal.go +++ b/test/e2e/ratelimit/ratelimit_universal.go @@ -6,6 +6,7 @@ import ( "github.com/kumahq/kuma/pkg/config/core" . "github.com/kumahq/kuma/test/framework" + "github.com/kumahq/kuma/test/framework/deployments/externalservice" ) func RateLimitOnUniversal() { @@ -63,6 +64,7 @@ conf: Install(TestServerUniversal("test-server", "default", testServerToken, WithArgs([]string{"echo", "--instance", "universal-1"}))). Install(DemoClientUniversal(AppModeDemoClient, "default", demoClientToken, WithTransparentProxy(true))). Install(DemoClientUniversal("web", "default", webToken, WithTransparentProxy(true))). + Install(externalservice.Install(externalservice.HttpServer, externalservice.UniversalAppEchoServer81)). Setup(cluster) Expect(err).ToNot(HaveOccurred()) @@ -95,6 +97,20 @@ conf: } } + verifyRateLimitExternal := func(client string, total int) func() int { + return func() int { + succeeded := 0 + for i := 0; i < total; i++ { + _, _, err := cluster.Exec("", "", client, "curl", "-v", "--fail", "external-service.mesh") + if err == nil { + succeeded++ + } + } + + return succeeded + } + } + It("should limit to 2 requests per 5 sec", func() { // demo-client specific RateLimit works Eventually(verifyRateLimit("demo-client", 5), "60s", "1s").Should(Equal(2)) @@ -175,4 +191,41 @@ conf: // verify determinism by running it once again with shorter timeout Eventually(verifyRateLimit("web", 5), "30s", "1s").Should(Equal(1)) }) + + It("should limit echo server as external service", func() { + externalService := ` +type: ExternalService +mesh: default +name: external-service +tags: + kuma.io/service: external-service + kuma.io/protocol: http +networking: + address: "kuma-3_externalservice-http-server:81" +` + specificRateLimitPolicy := ` +type: RateLimit +mesh: default +name: rate-limit-demo-client +sources: +- match: + kuma.io/service: "demo-client" +destinations: +- match: + kuma.io/service: "external-service" +conf: + http: + requests: 4 + interval: 10s +` + err := YamlUniversal(externalService)(cluster) + Expect(err).ToNot(HaveOccurred()) + err = YamlUniversal(specificRateLimitPolicy)(cluster) + Expect(err).ToNot(HaveOccurred()) + + // demo-client specific RateLimit works + Eventually(verifyRateLimitExternal("demo-client", 5), "60s", "1s").Should(Equal(4)) + // verify determinism by running it once again with shorter timeout + Eventually(verifyRateLimitExternal("demo-client", 5), "30s", "1s").Should(Equal(4)) + }) } diff --git a/test/e2e/trafficroute/universal_multizone/traffic_route.go b/test/e2e/trafficroute/universal_multizone/traffic_route.go index 03fe48c38505..38fb08057f82 100644 --- a/test/e2e/trafficroute/universal_multizone/traffic_route.go +++ b/test/e2e/trafficroute/universal_multizone/traffic_route.go @@ -378,7 +378,7 @@ conf: // If concurrency is low, we only initiate 2 connections to ZoneIngress which is not enough to cover all instances. // // We can adjust concurrency once https://github.com/kumahq/kuma/issues/1920 is fixed - // or if we change the behaviour of ZoneIngress + // or if we change the behavior of ZoneIngress if runtime.NumCPU() < 4 { Skip("concurrency too low") return diff --git a/test/framework/constants.go b/test/framework/constants.go index 3526f7a57bed..5c759468cde3 100644 --- a/test/framework/constants.go +++ b/test/framework/constants.go @@ -28,7 +28,6 @@ const ( defaultKumactlConfig = "${HOME}/.kumactl/%s-config" defaultKubeConfigPathPattern = "${HOME}/.kube/kind-%s-config" - envKUMACTLBIN = "KUMACTLBIN" envK8SCLUSTERS = "K8SCLUSTERS" envAPIVersion = "API_VERSION" envIPv6 = "IPV6" diff --git a/test/framework/env.go b/test/framework/env.go index a26045e45c9f..d86f62f77543 100644 --- a/test/framework/env.go +++ b/test/framework/env.go @@ -1,7 +1,11 @@ package framework import ( + "fmt" "os" + "path" + "path/filepath" + "runtime" "strconv" "strings" "time" @@ -115,8 +119,13 @@ func IsIPv6() bool { return envBool(envIPv6) } +// GetKumactlBin returns the path to the kumactl program. func GetKumactlBin() string { - return os.Getenv(envKUMACTLBIN) + if path := os.Getenv("KUMACTLBIN"); path != "" { + return path + } + + return path.Join(BuildArtifactsDir(), "kumactl", "kumactl") } func IsK8sClustersStarted() bool { @@ -133,3 +142,19 @@ func envBool(env string) bool { value, found := os.LookupEnv(env) return found && strings.ToLower(value) == "true" } + +// BuildArtifactsDir returns the path for Kuma build artifacts. +func BuildArtifactsDir() string { + // runtime.Caller returns the absolute path to this file on the + // local filesystem. From there, we can walk up to the directory + // tree to where we know the build artifacts are. + _, file, _, _ := runtime.Caller(0) + + return path.Join( + filepath.Dir(file), + "..", + "..", + "build", + fmt.Sprintf("artifacts-%s-%s", runtime.GOOS, runtime.GOARCH), + ) +} diff --git a/test/framework/universal_app.go b/test/framework/universal_app.go index 988bda4dda42..c9143492b20c 100644 --- a/test/framework/universal_app.go +++ b/test/framework/universal_app.go @@ -406,6 +406,20 @@ func (s *UniversalApp) CreateDP(token, cpAddress, name, mesh, ip, dpyaml string, s.dpApp = NewSshApp(s.verbose, s.ports[sshPort], []string{}, args) } +// iptablesChainExists tests whether iptables believes the given chainName +// has been created in the table given by tableName. If we can't run +// the iptables command, the chain is assumed to exist (for backwards +// compatibility) though subsequent commands that depend on it may +// still fail. +func (s *UniversalApp) iptablesChainExists(tableName string, chainName string) bool { + app := NewSshApp(s.verbose, s.ports[sshPort], []string{}, []string{ + "iptables", "-t", tableName, "-L", chainName, + }) + + err := app.Run() + return err == nil +} + func (s *UniversalApp) setupTransparent(cpIp string, builtindns bool) { args := []string{ "/usr/bin/kumactl", "install", "transparent-proxy", @@ -417,7 +431,13 @@ func (s *UniversalApp) setupTransparent(cpIp string, builtindns bool) { args = append(args, "--skip-resolv-conf", "--redirect-dns", - "--redirect-dns-upstream-target-chain", "DOCKER_OUTPUT") + ) + + if s.iptablesChainExists("nat", "DOCKER_OUTPUT") { + args = append(args, + "--redirect-dns-upstream-target-chain", "DOCKER_OUTPUT", + ) + } } app := NewSshApp(s.verbose, s.ports[sshPort], []string{}, args) diff --git a/tools/releases/dockerfiles/Dockerfile.kuma-cp b/tools/releases/dockerfiles/Dockerfile.kuma-cp index 1da761509458..917768f5604c 100644 --- a/tools/releases/dockerfiles/Dockerfile.kuma-cp +++ b/tools/releases/dockerfiles/Dockerfile.kuma-cp @@ -1,4 +1,4 @@ -FROM alpine:3.14.0 +FROM alpine:3.14.1 ADD $KUMA_ROOT/build/artifacts-linux-amd64/kuma-cp/kuma-cp /usr/bin diff --git a/tools/releases/dockerfiles/Dockerfile.kuma-prometheus-sd b/tools/releases/dockerfiles/Dockerfile.kuma-prometheus-sd index 007c46dc42fc..0ac7da961ba0 100644 --- a/tools/releases/dockerfiles/Dockerfile.kuma-prometheus-sd +++ b/tools/releases/dockerfiles/Dockerfile.kuma-prometheus-sd @@ -1,4 +1,4 @@ -FROM alpine:3.14.0 +FROM alpine:3.14.1 ADD $KUMA_ROOT/build/artifacts-linux-amd64/kuma-prometheus-sd/kuma-prometheus-sd /usr/bin diff --git a/tools/releases/dockerfiles/Dockerfile.kumactl b/tools/releases/dockerfiles/Dockerfile.kumactl index 890f10bec91c..30e59d7c19ec 100644 --- a/tools/releases/dockerfiles/Dockerfile.kumactl +++ b/tools/releases/dockerfiles/Dockerfile.kumactl @@ -1,4 +1,4 @@ -FROM alpine:3.14.0 +FROM alpine:3.14.1 RUN apk add --no-cache curl