Sipproxy update for routing affinity (#19254)

Risk Level: Medium
Testing: unit test & manual testing
Docs Changes: update sip proxy docs
Release Notes:
Platform Specific Features:

Signed-off-by: Mingling Ding <mingling.ding01@gmail.com>
Co-authored-by: Felix Du <durd07@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 7174c148a0763f2ed5863c3ab341d4a9ce01c54b
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 3846fffe24
commit ff47e0a4bd
  1. 1
      BUILD
  2. 13
      contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/BUILD
  3. 126
      contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/tra.proto
  4. 5
      contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/BUILD
  5. 15
      contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/sip_proxy.proto
  6. 1
      versioning/BUILD

@ -80,6 +80,7 @@ proto_library(
"//contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/rocketmq_proxy/v3:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg",
"//contrib/envoy/extensions/vcl/v3alpha:pkg",

@ -0,0 +1,13 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
has_services = True,
deps = [
"//envoy/config/core/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -0,0 +1,126 @@
syntax = "proto3";
package envoy.extensions.filters.network.sip_proxy.tra.v3alpha;
import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/grpc_service.proto";
import "google/protobuf/duration.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.tra.v3alpha";
option java_outer_classname = "TraProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/sip_proxy/tra/v3alpha";
option java_generic_services = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: TrafficRoutingAssistant]
service TraService {
rpc Create(TraServiceRequest) returns (TraServiceResponse) {
}
rpc Update(TraServiceRequest) returns (TraServiceResponse) {
}
rpc Retrieve(TraServiceRequest) returns (TraServiceResponse) {
}
rpc Delete(TraServiceRequest) returns (TraServiceResponse) {
}
rpc Subscribe(TraServiceRequest) returns (stream TraServiceResponse) {
}
}
message TraServiceConfig {
// Specifies the gRPC service that hosts the rate limit service. The client
// will connect to this cluster when it needs to make rate limit service
// requests.
config.core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
// API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and
// version of messages used on the wire.
config.core.v3.ApiVersion transport_api_version = 2
[(validate.rules).enum = {defined_only: true}];
google.protobuf.Duration timeout = 3;
}
// [#next-free-field: 7]
message TraServiceRequest {
string type = 1;
oneof request {
CreateRequest create_request = 2;
UpdateRequest update_request = 3;
RetrieveRequest retrieve_request = 4;
DeleteRequest delete_request = 5;
SubscribeRequest subscribe_request = 6;
}
}
// [#next-free-field: 9]
message TraServiceResponse {
string type = 1;
int32 ret = 2;
string reason = 3;
oneof response {
CreateResponse create_response = 4;
UpdateResponse update_response = 5;
RetrieveResponse retrieve_response = 6;
DeleteResponse delete_response = 7;
SubscribeResponse subscribe_response = 8;
}
}
message CreateRequest {
map<string, string> data = 1;
}
message CreateResponse {
}
message UpdateRequest {
map<string, string> data = 1;
}
message UpdateResponse {
}
message RetrieveRequest {
string key = 1;
}
message RetrieveResponse {
map<string, string> data = 1;
}
message DeleteRequest {
string key = 1;
}
message DeleteResponse {
}
message SubscribeRequest {
}
message SubscribeResponse {
map<string, string> data = 1;
}

@ -5,5 +5,8 @@ load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
deps = [
"//contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -2,6 +2,7 @@ syntax = "proto3";
package envoy.extensions.filters.network.sip_proxy.v3alpha;
import "contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/tra.proto";
import "contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto";
import "google/protobuf/any.proto";
@ -65,6 +66,8 @@ message SipProxy {
// points to domain match with own_domain
string domain_match_parameter_name = 3;
tra.v3alpha.TraServiceConfig tra_service_config = 4;
}
// The human readable prefix to use when emitting statistics.
@ -106,4 +109,16 @@ message SipProtocolOptions {
// The Register with Authorization header should go to the same endpoint which send out the 401 Unauthorized.
bool registration_affinity = 2;
// Customized affinity
repeated CustomizedAffinity customized_affinity = 3;
}
// For affinity
message CustomizedAffinity {
string key_name = 1;
bool query = 2;
bool subscribe = 3;
}

@ -17,6 +17,7 @@ proto_library(
"//contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/rocketmq_proxy/v3:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/sip_proxy/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg",
"//contrib/envoy/extensions/vcl/v3alpha:pkg",

Loading…
Cancel
Save