Merge pull request #256 from sjmshsh/feat_fixbug
remove redundant codes
diff --git a/api/mesh/v1alpha1/dataplane.pb.go b/api/mesh/v1alpha1/dataplane.pb.go
index e44d81f..ac772cc 100644
--- a/api/mesh/v1alpha1/dataplane.pb.go
+++ b/api/mesh/v1alpha1/dataplane.pb.go
@@ -809,7 +809,7 @@
0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e,
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,
- 0x86, 0x11, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x49, 0x0a,
+ 0x91, 0x11, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x49, 0x0a,
0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x29, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e,
@@ -938,18 +938,19 @@
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,
- 0x77, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61,
- 0x6e, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0b,
- 0x12, 0x09, 0x44, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 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, 0x0d, 0x3a, 0x0b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x70,
- 0x6c, 0x61, 0x6e, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x3a, 0x0c, 0x12, 0x0a, 0x64, 0x61,
- 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x58, 0x01,
- 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68,
- 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75,
- 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
+ 0x81, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x13, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x70, 0x6c,
+ 0x61, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01,
+ 0x0b, 0x12, 0x09, 0x44, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 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, 0x04, 0x52, 0x02, 0x08, 0x01, 0xaa, 0x8c, 0x89, 0xa6,
+ 0x01, 0x0d, 0x3a, 0x0b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0xaa,
+ 0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x3a, 0x0c, 0x12, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61,
+ 0x6e, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x58, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01,
+ 0x02, 0x68, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b,
+ 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
}
var (
diff --git a/api/mesh/v1alpha1/dataplane.proto b/api/mesh/v1alpha1/dataplane.proto
index c8a708e..382ec20 100644
--- a/api/mesh/v1alpha1/dataplane.proto
+++ b/api/mesh/v1alpha1/dataplane.proto
@@ -17,6 +17,7 @@
option (dubbo.mesh.resource).type = "Dataplane";
option (dubbo.mesh.resource).package = "mesh";
option (dubbo.mesh.resource).dds.send_to_zone = true;
+ option (dubbo.mesh.resource).dds.send_to_global = true;
option (dubbo.mesh.resource).ws.name = "dataplane";
option (dubbo.mesh.resource).ws.plural = "dataplanes";
option (dubbo.mesh.resource).scope_namespace = true;
diff --git a/api/mesh/v1alpha1/dds.pb.go b/api/mesh/v1alpha1/dds.pb.go
index 1ac46ed..f9ae117 100644
--- a/api/mesh/v1alpha1/dds.pb.go
+++ b/api/mesh/v1alpha1/dds.pb.go
@@ -171,528 +171,6 @@
return nil
}
-// XDSConfigRequest is a request for XDS Config Dump that is executed on Zone
-// CP.
-type XDSConfigRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // RequestID is a UUID of a request so we can correlate requests with response
- // on one stream.
- RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
- // Type of resource (Dataplane, ZoneIngress, ZoneEgress)
- ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
- // Name of the resource on which we execute config dump.
- ResourceName string `protobuf:"bytes,3,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
- // Mesh of the resource on which we execute config dump. Should be empty for
- // ZoneIngress, ZoneEgress.
- ResourceMesh string `protobuf:"bytes,4,opt,name=resource_mesh,json=resourceMesh,proto3" json:"resource_mesh,omitempty"`
-}
-
-func (x *XDSConfigRequest) Reset() {
- *x = XDSConfigRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *XDSConfigRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*XDSConfigRequest) ProtoMessage() {}
-
-func (x *XDSConfigRequest) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[3]
- 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 XDSConfigRequest.ProtoReflect.Descriptor instead.
-func (*XDSConfigRequest) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_dds_proto_rawDescGZIP(), []int{3}
-}
-
-func (x *XDSConfigRequest) GetRequestId() string {
- if x != nil {
- return x.RequestId
- }
- return ""
-}
-
-func (x *XDSConfigRequest) GetResourceType() string {
- if x != nil {
- return x.ResourceType
- }
- return ""
-}
-
-func (x *XDSConfigRequest) GetResourceName() string {
- if x != nil {
- return x.ResourceName
- }
- return ""
-}
-
-func (x *XDSConfigRequest) GetResourceMesh() string {
- if x != nil {
- return x.ResourceMesh
- }
- return ""
-}
-
-// XDSConfigRequest is a response containing result of XDS Config Dump execution
-// on Zone CP.
-type XDSConfigResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // RequestID is a UUID that was set by the Global CP.
- RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
- // Types that are assignable to Result:
- //
- // *XDSConfigResponse_Error
- // *XDSConfigResponse_Config
- Result isXDSConfigResponse_Result `protobuf_oneof:"result"`
-}
-
-func (x *XDSConfigResponse) Reset() {
- *x = XDSConfigResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *XDSConfigResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*XDSConfigResponse) ProtoMessage() {}
-
-func (x *XDSConfigResponse) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[4]
- 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 XDSConfigResponse.ProtoReflect.Descriptor instead.
-func (*XDSConfigResponse) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_dds_proto_rawDescGZIP(), []int{4}
-}
-
-func (x *XDSConfigResponse) GetRequestId() string {
- if x != nil {
- return x.RequestId
- }
- return ""
-}
-
-func (m *XDSConfigResponse) GetResult() isXDSConfigResponse_Result {
- if m != nil {
- return m.Result
- }
- return nil
-}
-
-func (x *XDSConfigResponse) GetError() string {
- if x, ok := x.GetResult().(*XDSConfigResponse_Error); ok {
- return x.Error
- }
- return ""
-}
-
-func (x *XDSConfigResponse) GetConfig() []byte {
- if x, ok := x.GetResult().(*XDSConfigResponse_Config); ok {
- return x.Config
- }
- return nil
-}
-
-type isXDSConfigResponse_Result interface {
- isXDSConfigResponse_Result()
-}
-
-type XDSConfigResponse_Error struct {
- // Error that was captured by the Zone CP when executing XDS Config Dump.
- Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
-}
-
-type XDSConfigResponse_Config struct {
- // The XDS Config that is a successful result of XDS Config dump execution.
- Config []byte `protobuf:"bytes,3,opt,name=config,proto3,oneof"`
-}
-
-func (*XDSConfigResponse_Error) isXDSConfigResponse_Result() {}
-
-func (*XDSConfigResponse_Config) isXDSConfigResponse_Result() {}
-
-// StatsRequest is a request for dubbo-dp stats that is executed on Zone CP.
-type StatsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // RequestID is a UUID of a request so we can correlate requests with response
- // on one stream.
- RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
- // Type of resource (Dataplane, ZoneIngress, ZoneEgress)
- ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
- // Name of the resource on which we execute dubbo-dp stats request.
- ResourceName string `protobuf:"bytes,3,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
- // Mesh of the resource on which we execute dubbo-dp stats request.
- // Should be empty for ZoneIngress, ZoneEgress.
- ResourceMesh string `protobuf:"bytes,4,opt,name=resource_mesh,json=resourceMesh,proto3" json:"resource_mesh,omitempty"`
-}
-
-func (x *StatsRequest) Reset() {
- *x = StatsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *StatsRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*StatsRequest) ProtoMessage() {}
-
-func (x *StatsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[5]
- 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 StatsRequest.ProtoReflect.Descriptor instead.
-func (*StatsRequest) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_dds_proto_rawDescGZIP(), []int{5}
-}
-
-func (x *StatsRequest) GetRequestId() string {
- if x != nil {
- return x.RequestId
- }
- return ""
-}
-
-func (x *StatsRequest) GetResourceType() string {
- if x != nil {
- return x.ResourceType
- }
- return ""
-}
-
-func (x *StatsRequest) GetResourceName() string {
- if x != nil {
- return x.ResourceName
- }
- return ""
-}
-
-func (x *StatsRequest) GetResourceMesh() string {
- if x != nil {
- return x.ResourceMesh
- }
- return ""
-}
-
-// StatsResponse is a response containing result of dubbo-dp stats execution on
-// Zone CP.
-type StatsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // RequestID is a UUID that was set by the Global CP.
- RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
- // Types that are assignable to Result:
- //
- // *StatsResponse_Error
- // *StatsResponse_Stats
- Result isStatsResponse_Result `protobuf_oneof:"result"`
-}
-
-func (x *StatsResponse) Reset() {
- *x = StatsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *StatsResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*StatsResponse) ProtoMessage() {}
-
-func (x *StatsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use StatsResponse.ProtoReflect.Descriptor instead.
-func (*StatsResponse) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_dds_proto_rawDescGZIP(), []int{6}
-}
-
-func (x *StatsResponse) GetRequestId() string {
- if x != nil {
- return x.RequestId
- }
- return ""
-}
-
-func (m *StatsResponse) GetResult() isStatsResponse_Result {
- if m != nil {
- return m.Result
- }
- return nil
-}
-
-func (x *StatsResponse) GetError() string {
- if x, ok := x.GetResult().(*StatsResponse_Error); ok {
- return x.Error
- }
- return ""
-}
-
-func (x *StatsResponse) GetStats() []byte {
- if x, ok := x.GetResult().(*StatsResponse_Stats); ok {
- return x.Stats
- }
- return nil
-}
-
-type isStatsResponse_Result interface {
- isStatsResponse_Result()
-}
-
-type StatsResponse_Error struct {
- // Error that was captured by the Zone CP when executing dubbo-dp stats
- // request.
- Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
-}
-
-type StatsResponse_Stats struct {
- // The stats content that is a successful result of dubbo-dp stats
- // execution.
- Stats []byte `protobuf:"bytes,3,opt,name=stats,proto3,oneof"`
-}
-
-func (*StatsResponse_Error) isStatsResponse_Result() {}
-
-func (*StatsResponse_Stats) isStatsResponse_Result() {}
-
-// ClustersRequest is a request for dubbo-dp clusters that is executed on Zone
-// CP.
-type ClustersRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // RequestID is a UUID of a request so we can correlate requests with response
- // on one stream.
- RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
- // Type of resource (Dataplane, ZoneIngress, ZoneEgress)
- ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
- // Name of the resource on which we execute dubbo-dp clusters request.
- ResourceName string `protobuf:"bytes,3,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
- // Mesh of the resource on which we execute dubbo-dp clusters request.
- // Should be empty for ZoneIngress, ZoneEgress.
- ResourceMesh string `protobuf:"bytes,4,opt,name=resource_mesh,json=resourceMesh,proto3" json:"resource_mesh,omitempty"`
-}
-
-func (x *ClustersRequest) Reset() {
- *x = ClustersRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ClustersRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ClustersRequest) ProtoMessage() {}
-
-func (x *ClustersRequest) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[7]
- 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 ClustersRequest.ProtoReflect.Descriptor instead.
-func (*ClustersRequest) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_dds_proto_rawDescGZIP(), []int{7}
-}
-
-func (x *ClustersRequest) GetRequestId() string {
- if x != nil {
- return x.RequestId
- }
- return ""
-}
-
-func (x *ClustersRequest) GetResourceType() string {
- if x != nil {
- return x.ResourceType
- }
- return ""
-}
-
-func (x *ClustersRequest) GetResourceName() string {
- if x != nil {
- return x.ResourceName
- }
- return ""
-}
-
-func (x *ClustersRequest) GetResourceMesh() string {
- if x != nil {
- return x.ResourceMesh
- }
- return ""
-}
-
-// ClustersResponse is a response containing result of dubbo-dp clusters
-// execution on Zone CP.
-type ClustersResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // RequestID is a UUID that was set by the Global CP.
- RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
- // Types that are assignable to Result:
- //
- // *ClustersResponse_Error
- // *ClustersResponse_Clusters
- Result isClustersResponse_Result `protobuf_oneof:"result"`
-}
-
-func (x *ClustersResponse) Reset() {
- *x = ClustersResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ClustersResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ClustersResponse) ProtoMessage() {}
-
-func (x *ClustersResponse) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[8]
- 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 ClustersResponse.ProtoReflect.Descriptor instead.
-func (*ClustersResponse) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_dds_proto_rawDescGZIP(), []int{8}
-}
-
-func (x *ClustersResponse) GetRequestId() string {
- if x != nil {
- return x.RequestId
- }
- return ""
-}
-
-func (m *ClustersResponse) GetResult() isClustersResponse_Result {
- if m != nil {
- return m.Result
- }
- return nil
-}
-
-func (x *ClustersResponse) GetError() string {
- if x, ok := x.GetResult().(*ClustersResponse_Error); ok {
- return x.Error
- }
- return ""
-}
-
-func (x *ClustersResponse) GetClusters() []byte {
- if x, ok := x.GetResult().(*ClustersResponse_Clusters); ok {
- return x.Clusters
- }
- return nil
-}
-
-type isClustersResponse_Result interface {
- isClustersResponse_Result()
-}
-
-type ClustersResponse_Error struct {
- // Error that was captured by the Zone CP when executing dubbo-dp clusters
- // request.
- Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
-}
-
-type ClustersResponse_Clusters struct {
- // The clusters content that is a successful result of dubbo-dp clusters
- // execution.
- Clusters []byte `protobuf:"bytes,3,opt,name=clusters,proto3,oneof"`
-}
-
-func (*ClustersResponse_Error) isClustersResponse_Result() {}
-
-func (*ClustersResponse_Clusters) isClustersResponse_Result() {}
-
type DubboResource_Meta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -707,7 +185,7 @@
func (x *DubboResource_Meta) Reset() {
*x = DubboResource_Meta{}
if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[9]
+ mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -720,7 +198,7 @@
func (*DubboResource_Meta) ProtoMessage() {}
func (x *DubboResource_Meta) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[9]
+ mi := &file_api_mesh_v1alpha1_dds_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -804,114 +282,45 @@
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, 0x22, 0xa0, 0x01, 0x0a, 0x10, 0x58, 0x44, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
- 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x68,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x4d, 0x65, 0x73, 0x68, 0x22, 0x6e, 0x0a, 0x11, 0x58, 0x44, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
- 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
- 0x12, 0x18, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
- 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23,
- 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x68, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x65, 0x73, 0x68, 0x22, 0x68, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
- 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x73,
- 0x74, 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74,
- 0x61, 0x74, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x9f, 0x01,
- 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64,
- 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x73, 0x68, 0x22,
- 0x71, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x49, 0x64, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x08, 0x63, 0x6c,
- 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x08,
- 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x32, 0x90, 0x01, 0x0a, 0x15, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x44, 0x69, 0x73, 0x63,
- 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x14,
- 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76,
- 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e,
- 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x28, 0x01, 0x30, 0x01, 0x32, 0xa0, 0x03, 0x0a, 0x10, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c,
- 0x44, 0x44, 0x53, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x10, 0x53, 0x74,
- 0x72, 0x65, 0x61, 0x6d, 0x58, 0x44, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x26,
- 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x58, 0x44, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x25, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d,
- 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x58, 0x44, 0x53,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30,
- 0x01, 0x12, 0x58, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73,
- 0x12, 0x22, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x21, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73,
- 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0e, 0x53,
- 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x25, 0x2e,
- 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x24, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73,
- 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74,
- 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x68,
- 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2b, 0x2e,
- 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68,
- 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x75, 0x62,
- 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8e, 0x02, 0x0a, 0x0e, 0x44, 0x44, 0x53,
- 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x10, 0x47,
- 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x54, 0x6f, 0x5a, 0x6f, 0x6e, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x12,
- 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
- 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c,
- 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e,
- 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7d, 0x0a, 0x10, 0x5a, 0x6f,
- 0x6e, 0x65, 0x54, 0x6f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x32,
- 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64,
- 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74,
- 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x1a, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e,
- 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74,
- 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64,
- 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
+ 0x6c, 0x32, 0x90, 0x01, 0x0a, 0x15, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x44, 0x69, 0x73, 0x63, 0x6f,
+ 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x14, 0x53,
+ 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33,
+ 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44,
+ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x28, 0x01, 0x30, 0x01, 0x32, 0x7c, 0x0a, 0x10, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x44, 0x44,
+ 0x53, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c,
+ 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e,
+ 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x5a, 0x6f,
+ 0x6e, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73,
+ 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x48,
+ 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x32, 0x8e, 0x02, 0x0a, 0x0e, 0x44, 0x44, 0x53, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x10, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x54,
+ 0x6f, 0x5a, 0x6f, 0x6e, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
+ 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63,
+ 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44,
+ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x28, 0x01, 0x30, 0x01, 0x12, 0x7d, 0x0a, 0x10, 0x5a, 0x6f, 0x6e, 0x65, 0x54, 0x6f, 0x47, 0x6c,
+ 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65,
+ 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f,
+ 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x31, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44,
+ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28,
+ 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b,
+ 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
}
var (
@@ -926,47 +335,35 @@
return file_api_mesh_v1alpha1_dds_proto_rawDescData
}
-var file_api_mesh_v1alpha1_dds_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_api_mesh_v1alpha1_dds_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_api_mesh_v1alpha1_dds_proto_goTypes = []interface{}{
(*DubboResource)(nil), // 0: dubbo.mesh.v1alpha1.DubboResource
(*ZoneHealthCheckRequest)(nil), // 1: dubbo.mesh.v1alpha1.ZoneHealthCheckRequest
(*ZoneHealthCheckResponse)(nil), // 2: dubbo.mesh.v1alpha1.ZoneHealthCheckResponse
- (*XDSConfigRequest)(nil), // 3: dubbo.mesh.v1alpha1.XDSConfigRequest
- (*XDSConfigResponse)(nil), // 4: dubbo.mesh.v1alpha1.XDSConfigResponse
- (*StatsRequest)(nil), // 5: dubbo.mesh.v1alpha1.StatsRequest
- (*StatsResponse)(nil), // 6: dubbo.mesh.v1alpha1.StatsResponse
- (*ClustersRequest)(nil), // 7: dubbo.mesh.v1alpha1.ClustersRequest
- (*ClustersResponse)(nil), // 8: dubbo.mesh.v1alpha1.ClustersResponse
- (*DubboResource_Meta)(nil), // 9: dubbo.mesh.v1alpha1.DubboResource.Meta
- nil, // 10: dubbo.mesh.v1alpha1.DubboResource.Meta.LabelsEntry
- (*anypb.Any)(nil), // 11: google.protobuf.Any
- (*durationpb.Duration)(nil), // 12: google.protobuf.Duration
- (*v3.DiscoveryRequest)(nil), // 13: envoy.service.discovery.v3.DiscoveryRequest
- (*v3.DeltaDiscoveryRequest)(nil), // 14: envoy.service.discovery.v3.DeltaDiscoveryRequest
- (*v3.DeltaDiscoveryResponse)(nil), // 15: envoy.service.discovery.v3.DeltaDiscoveryResponse
- (*v3.DiscoveryResponse)(nil), // 16: envoy.service.discovery.v3.DiscoveryResponse
+ (*DubboResource_Meta)(nil), // 3: dubbo.mesh.v1alpha1.DubboResource.Meta
+ nil, // 4: dubbo.mesh.v1alpha1.DubboResource.Meta.LabelsEntry
+ (*anypb.Any)(nil), // 5: google.protobuf.Any
+ (*durationpb.Duration)(nil), // 6: google.protobuf.Duration
+ (*v3.DiscoveryRequest)(nil), // 7: envoy.service.discovery.v3.DiscoveryRequest
+ (*v3.DeltaDiscoveryRequest)(nil), // 8: envoy.service.discovery.v3.DeltaDiscoveryRequest
+ (*v3.DeltaDiscoveryResponse)(nil), // 9: envoy.service.discovery.v3.DeltaDiscoveryResponse
+ (*v3.DiscoveryResponse)(nil), // 10: envoy.service.discovery.v3.DiscoveryResponse
}
var file_api_mesh_v1alpha1_dds_proto_depIdxs = []int32{
- 9, // 0: dubbo.mesh.v1alpha1.DubboResource.meta:type_name -> dubbo.mesh.v1alpha1.DubboResource.Meta
- 11, // 1: dubbo.mesh.v1alpha1.DubboResource.spec:type_name -> google.protobuf.Any
- 12, // 2: dubbo.mesh.v1alpha1.ZoneHealthCheckResponse.interval:type_name -> google.protobuf.Duration
- 10, // 3: dubbo.mesh.v1alpha1.DubboResource.Meta.labels:type_name -> dubbo.mesh.v1alpha1.DubboResource.Meta.LabelsEntry
- 13, // 4: dubbo.mesh.v1alpha1.DubboDiscoveryService.StreamDubboResources:input_type -> envoy.service.discovery.v3.DiscoveryRequest
- 4, // 5: dubbo.mesh.v1alpha1.GlobalDDSService.StreamXDSConfigs:input_type -> dubbo.mesh.v1alpha1.XDSConfigResponse
- 6, // 6: dubbo.mesh.v1alpha1.GlobalDDSService.StreamStats:input_type -> dubbo.mesh.v1alpha1.StatsResponse
- 8, // 7: dubbo.mesh.v1alpha1.GlobalDDSService.StreamClusters:input_type -> dubbo.mesh.v1alpha1.ClustersResponse
- 1, // 8: dubbo.mesh.v1alpha1.GlobalDDSService.HealthCheck:input_type -> dubbo.mesh.v1alpha1.ZoneHealthCheckRequest
- 14, // 9: dubbo.mesh.v1alpha1.DDSSyncService.GlobalToZoneSync:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest
- 15, // 10: dubbo.mesh.v1alpha1.DDSSyncService.ZoneToGlobalSync:input_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse
- 16, // 11: dubbo.mesh.v1alpha1.DubboDiscoveryService.StreamDubboResources:output_type -> envoy.service.discovery.v3.DiscoveryResponse
- 3, // 12: dubbo.mesh.v1alpha1.GlobalDDSService.StreamXDSConfigs:output_type -> dubbo.mesh.v1alpha1.XDSConfigRequest
- 5, // 13: dubbo.mesh.v1alpha1.GlobalDDSService.StreamStats:output_type -> dubbo.mesh.v1alpha1.StatsRequest
- 7, // 14: dubbo.mesh.v1alpha1.GlobalDDSService.StreamClusters:output_type -> dubbo.mesh.v1alpha1.ClustersRequest
- 2, // 15: dubbo.mesh.v1alpha1.GlobalDDSService.HealthCheck:output_type -> dubbo.mesh.v1alpha1.ZoneHealthCheckResponse
- 15, // 16: dubbo.mesh.v1alpha1.DDSSyncService.GlobalToZoneSync:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse
- 14, // 17: dubbo.mesh.v1alpha1.DDSSyncService.ZoneToGlobalSync:output_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest
- 11, // [11:18] is the sub-list for method output_type
- 4, // [4:11] is the sub-list for method input_type
+ 3, // 0: dubbo.mesh.v1alpha1.DubboResource.meta:type_name -> dubbo.mesh.v1alpha1.DubboResource.Meta
+ 5, // 1: dubbo.mesh.v1alpha1.DubboResource.spec:type_name -> google.protobuf.Any
+ 6, // 2: dubbo.mesh.v1alpha1.ZoneHealthCheckResponse.interval:type_name -> google.protobuf.Duration
+ 4, // 3: dubbo.mesh.v1alpha1.DubboResource.Meta.labels:type_name -> dubbo.mesh.v1alpha1.DubboResource.Meta.LabelsEntry
+ 7, // 4: dubbo.mesh.v1alpha1.DubboDiscoveryService.StreamDubboResources:input_type -> envoy.service.discovery.v3.DiscoveryRequest
+ 1, // 5: dubbo.mesh.v1alpha1.GlobalDDSService.HealthCheck:input_type -> dubbo.mesh.v1alpha1.ZoneHealthCheckRequest
+ 8, // 6: dubbo.mesh.v1alpha1.DDSSyncService.GlobalToZoneSync:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest
+ 9, // 7: dubbo.mesh.v1alpha1.DDSSyncService.ZoneToGlobalSync:input_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse
+ 10, // 8: dubbo.mesh.v1alpha1.DubboDiscoveryService.StreamDubboResources:output_type -> envoy.service.discovery.v3.DiscoveryResponse
+ 2, // 9: dubbo.mesh.v1alpha1.GlobalDDSService.HealthCheck:output_type -> dubbo.mesh.v1alpha1.ZoneHealthCheckResponse
+ 9, // 10: dubbo.mesh.v1alpha1.DDSSyncService.GlobalToZoneSync:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse
+ 8, // 11: dubbo.mesh.v1alpha1.DDSSyncService.ZoneToGlobalSync:output_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest
+ 8, // [8:12] is the sub-list for method output_type
+ 4, // [4:8] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
@@ -1015,78 +412,6 @@
}
}
file_api_mesh_v1alpha1_dds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*XDSConfigRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*XDSConfigResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StatsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StatsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ClustersRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ClustersResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DubboResource_Meta); i {
case 0:
return &v.state
@@ -1099,25 +424,13 @@
}
}
}
- file_api_mesh_v1alpha1_dds_proto_msgTypes[4].OneofWrappers = []interface{}{
- (*XDSConfigResponse_Error)(nil),
- (*XDSConfigResponse_Config)(nil),
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[6].OneofWrappers = []interface{}{
- (*StatsResponse_Error)(nil),
- (*StatsResponse_Stats)(nil),
- }
- file_api_mesh_v1alpha1_dds_proto_msgTypes[8].OneofWrappers = []interface{}{
- (*ClustersResponse_Error)(nil),
- (*ClustersResponse_Clusters)(nil),
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_mesh_v1alpha1_dds_proto_rawDesc,
NumEnums: 0,
- NumMessages: 11,
+ NumMessages: 5,
NumExtensions: 0,
NumServices: 3,
},
diff --git a/api/mesh/v1alpha1/dds.proto b/api/mesh/v1alpha1/dds.proto
index 70de3a4..7db41de 100644
--- a/api/mesh/v1alpha1/dds.proto
+++ b/api/mesh/v1alpha1/dds.proto
@@ -33,21 +33,6 @@
}
service GlobalDDSService {
- // StreamXDSConfigs is logically a service exposed by Zone CP so Global CP can
- // execute Config Dumps. It is however represented by bi-directional streaming
- // to leverage existing connection from Zone CP to Global CP.
- rpc StreamXDSConfigs(stream XDSConfigResponse)
- returns (stream XDSConfigRequest);
- // StreamStats is logically a service exposed by Zone CP so Global CP can
- // execute dubbo-dp stats requests. It is however represented by
- // bi-directional streaming to leverage existing connection from Zone CP to
- // Global CP.
- rpc StreamStats(stream StatsResponse) returns (stream StatsRequest);
- // StreamStats is logically a service exposed by Zone CP so Global CP can
- // execute dubbo-dp clusters request. It is however represented by
- // bi-directional streaming to leverage existing connection from Zone CP to
- // Global CP.
- rpc StreamClusters(stream ClustersResponse) returns (stream ClustersRequest);
// HealthCheck allows us to implement a health check that works across
// proxies, unlike HTTP/2 PING frames.
rpc HealthCheck(ZoneHealthCheckRequest) returns (ZoneHealthCheckResponse);
@@ -69,96 +54,3 @@
rpc ZoneToGlobalSync(stream envoy.service.discovery.v3.DeltaDiscoveryResponse)
returns (stream envoy.service.discovery.v3.DeltaDiscoveryRequest);
}
-
-// XDSConfigRequest is a request for XDS Config Dump that is executed on Zone
-// CP.
-message XDSConfigRequest {
- // RequestID is a UUID of a request so we can correlate requests with response
- // on one stream.
- string request_id = 1;
-
- // Type of resource (Dataplane, ZoneIngress, ZoneEgress)
- string resource_type = 2;
- // Name of the resource on which we execute config dump.
- string resource_name = 3;
- // Mesh of the resource on which we execute config dump. Should be empty for
- // ZoneIngress, ZoneEgress.
- string resource_mesh = 4;
-}
-
-// XDSConfigRequest is a response containing result of XDS Config Dump execution
-// on Zone CP.
-message XDSConfigResponse {
- // RequestID is a UUID that was set by the Global CP.
- string request_id = 1;
-
- oneof result {
- // Error that was captured by the Zone CP when executing XDS Config Dump.
- string error = 2;
- // The XDS Config that is a successful result of XDS Config dump execution.
- bytes config = 3;
- }
-}
-
-// StatsRequest is a request for dubbo-dp stats that is executed on Zone CP.
-message StatsRequest {
- // RequestID is a UUID of a request so we can correlate requests with response
- // on one stream.
- string request_id = 1;
-
- // Type of resource (Dataplane, ZoneIngress, ZoneEgress)
- string resource_type = 2;
- // Name of the resource on which we execute dubbo-dp stats request.
- string resource_name = 3;
- // Mesh of the resource on which we execute dubbo-dp stats request.
- // Should be empty for ZoneIngress, ZoneEgress.
- string resource_mesh = 4;
-}
-
-// StatsResponse is a response containing result of dubbo-dp stats execution on
-// Zone CP.
-message StatsResponse {
- // RequestID is a UUID that was set by the Global CP.
- string request_id = 1;
-
- oneof result {
- // Error that was captured by the Zone CP when executing dubbo-dp stats
- // request.
- string error = 2;
- // The stats content that is a successful result of dubbo-dp stats
- // execution.
- bytes stats = 3;
- }
-}
-
-// ClustersRequest is a request for dubbo-dp clusters that is executed on Zone
-// CP.
-message ClustersRequest {
- // RequestID is a UUID of a request so we can correlate requests with response
- // on one stream.
- string request_id = 1;
-
- // Type of resource (Dataplane, ZoneIngress, ZoneEgress)
- string resource_type = 2;
- // Name of the resource on which we execute dubbo-dp clusters request.
- string resource_name = 3;
- // Mesh of the resource on which we execute dubbo-dp clusters request.
- // Should be empty for ZoneIngress, ZoneEgress.
- string resource_mesh = 4;
-}
-
-// ClustersResponse is a response containing result of dubbo-dp clusters
-// execution on Zone CP.
-message ClustersResponse {
- // RequestID is a UUID that was set by the Global CP.
- string request_id = 1;
-
- oneof result {
- // Error that was captured by the Zone CP when executing dubbo-dp clusters
- // request.
- string error = 2;
- // The clusters content that is a successful result of dubbo-dp clusters
- // execution.
- bytes clusters = 3;
- }
-}
diff --git a/api/mesh/v1alpha1/dds_grpc.pb.go b/api/mesh/v1alpha1/dds_grpc.pb.go
index c90de7b..e937cd2 100644
--- a/api/mesh/v1alpha1/dds_grpc.pb.go
+++ b/api/mesh/v1alpha1/dds_grpc.pb.go
@@ -141,20 +141,6 @@
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type GlobalDDSServiceClient interface {
- // StreamXDSConfigs is logically a service exposed by Zone CP so Global CP can
- // execute Config Dumps. It is however represented by bi-directional streaming
- // to leverage existing connection from Zone CP to Global CP.
- StreamXDSConfigs(ctx context.Context, opts ...grpc.CallOption) (GlobalDDSService_StreamXDSConfigsClient, error)
- // StreamStats is logically a service exposed by Zone CP so Global CP can
- // execute dubbo-dp stats requests. It is however represented by
- // bi-directional streaming to leverage existing connection from Zone CP to
- // Global CP.
- StreamStats(ctx context.Context, opts ...grpc.CallOption) (GlobalDDSService_StreamStatsClient, error)
- // StreamStats is logically a service exposed by Zone CP so Global CP can
- // execute dubbo-dp clusters request. It is however represented by
- // bi-directional streaming to leverage existing connection from Zone CP to
- // Global CP.
- StreamClusters(ctx context.Context, opts ...grpc.CallOption) (GlobalDDSService_StreamClustersClient, error)
// HealthCheck allows us to implement a health check that works across
// proxies, unlike HTTP/2 PING frames.
HealthCheck(ctx context.Context, in *ZoneHealthCheckRequest, opts ...grpc.CallOption) (*ZoneHealthCheckResponse, error)
@@ -168,99 +154,6 @@
return &globalDDSServiceClient{cc}
}
-func (c *globalDDSServiceClient) StreamXDSConfigs(ctx context.Context, opts ...grpc.CallOption) (GlobalDDSService_StreamXDSConfigsClient, error) {
- stream, err := c.cc.NewStream(ctx, &GlobalDDSService_ServiceDesc.Streams[0], "/dubbo.mesh.v1alpha1.GlobalDDSService/StreamXDSConfigs", opts...)
- if err != nil {
- return nil, err
- }
- x := &globalDDSServiceStreamXDSConfigsClient{stream}
- return x, nil
-}
-
-type GlobalDDSService_StreamXDSConfigsClient interface {
- Send(*XDSConfigResponse) error
- Recv() (*XDSConfigRequest, error)
- grpc.ClientStream
-}
-
-type globalDDSServiceStreamXDSConfigsClient struct {
- grpc.ClientStream
-}
-
-func (x *globalDDSServiceStreamXDSConfigsClient) Send(m *XDSConfigResponse) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *globalDDSServiceStreamXDSConfigsClient) Recv() (*XDSConfigRequest, error) {
- m := new(XDSConfigRequest)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *globalDDSServiceClient) StreamStats(ctx context.Context, opts ...grpc.CallOption) (GlobalDDSService_StreamStatsClient, error) {
- stream, err := c.cc.NewStream(ctx, &GlobalDDSService_ServiceDesc.Streams[1], "/dubbo.mesh.v1alpha1.GlobalDDSService/StreamStats", opts...)
- if err != nil {
- return nil, err
- }
- x := &globalDDSServiceStreamStatsClient{stream}
- return x, nil
-}
-
-type GlobalDDSService_StreamStatsClient interface {
- Send(*StatsResponse) error
- Recv() (*StatsRequest, error)
- grpc.ClientStream
-}
-
-type globalDDSServiceStreamStatsClient struct {
- grpc.ClientStream
-}
-
-func (x *globalDDSServiceStreamStatsClient) Send(m *StatsResponse) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *globalDDSServiceStreamStatsClient) Recv() (*StatsRequest, error) {
- m := new(StatsRequest)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *globalDDSServiceClient) StreamClusters(ctx context.Context, opts ...grpc.CallOption) (GlobalDDSService_StreamClustersClient, error) {
- stream, err := c.cc.NewStream(ctx, &GlobalDDSService_ServiceDesc.Streams[2], "/dubbo.mesh.v1alpha1.GlobalDDSService/StreamClusters", opts...)
- if err != nil {
- return nil, err
- }
- x := &globalDDSServiceStreamClustersClient{stream}
- return x, nil
-}
-
-type GlobalDDSService_StreamClustersClient interface {
- Send(*ClustersResponse) error
- Recv() (*ClustersRequest, error)
- grpc.ClientStream
-}
-
-type globalDDSServiceStreamClustersClient struct {
- grpc.ClientStream
-}
-
-func (x *globalDDSServiceStreamClustersClient) Send(m *ClustersResponse) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *globalDDSServiceStreamClustersClient) Recv() (*ClustersRequest, error) {
- m := new(ClustersRequest)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
func (c *globalDDSServiceClient) HealthCheck(ctx context.Context, in *ZoneHealthCheckRequest, opts ...grpc.CallOption) (*ZoneHealthCheckResponse, error) {
out := new(ZoneHealthCheckResponse)
err := c.cc.Invoke(ctx, "/dubbo.mesh.v1alpha1.GlobalDDSService/HealthCheck", in, out, opts...)
@@ -274,20 +167,6 @@
// All implementations must embed UnimplementedGlobalDDSServiceServer
// for forward compatibility
type GlobalDDSServiceServer interface {
- // StreamXDSConfigs is logically a service exposed by Zone CP so Global CP can
- // execute Config Dumps. It is however represented by bi-directional streaming
- // to leverage existing connection from Zone CP to Global CP.
- StreamXDSConfigs(GlobalDDSService_StreamXDSConfigsServer) error
- // StreamStats is logically a service exposed by Zone CP so Global CP can
- // execute dubbo-dp stats requests. It is however represented by
- // bi-directional streaming to leverage existing connection from Zone CP to
- // Global CP.
- StreamStats(GlobalDDSService_StreamStatsServer) error
- // StreamStats is logically a service exposed by Zone CP so Global CP can
- // execute dubbo-dp clusters request. It is however represented by
- // bi-directional streaming to leverage existing connection from Zone CP to
- // Global CP.
- StreamClusters(GlobalDDSService_StreamClustersServer) error
// HealthCheck allows us to implement a health check that works across
// proxies, unlike HTTP/2 PING frames.
HealthCheck(context.Context, *ZoneHealthCheckRequest) (*ZoneHealthCheckResponse, error)
@@ -298,15 +177,6 @@
type UnimplementedGlobalDDSServiceServer struct {
}
-func (UnimplementedGlobalDDSServiceServer) StreamXDSConfigs(GlobalDDSService_StreamXDSConfigsServer) error {
- return status.Errorf(codes.Unimplemented, "method StreamXDSConfigs not implemented")
-}
-func (UnimplementedGlobalDDSServiceServer) StreamStats(GlobalDDSService_StreamStatsServer) error {
- return status.Errorf(codes.Unimplemented, "method StreamStats not implemented")
-}
-func (UnimplementedGlobalDDSServiceServer) StreamClusters(GlobalDDSService_StreamClustersServer) error {
- return status.Errorf(codes.Unimplemented, "method StreamClusters not implemented")
-}
func (UnimplementedGlobalDDSServiceServer) HealthCheck(context.Context, *ZoneHealthCheckRequest) (*ZoneHealthCheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")
}
@@ -323,84 +193,6 @@
s.RegisterService(&GlobalDDSService_ServiceDesc, srv)
}
-func _GlobalDDSService_StreamXDSConfigs_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(GlobalDDSServiceServer).StreamXDSConfigs(&globalDDSServiceStreamXDSConfigsServer{stream})
-}
-
-type GlobalDDSService_StreamXDSConfigsServer interface {
- Send(*XDSConfigRequest) error
- Recv() (*XDSConfigResponse, error)
- grpc.ServerStream
-}
-
-type globalDDSServiceStreamXDSConfigsServer struct {
- grpc.ServerStream
-}
-
-func (x *globalDDSServiceStreamXDSConfigsServer) Send(m *XDSConfigRequest) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *globalDDSServiceStreamXDSConfigsServer) Recv() (*XDSConfigResponse, error) {
- m := new(XDSConfigResponse)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func _GlobalDDSService_StreamStats_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(GlobalDDSServiceServer).StreamStats(&globalDDSServiceStreamStatsServer{stream})
-}
-
-type GlobalDDSService_StreamStatsServer interface {
- Send(*StatsRequest) error
- Recv() (*StatsResponse, error)
- grpc.ServerStream
-}
-
-type globalDDSServiceStreamStatsServer struct {
- grpc.ServerStream
-}
-
-func (x *globalDDSServiceStreamStatsServer) Send(m *StatsRequest) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *globalDDSServiceStreamStatsServer) Recv() (*StatsResponse, error) {
- m := new(StatsResponse)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func _GlobalDDSService_StreamClusters_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(GlobalDDSServiceServer).StreamClusters(&globalDDSServiceStreamClustersServer{stream})
-}
-
-type GlobalDDSService_StreamClustersServer interface {
- Send(*ClustersRequest) error
- Recv() (*ClustersResponse, error)
- grpc.ServerStream
-}
-
-type globalDDSServiceStreamClustersServer struct {
- grpc.ServerStream
-}
-
-func (x *globalDDSServiceStreamClustersServer) Send(m *ClustersRequest) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *globalDDSServiceStreamClustersServer) Recv() (*ClustersResponse, error) {
- m := new(ClustersResponse)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
func _GlobalDDSService_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ZoneHealthCheckRequest)
if err := dec(in); err != nil {
@@ -431,26 +223,7 @@
Handler: _GlobalDDSService_HealthCheck_Handler,
},
},
- Streams: []grpc.StreamDesc{
- {
- StreamName: "StreamXDSConfigs",
- Handler: _GlobalDDSService_StreamXDSConfigs_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "StreamStats",
- Handler: _GlobalDDSService_StreamStats_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "StreamClusters",
- Handler: _GlobalDDSService_StreamClusters_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
+ Streams: []grpc.StreamDesc{},
Metadata: "api/mesh/v1alpha1/dds.proto",
}
diff --git a/api/mesh/v1alpha1/envoy_admin_inter_cp_forward.pb.go b/api/mesh/v1alpha1/envoy_admin_inter_cp_forward.pb.go
deleted file mode 100644
index 8b1f5f9..0000000
--- a/api/mesh/v1alpha1/envoy_admin_inter_cp_forward.pb.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.20.0
-// source: api/mesh/v1alpha1/envoy_admin_inter_cp_forward.proto
-
-package v1alpha1
-
-import (
- reflect "reflect"
-)
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-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)
-)
-
-var File_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto protoreflect.FileDescriptor
-
-var file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_rawDesc = []byte{
- 0x0a, 0x34, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f,
- 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65,
- 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x61, 0x70, 0x69,
- 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64,
- 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa6, 0x02, 0x0a, 0x1f, 0x49, 0x6e, 0x74,
- 0x65, 0x72, 0x43, 0x50, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x6f,
- 0x72, 0x77, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x09,
- 0x58, 0x44, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x64, 0x75, 0x62, 0x62,
- 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
- 0x58, 0x44, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x26, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x58, 0x44, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74,
- 0x73, 0x12, 0x21, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73,
- 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x43, 0x6c, 0x75, 0x73,
- 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73,
- 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74,
- 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x75, 0x62,
- 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
- 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62,
- 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
-}
-
-var file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_goTypes = []interface{}{
- (*XDSConfigRequest)(nil), // 0: dubbo.mesh.v1alpha1.XDSConfigRequest
- (*StatsRequest)(nil), // 1: dubbo.mesh.v1alpha1.StatsRequest
- (*ClustersRequest)(nil), // 2: dubbo.mesh.v1alpha1.ClustersRequest
- (*XDSConfigResponse)(nil), // 3: dubbo.mesh.v1alpha1.XDSConfigResponse
- (*StatsResponse)(nil), // 4: dubbo.mesh.v1alpha1.StatsResponse
- (*ClustersResponse)(nil), // 5: dubbo.mesh.v1alpha1.ClustersResponse
-}
-var file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_depIdxs = []int32{
- 0, // 0: dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService.XDSConfig:input_type -> dubbo.mesh.v1alpha1.XDSConfigRequest
- 1, // 1: dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService.Stats:input_type -> dubbo.mesh.v1alpha1.StatsRequest
- 2, // 2: dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService.Clusters:input_type -> dubbo.mesh.v1alpha1.ClustersRequest
- 3, // 3: dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService.XDSConfig:output_type -> dubbo.mesh.v1alpha1.XDSConfigResponse
- 4, // 4: dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService.Stats:output_type -> dubbo.mesh.v1alpha1.StatsResponse
- 5, // 5: dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService.Clusters:output_type -> dubbo.mesh.v1alpha1.ClustersResponse
- 3, // [3:6] is the sub-list for method output_type
- 0, // [0:3] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_init() }
-func file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_init() {
- if File_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto != nil {
- return
- }
- file_api_mesh_v1alpha1_dds_proto_init()
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 0,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_goTypes,
- DependencyIndexes: file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_depIdxs,
- }.Build()
- File_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto = out.File
- file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_rawDesc = nil
- file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_goTypes = nil
- file_api_mesh_v1alpha1_envoy_admin_inter_cp_forward_proto_depIdxs = nil
-}
diff --git a/api/mesh/v1alpha1/envoy_admin_inter_cp_forward.proto b/api/mesh/v1alpha1/envoy_admin_inter_cp_forward.proto
deleted file mode 100644
index 91cd601..0000000
--- a/api/mesh/v1alpha1/envoy_admin_inter_cp_forward.proto
+++ /dev/null
@@ -1,13 +0,0 @@
-syntax = "proto3";
-
-package dubbo.mesh.v1alpha1;
-
-option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1";
-
-import "api/mesh/v1alpha1/dds.proto";
-
-service InterCPEnvoyAdminForwardService {
- rpc XDSConfig(XDSConfigRequest) returns (XDSConfigResponse);
- rpc Stats(StatsRequest) returns (StatsResponse);
- rpc Clusters(ClustersRequest) returns (ClustersResponse);
-}
diff --git a/api/mesh/v1alpha1/envoy_admin_inter_cp_forward_grpc.pb.go b/api/mesh/v1alpha1/envoy_admin_inter_cp_forward_grpc.pb.go
deleted file mode 100644
index 398addc..0000000
--- a/api/mesh/v1alpha1/envoy_admin_inter_cp_forward_grpc.pb.go
+++ /dev/null
@@ -1,177 +0,0 @@
-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- context "context"
-)
-
-import (
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
-
-// InterCPEnvoyAdminForwardServiceClient is the client API for InterCPEnvoyAdminForwardService service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type InterCPEnvoyAdminForwardServiceClient interface {
- XDSConfig(ctx context.Context, in *XDSConfigRequest, opts ...grpc.CallOption) (*XDSConfigResponse, error)
- Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)
- Clusters(ctx context.Context, in *ClustersRequest, opts ...grpc.CallOption) (*ClustersResponse, error)
-}
-
-type interCPEnvoyAdminForwardServiceClient struct {
- cc grpc.ClientConnInterface
-}
-
-func NewInterCPEnvoyAdminForwardServiceClient(cc grpc.ClientConnInterface) InterCPEnvoyAdminForwardServiceClient {
- return &interCPEnvoyAdminForwardServiceClient{cc}
-}
-
-func (c *interCPEnvoyAdminForwardServiceClient) XDSConfig(ctx context.Context, in *XDSConfigRequest, opts ...grpc.CallOption) (*XDSConfigResponse, error) {
- out := new(XDSConfigResponse)
- err := c.cc.Invoke(ctx, "/dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService/XDSConfig", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *interCPEnvoyAdminForwardServiceClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error) {
- out := new(StatsResponse)
- err := c.cc.Invoke(ctx, "/dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Stats", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *interCPEnvoyAdminForwardServiceClient) Clusters(ctx context.Context, in *ClustersRequest, opts ...grpc.CallOption) (*ClustersResponse, error) {
- out := new(ClustersResponse)
- err := c.cc.Invoke(ctx, "/dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Clusters", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// InterCPEnvoyAdminForwardServiceServer is the server API for InterCPEnvoyAdminForwardService service.
-// All implementations must embed UnimplementedInterCPEnvoyAdminForwardServiceServer
-// for forward compatibility
-type InterCPEnvoyAdminForwardServiceServer interface {
- XDSConfig(context.Context, *XDSConfigRequest) (*XDSConfigResponse, error)
- Stats(context.Context, *StatsRequest) (*StatsResponse, error)
- Clusters(context.Context, *ClustersRequest) (*ClustersResponse, error)
- mustEmbedUnimplementedInterCPEnvoyAdminForwardServiceServer()
-}
-
-// UnimplementedInterCPEnvoyAdminForwardServiceServer must be embedded to have forward compatible implementations.
-type UnimplementedInterCPEnvoyAdminForwardServiceServer struct {
-}
-
-func (UnimplementedInterCPEnvoyAdminForwardServiceServer) XDSConfig(context.Context, *XDSConfigRequest) (*XDSConfigResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method XDSConfig not implemented")
-}
-func (UnimplementedInterCPEnvoyAdminForwardServiceServer) Stats(context.Context, *StatsRequest) (*StatsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Stats not implemented")
-}
-func (UnimplementedInterCPEnvoyAdminForwardServiceServer) Clusters(context.Context, *ClustersRequest) (*ClustersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Clusters not implemented")
-}
-func (UnimplementedInterCPEnvoyAdminForwardServiceServer) mustEmbedUnimplementedInterCPEnvoyAdminForwardServiceServer() {
-}
-
-// UnsafeInterCPEnvoyAdminForwardServiceServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to InterCPEnvoyAdminForwardServiceServer will
-// result in compilation errors.
-type UnsafeInterCPEnvoyAdminForwardServiceServer interface {
- mustEmbedUnimplementedInterCPEnvoyAdminForwardServiceServer()
-}
-
-func RegisterInterCPEnvoyAdminForwardServiceServer(s grpc.ServiceRegistrar, srv InterCPEnvoyAdminForwardServiceServer) {
- s.RegisterService(&InterCPEnvoyAdminForwardService_ServiceDesc, srv)
-}
-
-func _InterCPEnvoyAdminForwardService_XDSConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(XDSConfigRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(InterCPEnvoyAdminForwardServiceServer).XDSConfig(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService/XDSConfig",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(InterCPEnvoyAdminForwardServiceServer).XDSConfig(ctx, req.(*XDSConfigRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _InterCPEnvoyAdminForwardService_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(StatsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(InterCPEnvoyAdminForwardServiceServer).Stats(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Stats",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(InterCPEnvoyAdminForwardServiceServer).Stats(ctx, req.(*StatsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _InterCPEnvoyAdminForwardService_Clusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClustersRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(InterCPEnvoyAdminForwardServiceServer).Clusters(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService/Clusters",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(InterCPEnvoyAdminForwardServiceServer).Clusters(ctx, req.(*ClustersRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-// InterCPEnvoyAdminForwardService_ServiceDesc is the grpc.ServiceDesc for InterCPEnvoyAdminForwardService service.
-// It's only intended for direct use with grpc.RegisterService,
-// and not to be introspected or modified (even as a copy)
-var InterCPEnvoyAdminForwardService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "dubbo.mesh.v1alpha1.InterCPEnvoyAdminForwardService",
- HandlerType: (*InterCPEnvoyAdminForwardServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "XDSConfig",
- Handler: _InterCPEnvoyAdminForwardService_XDSConfig_Handler,
- },
- {
- MethodName: "Stats",
- Handler: _InterCPEnvoyAdminForwardService_Stats_Handler,
- },
- {
- MethodName: "Clusters",
- Handler: _InterCPEnvoyAdminForwardService_Clusters_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "api/mesh/v1alpha1/envoy_admin_inter_cp_forward.proto",
-}
diff --git a/api/mesh/v1alpha1/mapping.pb.go b/api/mesh/v1alpha1/mapping.pb.go
index 8c24968..93a5bf2 100644
--- a/api/mesh/v1alpha1/mapping.pb.go
+++ b/api/mesh/v1alpha1/mapping.pb.go
@@ -371,40 +371,41 @@
0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73,
0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69,
- 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xd8, 0x01, 0x0a,
+ 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xea, 0x01, 0x0a,
0x07, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x24, 0x0a, 0x0d,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61,
0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x70,
- 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x3a, 0x67,
+ 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x3a, 0x79,
0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x09, 0x12, 0x07, 0x4d,
0x61, 0x70, 0x70, 0x69, 0x6e, 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, 0x0b, 0x3a, 0x09, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xaa, 0x8c, 0x89,
- 0xa6, 0x01, 0x0c, 0x3a, 0x0a, 0x12, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0xaa,
- 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01, 0x32, 0xef, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f,
- 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d,
- 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65,
- 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0b, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x79,
- 0x6e, 0x63, 0x12, 0x27, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e,
- 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x75,
- 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74,
- 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64,
- 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
+ 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x08, 0x01, 0xaa, 0x8c, 0x89, 0xa6,
+ 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0b, 0x3a, 0x09, 0x0a, 0x07,
+ 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0c, 0x3a, 0x0a, 0x12,
+ 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x58,
+ 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01, 0x32, 0xef, 0x01, 0x0a, 0x19, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x64, 0x75, 0x62,
+ 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e,
+ 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0b, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
+ 0x53, 0x79, 0x6e, 0x63, 0x12, 0x27, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73,
+ 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e,
+ 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65,
+ 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65,
+ 0x73, 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,
}
var (
diff --git a/api/mesh/v1alpha1/mapping.proto b/api/mesh/v1alpha1/mapping.proto
index 9e0dd4e..8faf3c6 100644
--- a/api/mesh/v1alpha1/mapping.proto
+++ b/api/mesh/v1alpha1/mapping.proto
@@ -50,9 +50,11 @@
option (dubbo.mesh.resource).name = "MappingResource";
option (dubbo.mesh.resource).type = "Mapping";
option (dubbo.mesh.resource).package = "mesh";
+ option (dubbo.mesh.resource).dds.send_to_global = true;
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "mapping";
option (dubbo.mesh.resource).ws.plural = "mappings";
+ option (dubbo.mesh.resource).scope_namespace = true;
option (dubbo.mesh.resource).allow_to_inspect = true;
string zone = 1;
diff --git a/api/mesh/v1alpha1/mesh.pb.go b/api/mesh/v1alpha1/mesh.pb.go
index a7524aa..b6926cf 100644
--- a/api/mesh/v1alpha1/mesh.pb.go
+++ b/api/mesh/v1alpha1/mesh.pb.go
@@ -970,7 +970,7 @@
0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x03, 0x0a, 0x04, 0x4d, 0x65,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x04, 0x0a, 0x04, 0x4d, 0x65,
0x73, 0x68, 0x12, 0x32, 0x0a, 0x04, 0x6d, 0x74, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x4d, 0x74, 0x6c, 0x73,
@@ -996,106 +996,107 @@
0x0b, 0x32, 0x30, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x63, 0x6b,
- 0x65, 0x6e, 0x64, 0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x3a, 0x5c, 0xaa,
+ 0x65, 0x6e, 0x64, 0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x3a, 0x64, 0xaa,
0x8c, 0x89, 0xa6, 0x01, 0x0e, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x12, 0x04, 0x4d, 0x65, 0x73, 0x68, 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, 0x08, 0x3a, 0x06, 0x0a, 0x04, 0x6d,
- 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0a, 0x3a, 0x08, 0x12, 0x06, 0x6d, 0x65, 0x73,
- 0x68, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01, 0x22, 0xd8, 0x02, 0x0a, 0x1b,
- 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f,
- 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
- 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
- 0x79, 0x70, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x64, 0x70, 0x43, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68,
- 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66,
- 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61,
- 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x44, 0x70, 0x43, 0x65, 0x72, 0x74, 0x52, 0x06, 0x64, 0x70,
- 0x43, 0x65, 0x72, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x6e,
- 0x66, 0x1a, 0x92, 0x01, 0x0a, 0x06, 0x44, 0x70, 0x43, 0x65, 0x72, 0x74, 0x12, 0x5c, 0x0a, 0x08,
- 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40,
- 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
- 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
- 0x2e, 0x44, 0x70, 0x43, 0x65, 0x72, 0x74, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x52, 0x08, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2a, 0x0a, 0x08, 0x52, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x4e, 0x65, 0x74, 0x77, 0x6f,
- 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x44, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e,
- 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65,
- 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e,
- 0x64, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x48, 0x0a, 0x08, 0x4f,
- 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x74,
- 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x18, 0x01, 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, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68,
- 0x72, 0x6f, 0x75, 0x67, 0x68, 0x22, 0x72, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67,
- 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65,
- 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
- 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x3f, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b,
- 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62,
- 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52,
- 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x0e, 0x54, 0x72,
- 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x12, 0x38, 0x0a, 0x08, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 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, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x52, 0x08, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b,
- 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
- 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x22, 0xbe, 0x01, 0x0a, 0x1a,
- 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63,
- 0x6b, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
- 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0d,
- 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x31, 0x32, 0x38, 0x62, 0x69, 0x74, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x31, 0x32, 0x38, 0x62,
- 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x70, 0x61, 0x6e,
- 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 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, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65,
- 0x64, 0x53, 0x70, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x72, 0x0a, 0x07,
- 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75,
- 0x6c, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12,
- 0x3f, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42,
- 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73,
- 0x22, 0x7d, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65,
- 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12,
- 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x22,
- 0x2e, 0x0a, 0x18, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x61,
- 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70,
- 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22,
- 0x33, 0x0a, 0x17, 0x54, 0x63, 0x70, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63,
- 0x6b, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 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, 0x22, 0x69, 0x0a, 0x07, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12,
- 0x3e, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x77, 0x61, 0x72, 0x65,
- 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x77, 0x61,
- 0x72, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12,
- 0x1e, 0x0a, 0x0a, 0x7a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x0a, 0x7a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42,
- 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70,
- 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72,
- 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
+ 0x02, 0x18, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89,
+ 0xa6, 0x01, 0x08, 0x3a, 0x06, 0x0a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01,
+ 0x0a, 0x3a, 0x08, 0x12, 0x06, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01,
+ 0x02, 0x68, 0x01, 0x22, 0xd8, 0x02, 0x0a, 0x1b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x63, 0x6b,
+ 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x64,
+ 0x70, 0x43, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x64, 0x75,
+ 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74,
+ 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x44, 0x70,
+ 0x43, 0x65, 0x72, 0x74, 0x52, 0x06, 0x64, 0x70, 0x43, 0x65, 0x72, 0x74, 0x12, 0x2b, 0x0a, 0x04,
+ 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x1a, 0x92, 0x01, 0x0a, 0x06, 0x44, 0x70,
+ 0x43, 0x65, 0x72, 0x74, 0x12, 0x5c, 0x0a, 0x08, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d,
+ 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x65, 0x72,
+ 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
+ 0x79, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x44, 0x70, 0x43, 0x65, 0x72, 0x74, 0x2e,
+ 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x1a, 0x2a, 0x0a, 0x08, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e,
+ 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c,
+ 0x01, 0x0a, 0x0a, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x44, 0x0a,
+ 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x28, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67,
+ 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f,
+ 0x75, 0x6e, 0x64, 0x1a, 0x48, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12,
+ 0x3c, 0x0a, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x18, 0x01,
+ 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, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x22, 0x72, 0x0a,
+ 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
+ 0x12, 0x3f, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67,
+ 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
+ 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63,
+ 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x73, 0x61, 0x6d, 0x70,
+ 0x6c, 0x69, 0x6e, 0x67, 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, 0x44, 0x6f, 0x75,
+ 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69,
+ 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x63,
+ 0x6f, 0x6e, 0x66, 0x22, 0xbe, 0x01, 0x0a, 0x1a, 0x5a, 0x69, 0x70, 0x6b, 0x69, 0x6e, 0x54, 0x72,
+ 0x61, 0x63, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x03, 0x75, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x31,
+ 0x32, 0x38, 0x62, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x49, 0x64, 0x31, 0x32, 0x38, 0x62, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70,
+ 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x11, 0x73, 0x68,
+ 0x61, 0x72, 0x65, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18,
+ 0x04, 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, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x43, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x22, 0x72, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12,
+ 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
+ 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x3f, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x65,
+ 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62,
+ 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x08,
+ 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x7d, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x67,
+ 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16,
+ 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x6f,
+ 0x6e, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63,
+ 0x74, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x66, 0x22, 0x2e, 0x0a, 0x18, 0x46, 0x69, 0x6c, 0x65, 0x4c,
+ 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x33, 0x0a, 0x17, 0x54, 0x63, 0x70, 0x4c, 0x6f,
+ 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 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, 0x22, 0x69, 0x0a, 0x07,
+ 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x69, 0x74, 0x79, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61,
+ 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x6c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61,
+ 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x7a, 0x6f, 0x6e, 0x65, 0x45,
+ 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x7a, 0x6f, 0x6e,
+ 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62,
+ 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
}
var (
diff --git a/api/mesh/v1alpha1/mesh.proto b/api/mesh/v1alpha1/mesh.proto
index 9da42f8..d884efc 100644
--- a/api/mesh/v1alpha1/mesh.proto
+++ b/api/mesh/v1alpha1/mesh.proto
@@ -13,6 +13,7 @@
option (dubbo.mesh.resource).name = "MeshResource";
option (dubbo.mesh.resource).type = "Mesh";
option (dubbo.mesh.resource).package = "mesh";
+ option (dubbo.mesh.resource).global = true;
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "mesh";
option (dubbo.mesh.resource).ws.plural = "meshes";
diff --git a/api/mesh/v1alpha1/metadata.pb.go b/api/mesh/v1alpha1/metadata.pb.go
index 3cf1a15..838b0fb 100644
--- a/api/mesh/v1alpha1/metadata.pb.go
+++ b/api/mesh/v1alpha1/metadata.pb.go
@@ -286,10 +286,11 @@
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
- Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
+ Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty"`
+ App string `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"`
+ Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"`
// key format is '{group}/{interface name}:{version}:{protocol}'
- Services map[string]*ServiceInfo `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Services map[string]*ServiceInfo `protobuf:"bytes,4,rep,name=services,proto3" json:"services,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *MetaData) Reset() {
@@ -324,6 +325,13 @@
return file_api_mesh_v1alpha1_metadata_proto_rawDescGZIP(), []int{4}
}
+func (x *MetaData) GetZone() string {
+ if x != nil {
+ return x.Zone
+ }
+ return ""
+}
+
func (x *MetaData) GetApp() string {
if x != nil {
return x.App
@@ -479,64 +487,67 @@
0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d,
0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x6d,
- 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x22, 0xcd, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74,
- 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
- 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73,
- 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65,
- 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61,
- 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x0d,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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,
- 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20,
- 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x6b, 0xaa, 0x8c, 0x89,
- 0xa6, 0x01, 0x12, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0a, 0x12, 0x08, 0x4d, 0x65, 0x74,
- 0x61, 0x44, 0x61, 0x74, 0x61, 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,
- 0x0c, 0x3a, 0x0a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xaa, 0x8c, 0x89,
- 0xa6, 0x01, 0x0d, 0x3a, 0x0b, 0x12, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73,
- 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01, 0x22, 0x96, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
- 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f,
- 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04,
- 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
- 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e,
- 0x66, 0x6f, 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, 0x32, 0xeb, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62,
+ 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74,
+ 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72,
+ 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72,
+ 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x75, 0x62, 0x62,
0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
- 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e,
- 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65,
- 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d,
+ 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
+ 0x1a, 0x5d, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a,
+ 0x7d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x12, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74,
+ 0x61, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0a, 0x12,
+ 0x08, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22,
+ 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x08, 0x01, 0xaa,
+ 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0c, 0x3a,
+ 0x0a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xaa, 0x8c, 0x89, 0xa6, 0x01,
+ 0x02, 0x58, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0d, 0x3a, 0x0b, 0x12, 0x09, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01, 0x22, 0x96,
+ 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12,
+ 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f,
+ 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d,
+ 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 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, 0x32, 0xeb, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x10, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12,
+ 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e,
+ 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0c,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x2e, 0x64,
+ 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x79, 0x6e, 0x63, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d,
0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x29, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53,
- 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42,
- 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70,
- 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72,
- 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f,
+ 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
}
var (
diff --git a/api/mesh/v1alpha1/metadata.proto b/api/mesh/v1alpha1/metadata.proto
index ea4e298..0688317 100644
--- a/api/mesh/v1alpha1/metadata.proto
+++ b/api/mesh/v1alpha1/metadata.proto
@@ -42,15 +42,18 @@
option (dubbo.mesh.resource).name = "MetaDataResource";
option (dubbo.mesh.resource).type = "MetaData";
option (dubbo.mesh.resource).package = "mesh";
+ option (dubbo.mesh.resource).dds.send_to_global = true;
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "metadata";
+ option (dubbo.mesh.resource).scope_namespace = true;
option (dubbo.mesh.resource).ws.plural = "metadatas";
option (dubbo.mesh.resource).allow_to_inspect = true;
- string app = 1;
- string revision = 2;
+ string zone = 1;
+ string app = 2;
+ string revision = 3;
// key format is '{group}/{interface name}:{version}:{protocol}'
- map<string, ServiceInfo> services = 3;
+ map<string, ServiceInfo> services = 4;
}
message ServiceInfo {
diff --git a/api/mesh/v1alpha1/mux.pb.go b/api/mesh/v1alpha1/mux.pb.go
deleted file mode 100644
index 965e304..0000000
--- a/api/mesh/v1alpha1/mux.pb.go
+++ /dev/null
@@ -1,260 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.20.0
-// source: api/mesh/v1alpha1/mux.proto
-
-package v1alpha1
-
-import (
- reflect "reflect"
- sync "sync"
-)
-
-import (
- v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
- v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
-
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-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)
-)
-
-type Message struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Value:
- //
- // *Message_LegacyRequest
- // *Message_LegacyResponse
- // *Message_Request
- // *Message_Response
- Value isMessage_Value `protobuf_oneof:"value"`
-}
-
-func (x *Message) Reset() {
- *x = Message{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_mux_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Message) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Message) ProtoMessage() {}
-
-func (x *Message) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_mux_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 Message.ProtoReflect.Descriptor instead.
-func (*Message) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_mux_proto_rawDescGZIP(), []int{0}
-}
-
-func (m *Message) GetValue() isMessage_Value {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (x *Message) GetLegacyRequest() *v2.DiscoveryRequest {
- if x, ok := x.GetValue().(*Message_LegacyRequest); ok {
- return x.LegacyRequest
- }
- return nil
-}
-
-func (x *Message) GetLegacyResponse() *v2.DiscoveryResponse {
- if x, ok := x.GetValue().(*Message_LegacyResponse); ok {
- return x.LegacyResponse
- }
- return nil
-}
-
-func (x *Message) GetRequest() *v3.DiscoveryRequest {
- if x, ok := x.GetValue().(*Message_Request); ok {
- return x.Request
- }
- return nil
-}
-
-func (x *Message) GetResponse() *v3.DiscoveryResponse {
- if x, ok := x.GetValue().(*Message_Response); ok {
- return x.Response
- }
- return nil
-}
-
-type isMessage_Value interface {
- isMessage_Value()
-}
-
-type Message_LegacyRequest struct {
- LegacyRequest *v2.DiscoveryRequest `protobuf:"bytes,1,opt,name=legacy_request,json=legacyRequest,proto3,oneof"`
-}
-
-type Message_LegacyResponse struct {
- LegacyResponse *v2.DiscoveryResponse `protobuf:"bytes,2,opt,name=legacy_response,json=legacyResponse,proto3,oneof"`
-}
-
-type Message_Request struct {
- Request *v3.DiscoveryRequest `protobuf:"bytes,3,opt,name=request,proto3,oneof"`
-}
-
-type Message_Response struct {
- Response *v3.DiscoveryResponse `protobuf:"bytes,4,opt,name=response,proto3,oneof"`
-}
-
-func (*Message_LegacyRequest) isMessage_Value() {}
-
-func (*Message_LegacyResponse) isMessage_Value() {}
-
-func (*Message_Request) isMessage_Value() {}
-
-func (*Message_Response) isMessage_Value() {}
-
-var File_api_mesh_v1alpha1_mux_proto protoreflect.FileDescriptor
-
-var file_api_mesh_v1alpha1_mux_proto_rawDesc = []byte{
- 0x0a, 0x1b, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x75, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64,
- 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 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, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
- 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73,
- 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a,
- 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x6c, 0x65, 0x67, 0x61,
- 0x63, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 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,
- 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x4a, 0x0a, 0x0f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x48, 0x00, 0x52, 0x0e, 0x6c,
- 0x65, 0x67, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a,
- 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c,
- 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64,
- 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63,
- 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07,
- 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
- 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
- 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x63, 0x0a,
- 0x10, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x4f, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e,
- 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
- 0x1a, 0x1c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x01,
- 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
- 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75,
- 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
-}
-
-var (
- file_api_mesh_v1alpha1_mux_proto_rawDescOnce sync.Once
- file_api_mesh_v1alpha1_mux_proto_rawDescData = file_api_mesh_v1alpha1_mux_proto_rawDesc
-)
-
-func file_api_mesh_v1alpha1_mux_proto_rawDescGZIP() []byte {
- file_api_mesh_v1alpha1_mux_proto_rawDescOnce.Do(func() {
- file_api_mesh_v1alpha1_mux_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_mux_proto_rawDescData)
- })
- return file_api_mesh_v1alpha1_mux_proto_rawDescData
-}
-
-var file_api_mesh_v1alpha1_mux_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_api_mesh_v1alpha1_mux_proto_goTypes = []interface{}{
- (*Message)(nil), // 0: dubbo.mesh.v1alpha1.Message
- (*v2.DiscoveryRequest)(nil), // 1: envoy.api.v2.DiscoveryRequest
- (*v2.DiscoveryResponse)(nil), // 2: envoy.api.v2.DiscoveryResponse
- (*v3.DiscoveryRequest)(nil), // 3: envoy.service.discovery.v3.DiscoveryRequest
- (*v3.DiscoveryResponse)(nil), // 4: envoy.service.discovery.v3.DiscoveryResponse
-}
-var file_api_mesh_v1alpha1_mux_proto_depIdxs = []int32{
- 1, // 0: dubbo.mesh.v1alpha1.Message.legacy_request:type_name -> envoy.api.v2.DiscoveryRequest
- 2, // 1: dubbo.mesh.v1alpha1.Message.legacy_response:type_name -> envoy.api.v2.DiscoveryResponse
- 3, // 2: dubbo.mesh.v1alpha1.Message.request:type_name -> envoy.service.discovery.v3.DiscoveryRequest
- 4, // 3: dubbo.mesh.v1alpha1.Message.response:type_name -> envoy.service.discovery.v3.DiscoveryResponse
- 0, // 4: dubbo.mesh.v1alpha1.MultiplexService.StreamMessage:input_type -> dubbo.mesh.v1alpha1.Message
- 0, // 5: dubbo.mesh.v1alpha1.MultiplexService.StreamMessage:output_type -> dubbo.mesh.v1alpha1.Message
- 5, // [5:6] is the sub-list for method output_type
- 4, // [4:5] is the sub-list for method input_type
- 4, // [4:4] is the sub-list for extension type_name
- 4, // [4:4] is the sub-list for extension extendee
- 0, // [0:4] is the sub-list for field type_name
-}
-
-func init() { file_api_mesh_v1alpha1_mux_proto_init() }
-func file_api_mesh_v1alpha1_mux_proto_init() {
- if File_api_mesh_v1alpha1_mux_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_api_mesh_v1alpha1_mux_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Message); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_api_mesh_v1alpha1_mux_proto_msgTypes[0].OneofWrappers = []interface{}{
- (*Message_LegacyRequest)(nil),
- (*Message_LegacyResponse)(nil),
- (*Message_Request)(nil),
- (*Message_Response)(nil),
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_api_mesh_v1alpha1_mux_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 1,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_api_mesh_v1alpha1_mux_proto_goTypes,
- DependencyIndexes: file_api_mesh_v1alpha1_mux_proto_depIdxs,
- MessageInfos: file_api_mesh_v1alpha1_mux_proto_msgTypes,
- }.Build()
- File_api_mesh_v1alpha1_mux_proto = out.File
- file_api_mesh_v1alpha1_mux_proto_rawDesc = nil
- file_api_mesh_v1alpha1_mux_proto_goTypes = nil
- file_api_mesh_v1alpha1_mux_proto_depIdxs = nil
-}
diff --git a/api/mesh/v1alpha1/mux.proto b/api/mesh/v1alpha1/mux.proto
deleted file mode 100644
index f7cccf1..0000000
--- a/api/mesh/v1alpha1/mux.proto
+++ /dev/null
@@ -1,21 +0,0 @@
-syntax = "proto3";
-
-package dubbo.mesh.v1alpha1;
-
-option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1";
-
-import "envoy/api/v2/discovery.proto";
-import "envoy/service/discovery/v3/discovery.proto";
-
-service MultiplexService {
- rpc StreamMessage(stream Message) returns (stream Message);
-}
-
-message Message {
- oneof value {
- envoy.api.v2.DiscoveryRequest legacy_request = 1;
- envoy.api.v2.DiscoveryResponse legacy_response = 2;
- envoy.service.discovery.v3.DiscoveryRequest request = 3;
- envoy.service.discovery.v3.DiscoveryResponse response = 4;
- }
-}
diff --git a/api/mesh/v1alpha1/mux_grpc.pb.go b/api/mesh/v1alpha1/mux_grpc.pb.go
deleted file mode 100644
index 00fa751..0000000
--- a/api/mesh/v1alpha1/mux_grpc.pb.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- context "context"
-)
-
-import (
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
-
-// MultiplexServiceClient is the client API for MultiplexService service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type MultiplexServiceClient interface {
- StreamMessage(ctx context.Context, opts ...grpc.CallOption) (MultiplexService_StreamMessageClient, error)
-}
-
-type multiplexServiceClient struct {
- cc grpc.ClientConnInterface
-}
-
-func NewMultiplexServiceClient(cc grpc.ClientConnInterface) MultiplexServiceClient {
- return &multiplexServiceClient{cc}
-}
-
-func (c *multiplexServiceClient) StreamMessage(ctx context.Context, opts ...grpc.CallOption) (MultiplexService_StreamMessageClient, error) {
- stream, err := c.cc.NewStream(ctx, &MultiplexService_ServiceDesc.Streams[0], "/dubbo.mesh.v1alpha1.MultiplexService/StreamMessage", opts...)
- if err != nil {
- return nil, err
- }
- x := &multiplexServiceStreamMessageClient{stream}
- return x, nil
-}
-
-type MultiplexService_StreamMessageClient interface {
- Send(*Message) error
- Recv() (*Message, error)
- grpc.ClientStream
-}
-
-type multiplexServiceStreamMessageClient struct {
- grpc.ClientStream
-}
-
-func (x *multiplexServiceStreamMessageClient) Send(m *Message) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *multiplexServiceStreamMessageClient) Recv() (*Message, error) {
- m := new(Message)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-// MultiplexServiceServer is the server API for MultiplexService service.
-// All implementations must embed UnimplementedMultiplexServiceServer
-// for forward compatibility
-type MultiplexServiceServer interface {
- StreamMessage(MultiplexService_StreamMessageServer) error
- mustEmbedUnimplementedMultiplexServiceServer()
-}
-
-// UnimplementedMultiplexServiceServer must be embedded to have forward compatible implementations.
-type UnimplementedMultiplexServiceServer struct {
-}
-
-func (UnimplementedMultiplexServiceServer) StreamMessage(MultiplexService_StreamMessageServer) error {
- return status.Errorf(codes.Unimplemented, "method StreamMessage not implemented")
-}
-func (UnimplementedMultiplexServiceServer) mustEmbedUnimplementedMultiplexServiceServer() {}
-
-// UnsafeMultiplexServiceServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to MultiplexServiceServer will
-// result in compilation errors.
-type UnsafeMultiplexServiceServer interface {
- mustEmbedUnimplementedMultiplexServiceServer()
-}
-
-func RegisterMultiplexServiceServer(s grpc.ServiceRegistrar, srv MultiplexServiceServer) {
- s.RegisterService(&MultiplexService_ServiceDesc, srv)
-}
-
-func _MultiplexService_StreamMessage_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(MultiplexServiceServer).StreamMessage(&multiplexServiceStreamMessageServer{stream})
-}
-
-type MultiplexService_StreamMessageServer interface {
- Send(*Message) error
- Recv() (*Message, error)
- grpc.ServerStream
-}
-
-type multiplexServiceStreamMessageServer struct {
- grpc.ServerStream
-}
-
-func (x *multiplexServiceStreamMessageServer) Send(m *Message) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *multiplexServiceStreamMessageServer) Recv() (*Message, error) {
- m := new(Message)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-// MultiplexService_ServiceDesc is the grpc.ServiceDesc for MultiplexService service.
-// It's only intended for direct use with grpc.RegisterService,
-// and not to be introspected or modified (even as a copy)
-var MultiplexService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "dubbo.mesh.v1alpha1.MultiplexService",
- HandlerType: (*MultiplexServiceServer)(nil),
- Methods: []grpc.MethodDesc{},
- Streams: []grpc.StreamDesc{
- {
- StreamName: "StreamMessage",
- Handler: _MultiplexService_StreamMessage_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "api/mesh/v1alpha1/mux.proto",
-}
diff --git a/api/mesh/v1alpha1/selector.pb.go b/api/mesh/v1alpha1/selector.pb.go
deleted file mode 100644
index 6f0521a..0000000
--- a/api/mesh/v1alpha1/selector.pb.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.20.0
-// source: api/mesh/v1alpha1/selector.proto
-
-package v1alpha1
-
-import (
- reflect "reflect"
- sync "sync"
-)
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-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)
-)
-
-// Selector defines structure for selecting tags for given dataplane
-type Selector struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Tags to match, can be used for both source and destinations
- Match map[string]string `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
-}
-
-func (x *Selector) Reset() {
- *x = Selector{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_selector_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Selector) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Selector) ProtoMessage() {}
-
-func (x *Selector) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_selector_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 Selector.ProtoReflect.Descriptor instead.
-func (*Selector) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_selector_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *Selector) GetMatch() map[string]string {
- if x != nil {
- return x.Match
- }
- return nil
-}
-
-var File_api_mesh_v1alpha1_selector_proto protoreflect.FileDescriptor
-
-var file_api_mesh_v1alpha1_selector_proto_rawDesc = []byte{
- 0x0a, 0x20, 0x61, 0x70, 0x69, 0x2f, 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, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x84, 0x01, 0x0a, 0x08, 0x53, 0x65, 0x6c, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68,
- 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6d,
- 0x61, 0x74, 0x63, 0x68, 0x1a, 0x38, 0x0a, 0x0a, 0x4d, 0x61, 0x74, 0x63, 0x68, 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, 0x42, 0x36,
- 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61,
- 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e,
- 0x65, 0x74, 0x65, 0x73, 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,
-}
-
-var (
- file_api_mesh_v1alpha1_selector_proto_rawDescOnce sync.Once
- file_api_mesh_v1alpha1_selector_proto_rawDescData = file_api_mesh_v1alpha1_selector_proto_rawDesc
-)
-
-func file_api_mesh_v1alpha1_selector_proto_rawDescGZIP() []byte {
- file_api_mesh_v1alpha1_selector_proto_rawDescOnce.Do(func() {
- file_api_mesh_v1alpha1_selector_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_selector_proto_rawDescData)
- })
- return file_api_mesh_v1alpha1_selector_proto_rawDescData
-}
-
-var file_api_mesh_v1alpha1_selector_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_api_mesh_v1alpha1_selector_proto_goTypes = []interface{}{
- (*Selector)(nil), // 0: dubbo.mesh.v1alpha1.Selector
- nil, // 1: dubbo.mesh.v1alpha1.Selector.MatchEntry
-}
-var file_api_mesh_v1alpha1_selector_proto_depIdxs = []int32{
- 1, // 0: dubbo.mesh.v1alpha1.Selector.match:type_name -> dubbo.mesh.v1alpha1.Selector.MatchEntry
- 1, // [1:1] is the sub-list for method output_type
- 1, // [1:1] is the sub-list for method input_type
- 1, // [1:1] is the sub-list for extension type_name
- 1, // [1:1] is the sub-list for extension extendee
- 0, // [0:1] is the sub-list for field type_name
-}
-
-func init() { file_api_mesh_v1alpha1_selector_proto_init() }
-func file_api_mesh_v1alpha1_selector_proto_init() {
- if File_api_mesh_v1alpha1_selector_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_api_mesh_v1alpha1_selector_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Selector); 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_api_mesh_v1alpha1_selector_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 2,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_api_mesh_v1alpha1_selector_proto_goTypes,
- DependencyIndexes: file_api_mesh_v1alpha1_selector_proto_depIdxs,
- MessageInfos: file_api_mesh_v1alpha1_selector_proto_msgTypes,
- }.Build()
- File_api_mesh_v1alpha1_selector_proto = out.File
- file_api_mesh_v1alpha1_selector_proto_rawDesc = nil
- file_api_mesh_v1alpha1_selector_proto_goTypes = nil
- file_api_mesh_v1alpha1_selector_proto_depIdxs = nil
-}
diff --git a/api/mesh/v1alpha1/selector.proto b/api/mesh/v1alpha1/selector.proto
deleted file mode 100644
index d370c14..0000000
--- a/api/mesh/v1alpha1/selector.proto
+++ /dev/null
@@ -1,11 +0,0 @@
-syntax = "proto3";
-
-package dubbo.mesh.v1alpha1;
-
-option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1";
-
-// Selector defines structure for selecting tags for given dataplane
-message Selector {
- // Tags to match, can be used for both source and destinations
- map<string, string> match = 1;
-}
diff --git a/api/mesh/v1alpha1/zone_ingress.pb.go b/api/mesh/v1alpha1/zone_ingress.pb.go
index 51f4c1c..0c649ce 100644
--- a/api/mesh/v1alpha1/zone_ingress.pb.go
+++ b/api/mesh/v1alpha1/zone_ingress.pb.go
@@ -247,7 +247,7 @@
0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x05, 0x0a, 0x0b, 0x5a, 0x6f, 0x6e,
+ 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x05, 0x0a, 0x0b, 0x5a, 0x6f, 0x6e,
0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x4b, 0x0a, 0x0a,
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
@@ -286,19 +286,20 @@
0x54, 0x61, 0x67, 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, 0x3a, 0x80, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x15, 0x0a, 0x13,
+ 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x92, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x15, 0x0a, 0x13,
0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0d, 0x12, 0x0b, 0x5a, 0x6f, 0x6e, 0x65, 0x49,
0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 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, 0x7a, 0x6f, 0x6e, 0x65, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73,
- 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x3a, 0x0f, 0x12, 0x0d, 0x7a, 0x6f, 0x6e, 0x65, 0x69,
- 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01,
- 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x58, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68,
- 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75,
- 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
+ 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x18, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04,
+ 0x52, 0x02, 0x08, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x10, 0x01, 0xaa, 0x8c,
+ 0x89, 0xa6, 0x01, 0x0f, 0x3a, 0x0d, 0x0a, 0x0b, 0x7a, 0x6f, 0x6e, 0x65, 0x69, 0x6e, 0x67, 0x72,
+ 0x65, 0x73, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x11, 0x3a, 0x0f, 0x12, 0x0d, 0x7a, 0x6f, 0x6e,
+ 0x65, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02,
+ 0x68, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x58, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f,
+ 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73,
+ 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,
}
var (
diff --git a/api/mesh/v1alpha1/zone_ingress.proto b/api/mesh/v1alpha1/zone_ingress.proto
index c91437d..43b3cf7 100644
--- a/api/mesh/v1alpha1/zone_ingress.proto
+++ b/api/mesh/v1alpha1/zone_ingress.proto
@@ -14,6 +14,8 @@
option (dubbo.mesh.resource).name = "ZoneIngressResource";
option (dubbo.mesh.resource).type = "ZoneIngress";
option (dubbo.mesh.resource).package = "mesh";
+ option (dubbo.mesh.resource).global = true;
+ option (dubbo.mesh.resource).dds.send_to_global = true;
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "zoneingress";
option (dubbo.mesh.resource).ws.plural = "zoneingresses";
diff --git a/api/mesh/v1alpha1/zoneegress.pb.go b/api/mesh/v1alpha1/zoneegress.pb.go
index b12e1ff..4ccbf23 100644
--- a/api/mesh/v1alpha1/zoneegress.pb.go
+++ b/api/mesh/v1alpha1/zoneegress.pb.go
@@ -34,7 +34,7 @@
unknownFields protoimpl.UnknownFields
// Zone field contains Zone name where egress is serving, field will be
- // automatically set by Global Kuma CP
+ // automatically set by Global Dubbo CP
Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty"`
// Networking defines the address and port of the Egress to listen on.
Networking *ZoneEgress_Networking `protobuf:"bytes,2,opt,name=networking,proto3" json:"networking,omitempty"`
@@ -162,7 +162,7 @@
0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x23, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x02, 0x0a, 0x0a, 0x5a, 0x6f, 0x6e, 0x65, 0x45,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x02, 0x0a, 0x0a, 0x5a, 0x6f, 0x6e, 0x65, 0x45,
0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x6e, 0x65, 0x74,
0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
@@ -176,19 +176,20 @@
0x74, 0x12, 0x35, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1f, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x41, 0x64, 0x6d, 0x69,
- 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x7c, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x14,
- 0x0a, 0x12, 0x5a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0c, 0x12, 0x0a, 0x5a, 0x6f, 0x6e, 0x65,
- 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 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, 0x7a, 0x6f, 0x6e, 0x65, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73,
- 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x10, 0x3a, 0x0e, 0x12, 0x0c, 0x7a, 0x6f, 0x6e, 0x65, 0x65, 0x67,
- 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68, 0x01, 0xaa, 0x8c,
- 0x89, 0xa6, 0x01, 0x02, 0x58, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
- 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62,
- 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
+ 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x8e, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01,
+ 0x14, 0x0a, 0x12, 0x5a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x0c, 0x12, 0x0a, 0x5a, 0x6f, 0x6e,
+ 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 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, 0x7a, 0x6f, 0x6e, 0x65, 0x65, 0x67, 0x72, 0x65, 0x73,
+ 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x10, 0x3a, 0x0e, 0x12, 0x0c, 0x7a, 0x6f, 0x6e, 0x65, 0x65,
+ 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x18, 0x01, 0xaa,
+ 0x8c, 0x89, 0xa6, 0x01, 0x04, 0x52, 0x02, 0x08, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x68,
+ 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x58, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64,
+ 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
}
var (
diff --git a/api/mesh/v1alpha1/zoneegress.proto b/api/mesh/v1alpha1/zoneegress.proto
index 14150db..0bf3fe0 100644
--- a/api/mesh/v1alpha1/zoneegress.proto
+++ b/api/mesh/v1alpha1/zoneegress.proto
@@ -14,11 +14,13 @@
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "zoneegress";
option (dubbo.mesh.resource).ws.plural = "zoneegresses";
+ option (dubbo.mesh.resource).global = true;
+ option (dubbo.mesh.resource).dds.send_to_global = true;
option (dubbo.mesh.resource).allow_to_inspect = true;
option (dubbo.mesh.resource).scope_namespace = true;
// Zone field contains Zone name where egress is serving, field will be
- // automatically set by Global Kuma CP
+ // automatically set by Global Dubbo CP
string zone = 1;
message Networking {
diff --git a/api/mesh/v1alpha1/zoneegressoverview.pb.go b/api/mesh/v1alpha1/zoneegressoverview.pb.go
deleted file mode 100644
index a69c0ef..0000000
--- a/api/mesh/v1alpha1/zoneegressoverview.pb.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.20.0
-// source: api/mesh/v1alpha1/zoneegressoverview.proto
-
-package v1alpha1
-
-import (
- reflect "reflect"
- sync "sync"
-)
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-import (
- _ "github.com/apache/dubbo-kubernetes/api/mesh"
-)
-
-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)
-)
-
-// ZoneEgressOverview defines the projected state of a ZoneEgress.
-type ZoneEgressOverview struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- ZoneEgress *ZoneEgress `protobuf:"bytes,1,opt,name=zoneEgress,proto3" json:"zoneEgress,omitempty"`
- ZoneEgressInsight *ZoneEgressInsight `protobuf:"bytes,2,opt,name=zoneEgressInsight,proto3" json:"zoneEgressInsight,omitempty"`
-}
-
-func (x *ZoneEgressOverview) Reset() {
- *x = ZoneEgressOverview{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_zoneegressoverview_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ZoneEgressOverview) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ZoneEgressOverview) ProtoMessage() {}
-
-func (x *ZoneEgressOverview) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_zoneegressoverview_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 ZoneEgressOverview.ProtoReflect.Descriptor instead.
-func (*ZoneEgressOverview) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *ZoneEgressOverview) GetZoneEgress() *ZoneEgress {
- if x != nil {
- return x.ZoneEgress
- }
- return nil
-}
-
-func (x *ZoneEgressOverview) GetZoneEgressInsight() *ZoneEgressInsight {
- if x != nil {
- return x.ZoneEgressInsight
- }
- return nil
-}
-
-var File_api_mesh_v1alpha1_zoneegressoverview_proto protoreflect.FileDescriptor
-
-var file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDesc = []byte{
- 0x0a, 0x2a, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x76,
- 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75,
- 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x61, 0x70, 0x69, 0x2f, 0x6d,
- 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7a, 0x6f, 0x6e,
- 0x65, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x61,
- 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x73, 0x69, 0x67,
- 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x12, 0x5a, 0x6f, 0x6e,
- 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12,
- 0x3f, 0x0a, 0x0a, 0x7a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68,
- 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x45, 0x67,
- 0x72, 0x65, 0x73, 0x73, 0x52, 0x0a, 0x7a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73,
- 0x12, 0x54, 0x0a, 0x11, 0x7a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e,
- 0x73, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x75,
- 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x69,
- 0x67, 0x68, 0x74, 0x52, 0x11, 0x7a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49,
- 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x60, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x1c, 0x0a, 0x1a,
- 0x5a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69,
- 0x65, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x14,
- 0x12, 0x12, 0x5a, 0x6f, 0x6e, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x76, 0x65, 0x72,
- 0x76, 0x69, 0x65, 0x77, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x18, 0x01, 0xaa, 0x8c, 0x89, 0xa6,
- 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x30, 0x01,
- 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x60, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68,
- 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75,
- 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 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,
-}
-
-var (
- file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescOnce sync.Once
- file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescData = file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDesc
-)
-
-func file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescGZIP() []byte {
- file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescOnce.Do(func() {
- file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescData)
- })
- return file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDescData
-}
-
-var file_api_mesh_v1alpha1_zoneegressoverview_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_api_mesh_v1alpha1_zoneegressoverview_proto_goTypes = []interface{}{
- (*ZoneEgressOverview)(nil), // 0: dubbo.mesh.v1alpha1.ZoneEgressOverview
- (*ZoneEgress)(nil), // 1: dubbo.mesh.v1alpha1.ZoneEgress
- (*ZoneEgressInsight)(nil), // 2: dubbo.mesh.v1alpha1.ZoneEgressInsight
-}
-var file_api_mesh_v1alpha1_zoneegressoverview_proto_depIdxs = []int32{
- 1, // 0: dubbo.mesh.v1alpha1.ZoneEgressOverview.zoneEgress:type_name -> dubbo.mesh.v1alpha1.ZoneEgress
- 2, // 1: dubbo.mesh.v1alpha1.ZoneEgressOverview.zoneEgressInsight:type_name -> dubbo.mesh.v1alpha1.ZoneEgressInsight
- 2, // [2:2] is the sub-list for method output_type
- 2, // [2:2] is the sub-list for method input_type
- 2, // [2:2] is the sub-list for extension type_name
- 2, // [2:2] is the sub-list for extension extendee
- 0, // [0:2] is the sub-list for field type_name
-}
-
-func init() { file_api_mesh_v1alpha1_zoneegressoverview_proto_init() }
-func file_api_mesh_v1alpha1_zoneegressoverview_proto_init() {
- if File_api_mesh_v1alpha1_zoneegressoverview_proto != nil {
- return
- }
- file_api_mesh_v1alpha1_zoneegress_proto_init()
- file_api_mesh_v1alpha1_zoneegressinsight_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_api_mesh_v1alpha1_zoneegressoverview_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ZoneEgressOverview); 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_api_mesh_v1alpha1_zoneegressoverview_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 1,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_api_mesh_v1alpha1_zoneegressoverview_proto_goTypes,
- DependencyIndexes: file_api_mesh_v1alpha1_zoneegressoverview_proto_depIdxs,
- MessageInfos: file_api_mesh_v1alpha1_zoneegressoverview_proto_msgTypes,
- }.Build()
- File_api_mesh_v1alpha1_zoneegressoverview_proto = out.File
- file_api_mesh_v1alpha1_zoneegressoverview_proto_rawDesc = nil
- file_api_mesh_v1alpha1_zoneegressoverview_proto_goTypes = nil
- file_api_mesh_v1alpha1_zoneegressoverview_proto_depIdxs = nil
-}
diff --git a/api/mesh/v1alpha1/zoneegressoverview.proto b/api/mesh/v1alpha1/zoneegressoverview.proto
deleted file mode 100644
index ea059f0..0000000
--- a/api/mesh/v1alpha1/zoneegressoverview.proto
+++ /dev/null
@@ -1,24 +0,0 @@
-syntax = "proto3";
-
-package dubbo.mesh.v1alpha1;
-
-option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1";
-
-import "api/mesh/options.proto";
-import "api/mesh/v1alpha1/zoneegress.proto";
-import "api/mesh/v1alpha1/zoneegressinsight.proto";
-
-// ZoneEgressOverview defines the projected state of a ZoneEgress.
-message ZoneEgressOverview {
-
- option (dubbo.mesh.resource).name = "ZoneEgressOverviewResource";
- option (dubbo.mesh.resource).type = "ZoneEgressOverview";
- option (dubbo.mesh.resource).global = true;
- option (dubbo.mesh.resource).package = "mesh";
- option (dubbo.mesh.resource).skip_registration = true;
- option (dubbo.mesh.resource).skip_kubernetes_wrappers = true;
-
- ZoneEgress zoneEgress = 1;
-
- ZoneEgressInsight zoneEgressInsight = 2;
-}
diff --git a/api/mesh/v1alpha1/zoneingress_overview.pb.go b/api/mesh/v1alpha1/zoneingress_overview.pb.go
deleted file mode 100644
index 12e2e6f..0000000
--- a/api/mesh/v1alpha1/zoneingress_overview.pb.go
+++ /dev/null
@@ -1,192 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.20.0
-// source: api/mesh/v1alpha1/zoneingress_overview.proto
-
-package v1alpha1
-
-import (
- reflect "reflect"
- sync "sync"
-)
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-)
-
-import (
- _ "github.com/apache/dubbo-kubernetes/api/mesh"
-)
-
-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)
-)
-
-// ZoneIngressOverview defines the projected state of a ZoneIngress.
-type ZoneIngressOverview struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- ZoneIngress *ZoneIngress `protobuf:"bytes,1,opt,name=zone_ingress,json=zoneIngress,proto3" json:"zone_ingress,omitempty"`
- ZoneIngressInsight *ZoneIngressInsight `protobuf:"bytes,2,opt,name=zone_ingress_insight,json=zoneIngressInsight,proto3" json:"zone_ingress_insight,omitempty"`
-}
-
-func (x *ZoneIngressOverview) Reset() {
- *x = ZoneIngressOverview{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_mesh_v1alpha1_zoneingress_overview_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ZoneIngressOverview) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ZoneIngressOverview) ProtoMessage() {}
-
-func (x *ZoneIngressOverview) ProtoReflect() protoreflect.Message {
- mi := &file_api_mesh_v1alpha1_zoneingress_overview_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 ZoneIngressOverview.ProtoReflect.Descriptor instead.
-func (*ZoneIngressOverview) Descriptor() ([]byte, []int) {
- return file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *ZoneIngressOverview) GetZoneIngress() *ZoneIngress {
- if x != nil {
- return x.ZoneIngress
- }
- return nil
-}
-
-func (x *ZoneIngressOverview) GetZoneIngressInsight() *ZoneIngressInsight {
- if x != nil {
- return x.ZoneIngressInsight
- }
- return nil
-}
-
-var File_api_mesh_v1alpha1_zoneingress_overview_proto protoreflect.FileDescriptor
-
-var file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDesc = []byte{
- 0x0a, 0x2c, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f,
- 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13,
- 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x61, 0x70, 0x69,
- 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7a,
- 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x2c, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73,
- 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
- 0x99, 0x02, 0x0a, 0x13, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4f,
- 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12, 0x43, 0x0a, 0x0c, 0x7a, 0x6f, 0x6e, 0x65, 0x5f,
- 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
- 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52,
- 0x0b, 0x7a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14,
- 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x73,
- 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x75, 0x62,
- 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x73, 0x69,
- 0x67, 0x68, 0x74, 0x52, 0x12, 0x7a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73,
- 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x62, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x1d, 0x0a,
- 0x1b, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x76, 0x65, 0x72,
- 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xaa, 0x8c, 0x89, 0xa6,
- 0x01, 0x15, 0x12, 0x13, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4f,
- 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x18, 0x01, 0xaa,
- 0x8c, 0x89, 0xa6, 0x01, 0x06, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0xaa, 0x8c, 0x89, 0xa6, 0x01,
- 0x02, 0x30, 0x01, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x02, 0x60, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67,
- 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65,
- 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65,
- 0x73, 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,
-}
-
-var (
- file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescOnce sync.Once
- file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescData = file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDesc
-)
-
-func file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescGZIP() []byte {
- file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescOnce.Do(func() {
- file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescData)
- })
- return file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDescData
-}
-
-var file_api_mesh_v1alpha1_zoneingress_overview_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_api_mesh_v1alpha1_zoneingress_overview_proto_goTypes = []interface{}{
- (*ZoneIngressOverview)(nil), // 0: dubbo.mesh.v1alpha1.ZoneIngressOverview
- (*ZoneIngress)(nil), // 1: dubbo.mesh.v1alpha1.ZoneIngress
- (*ZoneIngressInsight)(nil), // 2: dubbo.mesh.v1alpha1.ZoneIngressInsight
-}
-var file_api_mesh_v1alpha1_zoneingress_overview_proto_depIdxs = []int32{
- 1, // 0: dubbo.mesh.v1alpha1.ZoneIngressOverview.zone_ingress:type_name -> dubbo.mesh.v1alpha1.ZoneIngress
- 2, // 1: dubbo.mesh.v1alpha1.ZoneIngressOverview.zone_ingress_insight:type_name -> dubbo.mesh.v1alpha1.ZoneIngressInsight
- 2, // [2:2] is the sub-list for method output_type
- 2, // [2:2] is the sub-list for method input_type
- 2, // [2:2] is the sub-list for extension type_name
- 2, // [2:2] is the sub-list for extension extendee
- 0, // [0:2] is the sub-list for field type_name
-}
-
-func init() { file_api_mesh_v1alpha1_zoneingress_overview_proto_init() }
-func file_api_mesh_v1alpha1_zoneingress_overview_proto_init() {
- if File_api_mesh_v1alpha1_zoneingress_overview_proto != nil {
- return
- }
- file_api_mesh_v1alpha1_zone_ingress_proto_init()
- file_api_mesh_v1alpha1_zone_ingress_insight_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_api_mesh_v1alpha1_zoneingress_overview_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ZoneIngressOverview); 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_api_mesh_v1alpha1_zoneingress_overview_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 1,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_api_mesh_v1alpha1_zoneingress_overview_proto_goTypes,
- DependencyIndexes: file_api_mesh_v1alpha1_zoneingress_overview_proto_depIdxs,
- MessageInfos: file_api_mesh_v1alpha1_zoneingress_overview_proto_msgTypes,
- }.Build()
- File_api_mesh_v1alpha1_zoneingress_overview_proto = out.File
- file_api_mesh_v1alpha1_zoneingress_overview_proto_rawDesc = nil
- file_api_mesh_v1alpha1_zoneingress_overview_proto_goTypes = nil
- file_api_mesh_v1alpha1_zoneingress_overview_proto_depIdxs = nil
-}
diff --git a/api/mesh/v1alpha1/zoneingress_overview.proto b/api/mesh/v1alpha1/zoneingress_overview.proto
deleted file mode 100644
index 8afc614..0000000
--- a/api/mesh/v1alpha1/zoneingress_overview.proto
+++ /dev/null
@@ -1,23 +0,0 @@
-syntax = "proto3";
-
-package dubbo.mesh.v1alpha1;
-
-option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1";
-import "api/mesh/options.proto";
-import "api/mesh/v1alpha1/zone_ingress.proto";
-import "api/mesh/v1alpha1/zone_ingress_insight.proto";
-
-// ZoneIngressOverview defines the projected state of a ZoneIngress.
-message ZoneIngressOverview {
-
- option (dubbo.mesh.resource).name = "ZoneIngressOverviewResource";
- option (dubbo.mesh.resource).type = "ZoneIngressOverview";
- option (dubbo.mesh.resource).global = true;
- option (dubbo.mesh.resource).package = "mesh";
- option (dubbo.mesh.resource).skip_registration = true;
- option (dubbo.mesh.resource).skip_kubernetes_wrappers = true;
-
- ZoneIngress zone_ingress = 1;
-
- ZoneIngressInsight zone_ingress_insight = 2;
-}
diff --git a/api/system/v1alpha1/zone_insight.pb.go b/api/system/v1alpha1/zone_insight.pb.go
index 84b61a8..0f98ab5 100644
--- a/api/system/v1alpha1/zone_insight.pb.go
+++ b/api/system/v1alpha1/zone_insight.pb.go
@@ -161,7 +161,7 @@
return ""
}
-// KDSSubscription describes a single KDS subscription
+// DDSSubscription describes a single DDS subscription
// created by a Zone to the Global.
// Ideally, there should be only one such subscription per Zone lifecycle.
// Presence of multiple subscriptions might indicate one of the following
@@ -184,12 +184,12 @@
ConnectTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=connect_time,json=connectTime,proto3" json:"connect_time,omitempty"`
// Time when a given Zone disconnected from the Global.
DisconnectTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=disconnect_time,json=disconnectTime,proto3" json:"disconnect_time,omitempty"`
- // Status of the KDS subscription.
+ // Status of the DDS subscription.
Status *DDSSubscriptionStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
// Generation is an integer number which is periodically increased by the
// status sink
Generation uint32 `protobuf:"varint,7,opt,name=generation,proto3" json:"generation,omitempty"`
- // Config of Zone Kuma CP
+ // Config of Zone Dubbo CP
Config string `protobuf:"bytes,8,opt,name=config,proto3" json:"config,omitempty"`
// Indicates if subscription provided auth token
AuthTokenProvided bool `protobuf:"varint,9,opt,name=auth_token_provided,json=authTokenProvided,proto3" json:"auth_token_provided,omitempty"`
@@ -299,9 +299,9 @@
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Time when status of a given KDS subscription was most recently updated.
+ // Time when status of a given DDS subscription was most recently updated.
LastUpdateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"`
- // Total defines an aggregate over individual KDS stats.
+ // Total defines an aggregate over individual DDS stats.
Total *DDSServiceStats `protobuf:"bytes,2,opt,name=total,proto3" json:"total,omitempty"`
Stat map[string]*DDSServiceStats `protobuf:"bytes,3,rep,name=stat,proto3" json:"stat,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
diff --git a/api/system/v1alpha1/zone_insight.proto b/api/system/v1alpha1/zone_insight.proto
index 5d6ecf0..2927548 100644
--- a/api/system/v1alpha1/zone_insight.proto
+++ b/api/system/v1alpha1/zone_insight.proto
@@ -34,7 +34,7 @@
string clusters_global_instance_id = 3;
}
-// KDSSubscription describes a single KDS subscription
+// DDSSubscription describes a single DDS subscription
// created by a Zone to the Global.
// Ideally, there should be only one such subscription per Zone lifecycle.
// Presence of multiple subscriptions might indicate one of the following
@@ -58,14 +58,14 @@
// Time when a given Zone disconnected from the Global.
google.protobuf.Timestamp disconnect_time = 4;
- // Status of the KDS subscription.
+ // Status of the DDS subscription.
DDSSubscriptionStatus status = 5;
// Generation is an integer number which is periodically increased by the
// status sink
uint32 generation = 7;
- // Config of Zone Kuma CP
+ // Config of Zone Dubbo CP
string config = 8;
// Indicates if subscription provided auth token
@@ -79,10 +79,10 @@
// DDSSubscriptionStatus defines status of an DDS subscription.
message DDSSubscriptionStatus {
- // Time when status of a given KDS subscription was most recently updated.
+ // Time when status of a given DDS subscription was most recently updated.
google.protobuf.Timestamp last_update_time = 1;
- // Total defines an aggregate over individual KDS stats.
+ // Total defines an aggregate over individual DDS stats.
DDSServiceStats total = 2;
map<string, DDSServiceStats> stat = 3;
diff --git a/app/dubbo-cp/cmd/run.go b/app/dubbo-cp/cmd/run.go
index 9b5c275..71b8389 100644
--- a/app/dubbo-cp/cmd/run.go
+++ b/app/dubbo-cp/cmd/run.go
@@ -41,7 +41,6 @@
dp_server "github.com/apache/dubbo-kubernetes/pkg/dp-server"
"github.com/apache/dubbo-kubernetes/pkg/dubbo"
"github.com/apache/dubbo-kubernetes/pkg/hds"
- "github.com/apache/dubbo-kubernetes/pkg/intercp"
"github.com/apache/dubbo-kubernetes/pkg/test"
"github.com/apache/dubbo-kubernetes/pkg/util/os"
dubbo_version "github.com/apache/dubbo-kubernetes/pkg/version"
@@ -139,10 +138,6 @@
runLog.Error(err, "unable to set up Diagnostics server")
return err
}
- if err := intercp.Setup(rt); err != nil {
- runLog.Error(err, "unable to set up Control Plane Intercommunication")
- return err
- }
if rt.GetMode() == core.Test {
if err := test.Setup(rt); err != nil {
diff --git a/app/dubboctl/cmd/proxy.go b/app/dubboctl/cmd/proxy.go
index 49dd267..54aa98b 100644
--- a/app/dubboctl/cmd/proxy.go
+++ b/app/dubboctl/cmd/proxy.go
@@ -20,19 +20,25 @@
import (
"context"
"fmt"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/util/proto"
- "github.com/pkg/errors"
"io"
"os"
"path/filepath"
"strings"
+)
+
+import (
+ "github.com/pkg/errors"
"github.com/spf13/cobra"
+ "go.uber.org/zap/zapcore"
+)
+
+import (
mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
"github.com/apache/dubbo-kubernetes/app/dubboctl/internal/envoy"
"github.com/apache/dubbo-kubernetes/pkg/config/app/dubboctl"
+ "github.com/apache/dubbo-kubernetes/pkg/core"
dubbo_cmd "github.com/apache/dubbo-kubernetes/pkg/core/cmd"
"github.com/apache/dubbo-kubernetes/pkg/core/logger"
"github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/mesh"
@@ -40,8 +46,8 @@
"github.com/apache/dubbo-kubernetes/pkg/core/resources/model/rest"
core_xds "github.com/apache/dubbo-kubernetes/pkg/core/xds"
dubbo_log "github.com/apache/dubbo-kubernetes/pkg/log"
+ "github.com/apache/dubbo-kubernetes/pkg/util/proto"
"github.com/apache/dubbo-kubernetes/pkg/util/template"
- "go.uber.org/zap/zapcore"
)
var runLog = controlPlaneLog.WithName("proxy")
@@ -119,7 +125,7 @@
return err
}
- fmt.Printf("%s: logs will be stored in %q\n", "kuma-dp", output)
+ fmt.Printf("%s: logs will be stored in %q\n", "dubbo-dp", output)
core.SetLogger(core.NewLoggerWithRotation(level, output, arg.maxSize, arg.maxBackups, arg.maxAge))
} else {
core.SetLogger(core.NewLogger(level))
@@ -200,7 +206,7 @@
envoyComponent, err := envoy.New(opts)
err = envoyComponent.Start(stopComponents)
if err != nil {
- runLog.Error(err, "error while running Kuma DP")
+ runLog.Error(err, "error while running Dubbo DP")
return err
}
runLog.Info("stopping Dubbo proxy")
@@ -210,7 +216,7 @@
// root flags
cmd.PersistentFlags().StringVar(&arg.logLevel, "log-level", dubbo_log.InfoLevel.String(), UsageOptions("log level", dubbo_log.OffLevel, dubbo_log.InfoLevel, dubbo_log.DebugLevel))
- cmd.PersistentFlags().StringVar(&arg.outputPath, "log-output-path", arg.outputPath, "path to the file that will be filled with logs. Example: if we set it to /tmp/kuma.log then after the file is rotated we will have /tmp/kuma-2021-06-07T09-15-18.265.log")
+ cmd.PersistentFlags().StringVar(&arg.outputPath, "log-output-path", arg.outputPath, "path to the file that will be filled with logs. Example: if we set it to /tmp/dubbo.log then after the file is rotated we will have /tmp/dubbo-2021-06-07T09-15-18.265.log")
cmd.PersistentFlags().IntVar(&arg.maxBackups, "log-max-retained-files", 1000, "maximum number of the old log files to retain")
cmd.PersistentFlags().IntVar(&arg.maxSize, "log-max-size", 100, "maximum size in megabytes of a log file before it gets rotated")
cmd.PersistentFlags().IntVar(&arg.maxAge, "log-max-age", 30, "maximum number of days to retain old log files based on the timestamp encoded in their filename")
@@ -221,6 +227,7 @@
proxyCmd.PersistentFlags().StringVar(&cfg.DataplaneRuntime.ResourcePath, "dataplane-file", "Path to Ingress and Egress template to apply (YAML or JSON)", "data-plane-file")
cmd.AddCommand(proxyCmd)
}
+
func UsageOptions(desc string, options ...interface{}) string {
values := make([]string, 0, len(options))
for _, option := range options {
diff --git a/app/dubboctl/cmd/proxy_context.go b/app/dubboctl/cmd/proxy_context.go
index 33cbaff..47e3ac3 100644
--- a/app/dubboctl/cmd/proxy_context.go
+++ b/app/dubboctl/cmd/proxy_context.go
@@ -18,7 +18,6 @@
package cmd
import (
- "github.com/apache/dubbo-kubernetes/pkg/log"
"os"
"path/filepath"
"runtime"
@@ -38,6 +37,7 @@
"github.com/apache/dubbo-kubernetes/pkg/config/app/dubboctl"
"github.com/apache/dubbo-kubernetes/pkg/core/runtime/component"
core_xds "github.com/apache/dubbo-kubernetes/pkg/core/xds"
+ "github.com/apache/dubbo-kubernetes/pkg/log"
leader_memory "github.com/apache/dubbo-kubernetes/pkg/plugins/leader/memory"
util_files "github.com/apache/dubbo-kubernetes/pkg/util/files"
)
diff --git a/app/dubboctl/cmd/proxy_test.go b/app/dubboctl/cmd/proxy_test.go
index ecb6552..a5d7eb1 100644
--- a/app/dubboctl/cmd/proxy_test.go
+++ b/app/dubboctl/cmd/proxy_test.go
@@ -6,10 +6,6 @@
import (
"context"
"fmt"
- dubbo_cmd "github.com/apache/dubbo-kubernetes/pkg/core/cmd"
- "github.com/apache/dubbo-kubernetes/pkg/test"
- . "github.com/onsi/ginkgo/v2"
- . "github.com/onsi/gomega"
"io"
"os"
"path/filepath"
@@ -19,6 +15,17 @@
"testing"
)
+import (
+ . "github.com/onsi/ginkgo/v2"
+
+ . "github.com/onsi/gomega"
+)
+
+import (
+ dubbo_cmd "github.com/apache/dubbo-kubernetes/pkg/core/cmd"
+ "github.com/apache/dubbo-kubernetes/pkg/test"
+)
+
func TestCmd(t *testing.T) {
test.RunSpecs(t, "cmd Suite")
}
diff --git a/app/dubboctl/internal/envoy/envoy.go b/app/dubboctl/internal/envoy/envoy.go
index fe4ef7d..61d7262 100644
--- a/app/dubboctl/internal/envoy/envoy.go
+++ b/app/dubboctl/internal/envoy/envoy.go
@@ -67,9 +67,9 @@
}
type EnvoyVersion struct {
- Build string
- Version string
- KumaDpCompatible bool
+ Build string
+ Version string
+ DubboDpCompatible bool
}
type Opts struct {
diff --git a/app/dubboctl/internal/envoy/remote_bootstrap.go b/app/dubboctl/internal/envoy/remote_bootstrap.go
index a963f12..f658768 100644
--- a/app/dubboctl/internal/envoy/remote_bootstrap.go
+++ b/app/dubboctl/internal/envoy/remote_bootstrap.go
@@ -36,7 +36,6 @@
"github.com/pkg/errors"
- _ "github.com/apache/dubbo-kubernetes/pkg/xds/envoy"
"github.com/sethvargo/go-retry"
)
@@ -46,11 +45,12 @@
util_proto "github.com/apache/dubbo-kubernetes/pkg/util/proto"
dubbo_version "github.com/apache/dubbo-kubernetes/pkg/version"
"github.com/apache/dubbo-kubernetes/pkg/xds/bootstrap/types"
+ _ "github.com/apache/dubbo-kubernetes/pkg/xds/envoy"
)
var (
log = core.Log.WithName("dataplane")
- DpNotFoundErr = errors.New("Dataplane entity not found. If you are running on Universal please create a Dataplane entity on kuma-cp before starting kuma-dp or pass it to kuma-dp run --dataplane-file=/file. If you are running on Kubernetes, please check the kuma-cp logs to determine why the Dataplane entity could not be created by the automatic sidecar injection.")
+ DpNotFoundErr = errors.New("Dataplane entity not found. If you are running on Universal please create a Dataplane entity on dubbo-cp before starting dubbo-dp or pass it to dubbo-dp run --dataplane-file=/file. If you are running on Kubernetes, please check the dubbo-cp logs to determine why the Dataplane entity could not be created by the automatic sidecar injection.")
)
type remoteBootstrap struct {
@@ -199,7 +199,7 @@
Envoy: types.EnvoyVersion{
Version: params.EnvoyVersion.Version,
Build: params.EnvoyVersion.Build,
- DubboDpCompatible: params.EnvoyVersion.KumaDpCompatible,
+ DubboDpCompatible: params.EnvoyVersion.DubboDpCompatible,
},
},
DynamicMetadata: params.DynamicMetadata,
diff --git a/deploy/charts/admin/crds/dubbo.io_mappings.yaml b/deploy/charts/admin/crds/dubbo.io_mappings.yaml
index b2dcd43..8a9c7dd 100644
--- a/deploy/charts/admin/crds/dubbo.io_mappings.yaml
+++ b/deploy/charts/admin/crds/dubbo.io_mappings.yaml
@@ -14,7 +14,7 @@
listKind: MappingList
plural: mappings
singular: mapping
- scope: Cluster
+ scope: Namespaced
versions:
- name: v1alpha1
schema:
diff --git a/deploy/charts/admin/crds/dubbo.io_metadata.yaml b/deploy/charts/admin/crds/dubbo.io_metadata.yaml
index 8ed6f08..039953a 100644
--- a/deploy/charts/admin/crds/dubbo.io_metadata.yaml
+++ b/deploy/charts/admin/crds/dubbo.io_metadata.yaml
@@ -14,7 +14,7 @@
listKind: MetaDataList
plural: metadata
singular: metadata
- scope: Cluster
+ scope: Namespaced
versions:
- name: v1alpha1
schema:
diff --git a/docs/multicluster/design.md b/docs/multicluster/design.md
new file mode 100644
index 0000000..cd57254
--- /dev/null
+++ b/docs/multicluster/design.md
@@ -0,0 +1 @@
+https://www.yuque.com/jiuan-c16st/ofzcvf/vownxi5dy4nzvmm5
diff --git a/mk/run.mk b/mk/run.mk
index a4a4854..20a4055 100644
--- a/mk/run.mk
+++ b/mk/run.mk
@@ -1,7 +1,7 @@
NUM_OF_DATAPLANES ?= 100
NUM_OF_SERVICES ?= 80
DISTRIBUTION_TARGET_NAME ?= $(PROJECT_NAME)
-DUBBO_CP_ADDRESS ?= grpcs://localhost:5678
+DUBBO_CP_ADDRESS ?= grpc://localhost:5678
DISTRIBUTION_FOLDER=build/distributions/$(GOOS)-$(GOARCH)/$(DISTRIBUTION_TARGET_NAME)
CP_STORE = memory
diff --git a/pkg/config/app/dubbo-cp/config.go b/pkg/config/app/dubbo-cp/config.go
index f42d02f..fdc3b9b 100644
--- a/pkg/config/app/dubbo-cp/config.go
+++ b/pkg/config/app/dubbo-cp/config.go
@@ -116,11 +116,11 @@
type DDSEventBasedWatchdog struct {
// How often we flush changes when experimental event based watchdog is used.
- FlushInterval config_types.Duration `json:"flushInterval" envconfig:"DUBBO_EXPERIMENTAL_KDS_EVENT_BASED_WATCHDOG_FLUSH_INTERVAL"`
- // How often we schedule full KDS resync when experimental event based watchdog is used.
- FullResyncInterval config_types.Duration `json:"fullResyncInterval" envconfig:"DUBBO_EXPERIMENTAL_KDS_EVENT_BASED_WATCHDOG_FULL_RESYNC_INTERVAL"`
+ FlushInterval config_types.Duration `json:"flushInterval" envconfig:"DUBBO_EXPERIMENTAL_DDS_EVENT_BASED_WATCHDOG_FLUSH_INTERVAL"`
+ // How often we schedule full DDS resync when experimental event based watchdog is used.
+ FullResyncInterval config_types.Duration `json:"fullResyncInterval" envconfig:"DUBBO_EXPERIMENTAL_DDS_EVENT_BASED_WATCHDOG_FULL_RESYNC_INTERVAL"`
// If true, then initial full resync is going to be delayed by 0 to FullResyncInterval.
- DelayFullResync bool `json:"delayFullResync" envconfig:"DUBBO_EXPERIMENTAL_KDS_EVENT_BASED_WATCHDOG_DELAY_FULL_RESYNC"`
+ DelayFullResync bool `json:"delayFullResync" envconfig:"DUBBO_EXPERIMENTAL_DDS_EVENT_BASED_WATCHDOG_DELAY_FULL_RESYNC"`
}
func DefaultEventBasedWatchdog() DDSEventBasedWatchdog {
diff --git a/pkg/config/app/dubboctl/proxy_config.go b/pkg/config/app/dubboctl/proxy_config.go
index 2d9d219..14024a8 100644
--- a/pkg/config/app/dubboctl/proxy_config.go
+++ b/pkg/config/app/dubboctl/proxy_config.go
@@ -18,11 +18,11 @@
package dubboctl
import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
"time"
)
import (
+ mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
"github.com/apache/dubbo-kubernetes/pkg/config"
config_types "github.com/apache/dubbo-kubernetes/pkg/config/types"
)
diff --git a/pkg/config/dp-server/config.go b/pkg/config/dp-server/config.go
index 08addc9..e0d1688 100644
--- a/pkg/config/dp-server/config.go
+++ b/pkg/config/dp-server/config.go
@@ -72,37 +72,37 @@
// Configuration for zone proxy authentication.
ZoneProxy ZoneProxyAuthnConfig `json:"zoneProxy"`
// If true then Envoy uses Google gRPC instead of Envoy gRPC which lets a proxy reload the auth data (service account token, dp token etc.) from path without proxy restart.
- EnableReloadableTokens bool `json:"enableReloadableTokens" envconfig:"kuma_dp_server_authn_enable_reloadable_tokens"`
+ EnableReloadableTokens bool `json:"enableReloadableTokens" envconfig:"dubbo_dp_server_authn_enable_reloadable_tokens"`
}
type DpProxyAuthnConfig struct {
// Type of authentication. Available values: "serviceAccountToken", "dpToken", "none".
// If empty, autoconfigured based on the environment - "serviceAccountToken" on Kubernetes, "dpToken" on Universal.
- Type string `json:"type" envconfig:"kuma_dp_server_authn_dp_proxy_type"`
+ Type string `json:"type" envconfig:"dubbo_dp_server_authn_dp_proxy_type"`
// Configuration of dpToken authentication method
DpToken DpTokenAuthnConfig `json:"dpToken"`
}
type ZoneProxyAuthnConfig struct {
// Type of authentication. Available values: "serviceAccountToken", "zoneToken", "none".
// If empty, autoconfigured based on the environment - "serviceAccountToken" on Kubernetes, "zoneToken" on Universal.
- Type string `json:"type" envconfig:"kuma_dp_server_authn_zone_proxy_type"`
+ Type string `json:"type" envconfig:"dubbo_dp_server_authn_zone_proxy_type"`
// Configuration for zoneToken authentication method.
ZoneToken ZoneTokenAuthnConfig `json:"zoneToken"`
}
type DpTokenAuthnConfig struct {
// If true the control plane token issuer is enabled. It's recommended to set it to false when all the tokens are issued offline.
- EnableIssuer bool `json:"enableIssuer" envconfig:"kuma_dp_server_authn_dp_proxy_dp_token_enable_issuer"`
+ EnableIssuer bool `json:"enableIssuer" envconfig:"dubbo_dp_server_authn_dp_proxy_dp_token_enable_issuer"`
// DP Token validator configuration
Validator DpTokenValidatorConfig `json:"validator"`
}
type ZoneTokenAuthnConfig struct {
// If true the control plane token issuer is enabled. It's recommended to set it to false when all the tokens are issued offline.
- EnableIssuer bool `json:"enableIssuer" envconfig:"kuma_dp_server_authn_zone_proxy_zone_token_enable_issuer"`
+ EnableIssuer bool `json:"enableIssuer" envconfig:"dubbo_dp_server_authn_zone_proxy_zone_token_enable_issuer"`
// Zone Token validator configuration
Validator ZoneTokenValidatorConfig `json:"validator"`
}
type DpTokenValidatorConfig struct {
- // If true then Kuma secrets with prefix "dataplane-token-signing-key-{mesh}" are considered as signing keys.
- UseSecrets bool `json:"useSecrets" envconfig:"kuma_dp_server_authn_dp_proxy_dp_token_validator_use_secrets"`
+ // If true then Dubbo secrets with prefix "dataplane-token-signing-key-{mesh}" are considered as signing keys.
+ UseSecrets bool `json:"useSecrets" envconfig:"dubbo_dp_server_authn_dp_proxy_dp_token_validator_use_secrets"`
// List of public keys used to validate the token
PublicKeys []config_types.MeshedPublicKey `json:"publicKeys"`
}
@@ -117,8 +117,8 @@
}
type ZoneTokenValidatorConfig struct {
- // If true then Kuma secrets with prefix "zone-token-signing-key" are considered as signing keys.
- UseSecrets bool `json:"useSecrets" envconfig:"kuma_dp_server_authn_zone_proxy_zone_token_validator_use_secrets"`
+ // If true then Dubbo secrets with prefix "zone-token-signing-key" are considered as signing keys.
+ UseSecrets bool `json:"useSecrets" envconfig:"dubbo_dp_server_authn_zone_proxy_zone_token_validator_use_secrets"`
// List of public keys used to validate the token
PublicKeys []config_types.PublicKey `json:"publicKeys"`
}
diff --git a/pkg/config/eventbus/config.go b/pkg/config/eventbus/config.go
index 0591005..b3099d1 100644
--- a/pkg/config/eventbus/config.go
+++ b/pkg/config/eventbus/config.go
@@ -19,7 +19,7 @@
type Config struct {
// BufferSize controls the buffer for every single event listener.
- // If we go over buffer, additional delay may happen to various operation like insight recomputation or KDS.
+ // If we go over buffer, additional delay may happen to various operation like insight recomputation or DDS.
BufferSize uint `json:"bufferSize" envconfig:"dubbo_event_bus_buffer_size"`
}
diff --git a/pkg/config/multizone/dds.go b/pkg/config/multizone/dds.go
index bc8ae0b..89b9eba 100644
--- a/pkg/config/multizone/dds.go
+++ b/pkg/config/multizone/dds.go
@@ -32,36 +32,36 @@
config.BaseConfig
// Port of a gRPC server that serves Dubbo Discovery Service (DDS).
- GrpcPort uint32 `json:"grpcPort" envconfig:"dubbo_multizone_global_kds_grpc_port"`
+ GrpcPort uint32 `json:"grpcPort" envconfig:"dubbo_multizone_global_dds_grpc_port"`
// Interval for refreshing state of the world
- RefreshInterval config_types.Duration `json:"refreshInterval" envconfig:"dubbo_multizone_global_kds_refresh_interval"`
+ RefreshInterval config_types.Duration `json:"refreshInterval" envconfig:"dubbo_multizone_global_dds_refresh_interval"`
// Interval for flushing Zone Insights (stats of multi-zone communication)
- ZoneInsightFlushInterval config_types.Duration `json:"zoneInsightFlushInterval" envconfig:"dubbo_multizone_global_kds_zone_insight_flush_interval"`
- // TlsEnabled turns on TLS for KDS
- TlsEnabled bool `json:"tlsEnabled" envconfig:"dubbo_multizone_global_kds_tls_enabled"`
+ ZoneInsightFlushInterval config_types.Duration `json:"zoneInsightFlushInterval" envconfig:"dubbo_multizone_global_dds_zone_insight_flush_interval"`
+ // TlsEnabled turns on TLS for DDS
+ TlsEnabled bool `json:"tlsEnabled" envconfig:"dubbo_multizone_global_dds_tls_enabled"`
// TlsCertFile defines a path to a file with PEM-encoded TLS cert.
- TlsCertFile string `json:"tlsCertFile" envconfig:"dubbo_multizone_global_kds_tls_cert_file"`
+ TlsCertFile string `json:"tlsCertFile" envconfig:"dubbo_multizone_global_dds_tls_cert_file"`
// TlsKeyFile defines a path to a file with PEM-encoded TLS key.
- TlsKeyFile string `json:"tlsKeyFile" envconfig:"dubbo_multizone_global_kds_tls_key_file"`
+ TlsKeyFile string `json:"tlsKeyFile" envconfig:"dubbo_multizone_global_dds_tls_key_file"`
// TlsMinVersion defines the minimum TLS version to be used
- TlsMinVersion string `json:"tlsMinVersion" envconfig:"dubbo_multizone_global_kds_tls_min_version"`
+ TlsMinVersion string `json:"tlsMinVersion" envconfig:"dubbo_multizone_global_dds_tls_min_version"`
// TlsMaxVersion defines the maximum TLS version to be used
- TlsMaxVersion string `json:"tlsMaxVersion" envconfig:"dubbo_multizone_global_kds_tls_max_version"`
+ TlsMaxVersion string `json:"tlsMaxVersion" envconfig:"dubbo_multizone_global_dds_tls_max_version"`
// TlsCipherSuites defines the list of ciphers to use
- TlsCipherSuites []string `json:"tlsCipherSuites" envconfig:"dubbo_multizone_global_kds_tls_cipher_suites"`
- // MaxMsgSize defines a maximum size of the message that is exchanged using KDS.
+ TlsCipherSuites []string `json:"tlsCipherSuites" envconfig:"dubbo_multizone_global_dds_tls_cipher_suites"`
+ // MaxMsgSize defines a maximum size of the message that is exchanged using DDS.
// In practice this means a limit on full list of one resource type.
- MaxMsgSize uint32 `json:"maxMsgSize" envconfig:"dubbo_multizone_global_kds_max_msg_size"`
- // MsgSendTimeout defines a timeout on sending a single KDS message.
- // KDS stream between control planes is terminated if the control plane hits this timeout.
- MsgSendTimeout config_types.Duration `json:"msgSendTimeout" envconfig:"dubbo_multizone_global_kds_msg_send_timeout"`
+ MaxMsgSize uint32 `json:"maxMsgSize" envconfig:"dubbo_multizone_global_dds_max_msg_size"`
+ // MsgSendTimeout defines a timeout on sending a single DDS message.
+ // DDS stream between control planes is terminated if the control plane hits this timeout.
+ MsgSendTimeout config_types.Duration `json:"msgSendTimeout" envconfig:"dubbo_multizone_global_dds_msg_send_timeout"`
// Backoff that is executed when the global control plane is sending the response that was previously rejected by zone control plane.
- NackBackoff config_types.Duration `json:"nackBackoff" envconfig:"dubbo_multizone_global_kds_nack_backoff"`
- // DisableSOTW if true doesn't expose SOTW version of KDS. Default: false
- DisableSOTW bool `json:"disableSOTW" envconfig:"dubbo_multizone_global_kds_disable_sotw"`
+ NackBackoff config_types.Duration `json:"nackBackoff" envconfig:"dubbo_multizone_global_dds_nack_backoff"`
+ // DisableSOTW if true doesn't expose SOTW version of DDS. Default: false
+ DisableSOTW bool `json:"disableSOTW" envconfig:"dubbo_multizone_global_dds_disable_sotw"`
// ResponseBackoff is a time Global CP waits before sending ACK/NACK.
// This is a way to slow down Zone CP from sending resources too often.
- ResponseBackoff config_types.Duration `json:"responseBackoff" envconfig:"dubbo_multizone_global_kds_response_backoff"`
+ ResponseBackoff config_types.Duration `json:"responseBackoff" envconfig:"dubbo_multizone_global_dds_response_backoff"`
// ZoneHealthCheck holds config for ensuring zones are online
ZoneHealthCheck ZoneHealthCheckConfig `json:"zoneHealthCheck"`
}
@@ -108,22 +108,22 @@
config.BaseConfig
// Interval for refreshing state of the world
- RefreshInterval config_types.Duration `json:"refreshInterval" envconfig:"kuma_multizone_zone_kds_refresh_interval"`
+ RefreshInterval config_types.Duration `json:"refreshInterval" envconfig:"dubbo_multizone_zone_dds_refresh_interval"`
// If true, TLS connection to the server won't be verified.
- TlsSkipVerify bool `json:"tlsSkipVerify" envconfig:"kuma_multizone_zone_kds_tls_skip_verify"`
+ TlsSkipVerify bool `json:"tlsSkipVerify" envconfig:"dubbo_multizone_zone_dds_tls_skip_verify"`
// RootCAFile defines a path to a file with PEM-encoded Root CA. Client will verify the server by using it.
- RootCAFile string `json:"rootCaFile" envconfig:"kuma_multizone_zone_kds_root_ca_file"`
- // MaxMsgSize defines a maximum size of the message that is exchanged using KDS.
+ RootCAFile string `json:"rootCaFile" envconfig:"dubbo_multizone_zone_dds_root_ca_file"`
+ // MaxMsgSize defines a maximum size of the message that is exchanged using DDS.
// In practice this means a limit on full list of one resource type.
- MaxMsgSize uint32 `json:"maxMsgSize" envconfig:"kuma_multizone_zone_kds_max_msg_size"`
- // MsgSendTimeout defines a timeout on sending a single KDS message.
- // KDS stream between control planes is terminated if the control plane hits this timeout.
- MsgSendTimeout config_types.Duration `json:"msgSendTimeout" envconfig:"kuma_multizone_zone_kds_msg_send_timeout"`
+ MaxMsgSize uint32 `json:"maxMsgSize" envconfig:"dubbo_multizone_zone_dds_max_msg_size"`
+ // MsgSendTimeout defines a timeout on sending a single DDS message.
+ // DDS stream between control planes is terminated if the control plane hits this timeout.
+ MsgSendTimeout config_types.Duration `json:"msgSendTimeout" envconfig:"dubbo_multizone_zone_dds_msg_send_timeout"`
// Backoff that is executed when the zone control plane is sending the response that was previously rejected by global control plane.
- NackBackoff config_types.Duration `json:"nackBackoff" envconfig:"kuma_multizone_zone_kds_nack_backoff"`
+ NackBackoff config_types.Duration `json:"nackBackoff" envconfig:"dubbo_multizone_zone_dds_nack_backoff"`
// ResponseBackoff is a time Zone CP waits before sending ACK/NACK.
// This is a way to slow down Global CP from sending resources too often.
- ResponseBackoff config_types.Duration `json:"responseBackoff" envconfig:"kuma_multizone_zone_kds_response_backoff"`
+ ResponseBackoff config_types.Duration `json:"responseBackoff" envconfig:"dubbo_multizone_zone_dds_response_backoff"`
}
var _ config.Config = &DdsClientConfig{}
@@ -135,10 +135,10 @@
// PollInterval is the interval between the global CP checking ZoneInsight for
// health check pings and interval between zone CP sending health check pings
- PollInterval config_types.Duration `json:"pollInterval" envconfig:"kuma_multizone_global_kds_zone_health_check_poll_interval"`
+ PollInterval config_types.Duration `json:"pollInterval" envconfig:"dubbo_multizone_global_dds_zone_health_check_poll_interval"`
// Timeout is the time after the last health check that a zone counts as
// no longer online
- Timeout config_types.Duration `json:"timeout" envconfig:"kuma_multizone_global_kds_zone_health_check_timeout"`
+ Timeout config_types.Duration `json:"timeout" envconfig:"dubbo_multizone_global_dds_zone_health_check_timeout"`
}
func (c ZoneHealthCheckConfig) Validate() error {
diff --git a/pkg/config/plugins/runtime/k8s/config.go b/pkg/config/plugins/runtime/k8s/config.go
index c0aea14..ecf7f76 100644
--- a/pkg/config/plugins/runtime/k8s/config.go
+++ b/pkg/config/plugins/runtime/k8s/config.go
@@ -149,7 +149,7 @@
return errs
}
-// DataplaneContainer defines the configuration of a Kuma dataplane proxy container.
+// DataplaneContainer defines the configuration of a Dubbo dataplane proxy container.
type DataplaneContainer struct {
// Deprecated: Use DUBBO_BOOTSTRAP_SERVER_PARAMS_ADMIN_PORT instead.
AdminPort uint32 `json:"adminPort,omitempty" envconfig:"dubbo_runtime_kubernetes_injector_sidecar_container_admin_port"`
@@ -159,7 +159,7 @@
ReadinessProbe SidecarReadinessProbe `json:"readinessProbe,omitempty"`
// Liveness probe.
LivenessProbe SidecarLivenessProbe `json:"livenessProbe,omitempty"`
- // EnvVars are additional environment variables that can be placed on Kuma DP sidecar
+ // EnvVars are additional environment variables that can be placed on Dubbo DP sidecar
EnvVars map[string]string `json:"envVars" envconfig:"dubbo_runtime_kubernetes_injector_sidecar_container_env_vars"`
}
diff --git a/pkg/config/xds/config.go b/pkg/config/xds/config.go
index cb9a72c..ba2cd0b 100644
--- a/pkg/config/xds/config.go
+++ b/pkg/config/xds/config.go
@@ -66,7 +66,7 @@
}
type Gateway struct {
- GlobalDownstreamMaxConnections uint64 `json:"globalDownstreamMaxConnections" envconfig:"kuma_proxy_gateway_global_downstream_max_connections"`
+ GlobalDownstreamMaxConnections uint64 `json:"globalDownstreamMaxConnections" envconfig:"dubbo_proxy_gateway_global_downstream_max_connections"`
}
func DefaultXdsServerConfig() *XdsServerConfig {
diff --git a/pkg/core/admin/client.go b/pkg/core/admin/client.go
deleted file mode 100644
index 5bcbf39..0000000
--- a/pkg/core/admin/client.go
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package admin
-
-import (
- "context"
- "crypto/tls"
- "crypto/x509"
- "fmt"
- "io"
- "net"
- "net/http"
- "net/url"
- "time"
-)
-
-import (
- envoy_admin_v3 "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
-
- "github.com/pkg/errors"
-)
-
-import (
- core_mesh "github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/mesh"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/manager"
- core_model "github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
- util_proto "github.com/apache/dubbo-kubernetes/pkg/util/proto"
-)
-
-type EnvoyAdminClient interface {
- PostQuit(ctx context.Context, dataplane *core_mesh.DataplaneResource) error
-
- Stats(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error)
- Clusters(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error)
- ConfigDump(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error)
-}
-
-type envoyAdminClient struct {
- rm manager.ResourceManager
- defaultAdminPort uint32
-
- caCertPool *x509.CertPool
- clientCert *tls.Certificate
-}
-
-func NewEnvoyAdminClient(rm manager.ResourceManager, adminPort uint32) EnvoyAdminClient {
- client := &envoyAdminClient{
- rm: rm,
- defaultAdminPort: adminPort,
- }
- return client
-}
-
-func (a *envoyAdminClient) buildHTTPClient(ctx context.Context) (*http.Client, error) {
- c := &http.Client{
- Transport: &http.Transport{
- DialContext: (&net.Dialer{
- Timeout: 3 * time.Second,
- }).DialContext,
- },
- Timeout: 5 * time.Second,
- }
- return c, nil
-}
-
-const (
- quitquitquit = "quitquitquit"
-)
-
-func (a *envoyAdminClient) PostQuit(ctx context.Context, dataplane *core_mesh.DataplaneResource) error {
- httpClient, err := a.buildHTTPClient(ctx)
- if err != nil {
- return err
- }
-
- url := fmt.Sprintf("https://%s/%s", dataplane.AdminAddress(a.defaultAdminPort), quitquitquit)
- request, err := http.NewRequestWithContext(ctx, "POST", url, nil)
- if err != nil {
- return err
- }
-
- // Envoy will not send back any response, so do we not check the response
- response, err := httpClient.Do(request)
- if errors.Is(err, io.EOF) {
- return nil // Envoy may not respond correctly for this request because it already started the shut-down process.
- }
- if err != nil {
- return errors.Wrapf(err, "unable to send POST to %s", quitquitquit)
- }
- defer response.Body.Close()
-
- if response.StatusCode != http.StatusOK {
- return errors.Errorf("envoy response [%d %s] [%s]", response.StatusCode, response.Status, response.Body)
- }
-
- return nil
-}
-
-func (a *envoyAdminClient) Stats(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- return a.executeRequest(ctx, proxy, "stats")
-}
-
-func (a *envoyAdminClient) Clusters(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- return a.executeRequest(ctx, proxy, "clusters")
-}
-
-func (a *envoyAdminClient) ConfigDump(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- configDump, err := a.executeRequest(ctx, proxy, "config_dump")
- if err != nil {
- return nil, err
- }
-
- cd := &envoy_admin_v3.ConfigDump{}
- if err := util_proto.FromJSON(configDump, cd); err != nil {
- return nil, err
- }
-
- if err := Sanitize(cd); err != nil {
- return nil, err
- }
-
- return util_proto.ToJSONIndent(cd, " ")
-}
-
-func (a *envoyAdminClient) executeRequest(ctx context.Context, proxy core_model.ResourceWithAddress, path string) ([]byte, error) {
- var httpClient *http.Client
- var err error
- u := &url.URL{}
-
- switch proxy.(type) {
- case *core_mesh.DataplaneResource:
- httpClient, err = a.buildHTTPClient(ctx)
- if err != nil {
- return nil, err
- }
- u.Scheme = "https"
- case *core_mesh.ZoneIngressResource, *core_mesh.ZoneEgressResource:
- httpClient, err = a.buildHTTPClient(ctx)
- if err != nil {
- return nil, err
- }
- u.Scheme = "https"
- default:
- return nil, errors.New("unsupported proxy type")
- }
-
- if host, _, err := net.SplitHostPort(proxy.AdminAddress(a.defaultAdminPort)); err == nil && host == "127.0.0.1" {
- httpClient = &http.Client{
- Timeout: 5 * time.Second,
- }
- u.Scheme = "http"
- }
-
- u.Host = proxy.AdminAddress(a.defaultAdminPort)
- u.Path = path
- request, err := http.NewRequestWithContext(ctx, "GET", u.String(), nil)
- if err != nil {
- return nil, err
- }
-
- response, err := httpClient.Do(request)
- if err != nil {
- return nil, errors.Wrapf(err, "unable to send GET to %s", "config_dump")
- }
- defer response.Body.Close()
-
- if response.StatusCode != http.StatusOK {
- return nil, errors.Errorf("envoy response [%d %s] [%s]", response.StatusCode, response.Status, response.Body)
- }
-
- resp, err := io.ReadAll(response.Body)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
diff --git a/pkg/core/admin/dds_client.go b/pkg/core/admin/dds_client.go
deleted file mode 100644
index 474b180..0000000
--- a/pkg/core/admin/dds_client.go
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package admin
-
-import (
- "context"
- "fmt"
- "reflect"
-)
-
-import (
- "github.com/pkg/errors"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- core_mesh "github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/mesh"
- core_model "github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
- "github.com/apache/dubbo-kubernetes/pkg/dds/service"
- util_grpc "github.com/apache/dubbo-kubernetes/pkg/util/grpc"
- "github.com/apache/dubbo-kubernetes/pkg/util/k8s"
-)
-
-type ddsEnvoyAdminClient struct {
- rpcs service.EnvoyAdminRPCs
- k8sStore bool
-}
-
-func NewDDSEnvoyAdminClient(rpcs service.EnvoyAdminRPCs, k8sStore bool) EnvoyAdminClient {
- return &ddsEnvoyAdminClient{
- rpcs: rpcs,
- k8sStore: k8sStore,
- }
-}
-
-var _ EnvoyAdminClient = &ddsEnvoyAdminClient{}
-
-func (k *ddsEnvoyAdminClient) PostQuit(context.Context, *core_mesh.DataplaneResource) error {
- panic("not implemented")
-}
-
-func (k *ddsEnvoyAdminClient) ConfigDump(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- zone := core_model.ZoneOfResource(proxy)
- nameInZone := resNameInZone(proxy)
- reqId := core.NewUUID()
- tenantZoneID := service.ZoneClientIDFromCtx(ctx, zone)
-
- err := k.rpcs.XDSConfigDump.Send(tenantZoneID.String(), &mesh_proto.XDSConfigRequest{
- RequestId: reqId,
- ResourceType: string(proxy.Descriptor().Name),
- ResourceName: nameInZone, // send the name which without the added prefix
- ResourceMesh: proxy.GetMeta().GetMesh(), // should be empty for ZoneIngress/ZoneEgress
- })
- if err != nil {
- return nil, &DDSTransportError{requestType: "XDSConfigRequest", reason: err.Error()}
- }
-
- defer k.rpcs.XDSConfigDump.DeleteWatch(tenantZoneID.String(), reqId)
- ch := make(chan util_grpc.ReverseUnaryMessage)
- if err := k.rpcs.XDSConfigDump.WatchResponse(tenantZoneID.String(), reqId, ch); err != nil {
- return nil, errors.Wrapf(err, "could not watch the response")
- }
-
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case resp := <-ch:
- configResp, ok := resp.(*mesh_proto.XDSConfigResponse)
- if !ok {
- return nil, errors.New("invalid request type")
- }
- if configResp.GetError() != "" {
- return nil, &DDSTransportError{requestType: "XDSConfigRequest", reason: configResp.GetError()}
- }
- return configResp.GetConfig(), nil
- }
-}
-
-func (k *ddsEnvoyAdminClient) Stats(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- zone := core_model.ZoneOfResource(proxy)
- nameInZone := resNameInZone(proxy)
- reqId := core.NewUUID()
- tenantZoneId := service.ZoneClientIDFromCtx(ctx, zone)
-
- err := k.rpcs.Stats.Send(tenantZoneId.String(), &mesh_proto.StatsRequest{
- RequestId: reqId,
- ResourceType: string(proxy.Descriptor().Name),
- ResourceName: nameInZone, // send the name which without the added prefix
- ResourceMesh: proxy.GetMeta().GetMesh(), // should be empty for ZoneIngress/ZoneEgress
- })
- if err != nil {
- return nil, &DDSTransportError{requestType: "StatsRequest", reason: err.Error()}
- }
-
- defer k.rpcs.Stats.DeleteWatch(tenantZoneId.String(), reqId)
- ch := make(chan util_grpc.ReverseUnaryMessage)
- if err := k.rpcs.Stats.WatchResponse(tenantZoneId.String(), reqId, ch); err != nil {
- return nil, errors.Wrapf(err, "could not watch the response")
- }
-
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case resp := <-ch:
- statsResp, ok := resp.(*mesh_proto.StatsResponse)
- if !ok {
- return nil, errors.New("invalid request type")
- }
- if statsResp.GetError() != "" {
- return nil, &DDSTransportError{requestType: "StatsRequest", reason: statsResp.GetError()}
- }
- return statsResp.GetStats(), nil
- }
-}
-
-func (k *ddsEnvoyAdminClient) Clusters(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- zone := core_model.ZoneOfResource(proxy)
- nameInZone := resNameInZone(proxy)
- reqId := core.NewUUID()
- tenantZoneID := service.ZoneClientIDFromCtx(ctx, zone)
-
- err := k.rpcs.Clusters.Send(tenantZoneID.String(), &mesh_proto.ClustersRequest{
- RequestId: reqId,
- ResourceType: string(proxy.Descriptor().Name),
- ResourceName: nameInZone, // send the name which without the added prefix
- ResourceMesh: proxy.GetMeta().GetMesh(), // should be empty for ZoneIngress/ZoneEgress
- })
- if err != nil {
- return nil, &DDSTransportError{requestType: "ClustersRequest", reason: err.Error()}
- }
-
- defer k.rpcs.Clusters.DeleteWatch(tenantZoneID.String(), reqId)
- ch := make(chan util_grpc.ReverseUnaryMessage)
- if err := k.rpcs.Clusters.WatchResponse(tenantZoneID.String(), reqId, ch); err != nil {
- return nil, errors.Wrapf(err, "could not watch the response")
- }
-
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case resp := <-ch:
- clustersResp, ok := resp.(*mesh_proto.ClustersResponse)
- if !ok {
- return nil, errors.New("invalid request type")
- }
- if clustersResp.GetError() != "" {
- return nil, &DDSTransportError{requestType: "ClustersRequest", reason: clustersResp.GetError()}
- }
- return clustersResp.GetClusters(), nil
- }
-}
-
-func resNameInZone(r core_model.Resource) string {
- name := core_model.GetDisplayName(r)
- if ns := r.GetMeta().GetLabels()[mesh_proto.KubeNamespaceTag]; ns != "" {
- name = k8s.K8sNamespacedNameToCoreName(name, ns)
- }
- return name
-}
-
-type DDSTransportError struct {
- requestType string
- reason string
-}
-
-func (e *DDSTransportError) Error() string {
- if e.reason == "" {
- return fmt.Sprintf("could not send %s", e.requestType)
- } else {
- return fmt.Sprintf("could not send %s: %s", e.requestType, e.reason)
- }
-}
-
-func (e *DDSTransportError) Is(err error) bool {
- return reflect.TypeOf(e) == reflect.TypeOf(err)
-}
diff --git a/pkg/core/admin/sanitize.go b/pkg/core/admin/sanitize.go
deleted file mode 100644
index 3b9b8d8..0000000
--- a/pkg/core/admin/sanitize.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package admin
-
-import (
- envoy_admin_v3 "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
-)
-
-func Sanitize(configDump *envoy_admin_v3.ConfigDump) error {
- for _, config := range configDump.Configs {
- if config.MessageIs(&envoy_admin_v3.BootstrapConfigDump{}) {
- bootstrapConfigDump := &envoy_admin_v3.BootstrapConfigDump{}
- if err := config.UnmarshalTo(bootstrapConfigDump); err != nil {
- return err
- }
-
- for _, grpcService := range bootstrapConfigDump.GetBootstrap().GetDynamicResources().GetAdsConfig().GetGrpcServices() {
- for i, initMeta := range grpcService.InitialMetadata {
- if initMeta.Key == "authorization" {
- grpcService.InitialMetadata[i].Value = "[redacted]"
- }
- }
- }
-
- for _, grpcService := range bootstrapConfigDump.GetBootstrap().GetHdsConfig().GetGrpcServices() {
- for i, initMeta := range grpcService.InitialMetadata {
- if initMeta.Key == "authorization" {
- grpcService.InitialMetadata[i].Value = "[redacted]"
- }
- }
- }
-
- if err := config.MarshalFrom(bootstrapConfigDump); err != nil {
- return err
- }
- }
- }
- return nil
-}
diff --git a/pkg/core/bootstrap/bootstrap.go b/pkg/core/bootstrap/bootstrap.go
index 36e8805..8d5591a 100644
--- a/pkg/core/bootstrap/bootstrap.go
+++ b/pkg/core/bootstrap/bootstrap.go
@@ -41,7 +41,6 @@
config_core "github.com/apache/dubbo-kubernetes/pkg/config/core"
"github.com/apache/dubbo-kubernetes/pkg/config/core/resources/store"
"github.com/apache/dubbo-kubernetes/pkg/core"
- admin2 "github.com/apache/dubbo-kubernetes/pkg/core/admin"
config_manager "github.com/apache/dubbo-kubernetes/pkg/core/config/manager"
"github.com/apache/dubbo-kubernetes/pkg/core/consts"
"github.com/apache/dubbo-kubernetes/pkg/core/datasource"
@@ -68,9 +67,6 @@
dds_context "github.com/apache/dubbo-kubernetes/pkg/dds/context"
"github.com/apache/dubbo-kubernetes/pkg/dp-server/server"
"github.com/apache/dubbo-kubernetes/pkg/events"
- "github.com/apache/dubbo-kubernetes/pkg/intercp"
- "github.com/apache/dubbo-kubernetes/pkg/intercp/catalog"
- "github.com/apache/dubbo-kubernetes/pkg/intercp/envoyadmin"
k8s_extensions "github.com/apache/dubbo-kubernetes/pkg/plugins/extensions/k8s"
mesh_cache "github.com/apache/dubbo-kubernetes/pkg/xds/cache/mesh"
xds_context "github.com/apache/dubbo-kubernetes/pkg/xds/context"
@@ -126,28 +122,8 @@
}))
resourceManager := builder.ResourceManager()
- kdsContext := dds_context.DefaultContext(appCtx, resourceManager, cfg)
- builder.WithDDSContext(kdsContext)
-
- if cfg.Mode == config_core.Global {
- kdsEnvoyAdminClient := admin2.NewDDSEnvoyAdminClient(
- builder.DDSContext().EnvoyAdminRPCs,
- cfg.Store.Type == store.KubernetesStore,
- )
- forwardingClient := envoyadmin.NewForwardingEnvoyAdminClient(
- builder.ReadOnlyResourceManager(),
- catalog.NewConfigCatalog(resourceManager),
- builder.GetInstanceId(),
- intercp.PooledEnvoyAdminClientFn(builder.InterCPClientPool()),
- kdsEnvoyAdminClient,
- )
- builder.WithEnvoyAdminClient(forwardingClient)
- } else {
- builder.WithEnvoyAdminClient(admin2.NewEnvoyAdminClient(
- resourceManager,
- builder.Config().GetEnvoyAdminPort(),
- ))
- }
+ ddsContext := dds_context.DefaultContext(appCtx, resourceManager, cfg)
+ builder.WithDDSContext(ddsContext)
if err := initializeMeshCache(builder); err != nil {
return nil, err
diff --git a/pkg/core/managers/apis/dataplane/dataplane_manager.go b/pkg/core/managers/apis/dataplane/dataplane_manager.go
index f3feb71..8fc7adf 100644
--- a/pkg/core/managers/apis/dataplane/dataplane_manager.go
+++ b/pkg/core/managers/apis/dataplane/dataplane_manager.go
@@ -135,7 +135,7 @@
for _, inbound := range dp.Spec.Networking.Inbound {
if inbound.ServiceProbe != nil {
inbound.State = mesh_proto.Dataplane_Networking_Inbound_NotReady
- // write health for backwards compatibility with Kuma 2.5 and older
+ // write health for backwards compatibility with Dubbo
inbound.Health = &mesh_proto.Dataplane_Networking_Inbound_Health{
Ready: false,
}
@@ -147,5 +147,4 @@
if m.zone == "" || dp.Spec.Networking == nil {
return
}
-
}
diff --git a/pkg/plugins/common/zookeeper/listener.go b/pkg/core/resources/apis/mesh/metadata_helpers.go
similarity index 74%
rename from pkg/plugins/common/zookeeper/listener.go
rename to pkg/core/resources/apis/mesh/metadata_helpers.go
index fae637d..ca644ab 100644
--- a/pkg/plugins/common/zookeeper/listener.go
+++ b/pkg/core/resources/apis/mesh/metadata_helpers.go
@@ -15,16 +15,11 @@
* limitations under the License.
*/
-package zookeeper
+package mesh
-type Listener interface {
- Notify() chan *Notification
- Error() <-chan error
- Close() error
-}
-
-// Notification represents a single notification from the database.
-type Notification struct {
- // Payload, or the empty string if unspecified.
- Payload string
+func (t *MetaDataResource) IsRemotingMetadata(localZone string) bool {
+ if t.Spec.GetZone() == "" || t.Spec.GetZone() == localZone {
+ return false
+ }
+ return true
}
diff --git a/pkg/core/resources/apis/mesh/zz_generated.resources.go b/pkg/core/resources/apis/mesh/zz_generated.resources.go
index 88d5b74..d7b8765 100644
--- a/pkg/core/resources/apis/mesh/zz_generated.resources.go
+++ b/pkg/core/resources/apis/mesh/zz_generated.resources.go
@@ -5,7 +5,6 @@
package mesh
import (
- "errors"
"fmt"
)
@@ -218,7 +217,7 @@
ReadOnly: false,
AdminOnly: false,
Scope: model.ScopeMesh,
- DDSFlags: model.GlobalToAllZonesFlag,
+ DDSFlags: model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
WsPath: "dataplanes",
DubboctlArg: "dataplane",
DubboctlListArg: "dataplanes",
@@ -545,7 +544,7 @@
ReadOnly: false,
AdminOnly: false,
Scope: model.ScopeMesh,
- DDSFlags: model.GlobalToAllZonesFlag,
+ DDSFlags: model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
WsPath: "mappings",
DubboctlArg: "mapping",
DubboctlListArg: "mappings",
@@ -653,13 +652,13 @@
ResourceList: &MeshResourceList{},
ReadOnly: false,
AdminOnly: false,
- Scope: model.ScopeMesh,
+ Scope: model.ScopeGlobal,
DDSFlags: model.GlobalToAllZonesFlag,
WsPath: "meshes",
DubboctlArg: "mesh",
DubboctlListArg: "meshes",
AllowToInspect: true,
- IsPolicy: true,
+ IsPolicy: false,
SingularDisplayName: "Mesh",
PluralDisplayName: "Meshes",
IsExperimental: false,
@@ -871,7 +870,7 @@
ReadOnly: false,
AdminOnly: false,
Scope: model.ScopeMesh,
- DDSFlags: model.GlobalToAllZonesFlag,
+ DDSFlags: model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
WsPath: "metadatas",
DubboctlArg: "metadata",
DubboctlListArg: "metadatas",
@@ -1088,13 +1087,13 @@
ResourceList: &ZoneEgressResourceList{},
ReadOnly: false,
AdminOnly: false,
- Scope: model.ScopeMesh,
- DDSFlags: model.GlobalToAllZonesFlag,
+ Scope: model.ScopeGlobal,
+ DDSFlags: model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
WsPath: "zoneegresses",
DubboctlArg: "zoneegress",
DubboctlListArg: "zoneegresses",
AllowToInspect: true,
- IsPolicy: true,
+ IsPolicy: false,
SingularDisplayName: "Zone Egress",
PluralDisplayName: "Zone Egresses",
IsExperimental: false,
@@ -1214,125 +1213,6 @@
}
const (
- ZoneEgressOverviewType model.ResourceType = "ZoneEgressOverview"
-)
-
-var _ model.Resource = &ZoneEgressOverviewResource{}
-
-type ZoneEgressOverviewResource struct {
- Meta model.ResourceMeta
- Spec *mesh_proto.ZoneEgressOverview
-}
-
-func NewZoneEgressOverviewResource() *ZoneEgressOverviewResource {
- return &ZoneEgressOverviewResource{
- Spec: &mesh_proto.ZoneEgressOverview{},
- }
-}
-
-func (t *ZoneEgressOverviewResource) GetMeta() model.ResourceMeta {
- return t.Meta
-}
-
-func (t *ZoneEgressOverviewResource) SetMeta(m model.ResourceMeta) {
- t.Meta = m
-}
-
-func (t *ZoneEgressOverviewResource) GetSpec() model.ResourceSpec {
- return t.Spec
-}
-
-func (t *ZoneEgressOverviewResource) SetSpec(spec model.ResourceSpec) error {
- protoType, ok := spec.(*mesh_proto.ZoneEgressOverview)
- if !ok {
- return fmt.Errorf("invalid type %T for Spec", spec)
- } else {
- if protoType == nil {
- t.Spec = &mesh_proto.ZoneEgressOverview{}
- } else {
- t.Spec = protoType
- }
- return nil
- }
-}
-
-func (t *ZoneEgressOverviewResource) Descriptor() model.ResourceTypeDescriptor {
- return ZoneEgressOverviewResourceTypeDescriptor
-}
-
-func (t *ZoneEgressOverviewResource) SetOverviewSpec(resource model.Resource, insight model.Resource) error {
- t.SetMeta(resource.GetMeta())
- overview := &mesh_proto.ZoneEgressOverview{
- ZoneEgress: resource.GetSpec().(*mesh_proto.ZoneEgress),
- }
- if insight != nil {
- ins, ok := insight.GetSpec().(*mesh_proto.ZoneEgressInsight)
- if !ok {
- return errors.New("failed to convert to insight type 'ZoneEgressInsight'")
- }
- overview.ZoneEgressInsight = ins
- }
- return t.SetSpec(overview)
-}
-
-var _ model.ResourceList = &ZoneEgressOverviewResourceList{}
-
-type ZoneEgressOverviewResourceList struct {
- Items []*ZoneEgressOverviewResource
- Pagination model.Pagination
-}
-
-func (l *ZoneEgressOverviewResourceList) GetItems() []model.Resource {
- res := make([]model.Resource, len(l.Items))
- for i, elem := range l.Items {
- res[i] = elem
- }
- return res
-}
-
-func (l *ZoneEgressOverviewResourceList) GetItemType() model.ResourceType {
- return ZoneEgressOverviewType
-}
-
-func (l *ZoneEgressOverviewResourceList) NewItem() model.Resource {
- return NewZoneEgressOverviewResource()
-}
-
-func (l *ZoneEgressOverviewResourceList) AddItem(r model.Resource) error {
- if trr, ok := r.(*ZoneEgressOverviewResource); ok {
- l.Items = append(l.Items, trr)
- return nil
- } else {
- return model.ErrorInvalidItemType((*ZoneEgressOverviewResource)(nil), r)
- }
-}
-
-func (l *ZoneEgressOverviewResourceList) GetPagination() *model.Pagination {
- return &l.Pagination
-}
-
-func (l *ZoneEgressOverviewResourceList) SetPagination(p model.Pagination) {
- l.Pagination = p
-}
-
-var ZoneEgressOverviewResourceTypeDescriptor = model.ResourceTypeDescriptor{
- Name: ZoneEgressOverviewType,
- Resource: NewZoneEgressOverviewResource(),
- ResourceList: &ZoneEgressOverviewResourceList{},
- ReadOnly: false,
- AdminOnly: false,
- Scope: model.ScopeGlobal,
- WsPath: "",
- DubboctlArg: "",
- DubboctlListArg: "",
- AllowToInspect: false,
- IsPolicy: false,
- SingularDisplayName: "Zone Egress Overview",
- PluralDisplayName: "Zone Egress Overviews",
- IsExperimental: false,
-}
-
-const (
ZoneIngressType model.ResourceType = "ZoneIngress"
)
@@ -1425,13 +1305,13 @@
ResourceList: &ZoneIngressResourceList{},
ReadOnly: false,
AdminOnly: false,
- Scope: model.ScopeMesh,
- DDSFlags: model.GlobalToAllZonesFlag,
+ Scope: model.ScopeGlobal,
+ DDSFlags: model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag,
WsPath: "zoneingresses",
DubboctlArg: "zoneingress",
DubboctlListArg: "zoneingresses",
AllowToInspect: true,
- IsPolicy: true,
+ IsPolicy: false,
SingularDisplayName: "Zone Ingress",
PluralDisplayName: "Zone Ingresses",
IsExperimental: false,
@@ -1549,122 +1429,3 @@
func init() {
registry.RegisterType(ZoneIngressInsightResourceTypeDescriptor)
}
-
-const (
- ZoneIngressOverviewType model.ResourceType = "ZoneIngressOverview"
-)
-
-var _ model.Resource = &ZoneIngressOverviewResource{}
-
-type ZoneIngressOverviewResource struct {
- Meta model.ResourceMeta
- Spec *mesh_proto.ZoneIngressOverview
-}
-
-func NewZoneIngressOverviewResource() *ZoneIngressOverviewResource {
- return &ZoneIngressOverviewResource{
- Spec: &mesh_proto.ZoneIngressOverview{},
- }
-}
-
-func (t *ZoneIngressOverviewResource) GetMeta() model.ResourceMeta {
- return t.Meta
-}
-
-func (t *ZoneIngressOverviewResource) SetMeta(m model.ResourceMeta) {
- t.Meta = m
-}
-
-func (t *ZoneIngressOverviewResource) GetSpec() model.ResourceSpec {
- return t.Spec
-}
-
-func (t *ZoneIngressOverviewResource) SetSpec(spec model.ResourceSpec) error {
- protoType, ok := spec.(*mesh_proto.ZoneIngressOverview)
- if !ok {
- return fmt.Errorf("invalid type %T for Spec", spec)
- } else {
- if protoType == nil {
- t.Spec = &mesh_proto.ZoneIngressOverview{}
- } else {
- t.Spec = protoType
- }
- return nil
- }
-}
-
-func (t *ZoneIngressOverviewResource) Descriptor() model.ResourceTypeDescriptor {
- return ZoneIngressOverviewResourceTypeDescriptor
-}
-
-func (t *ZoneIngressOverviewResource) SetOverviewSpec(resource model.Resource, insight model.Resource) error {
- t.SetMeta(resource.GetMeta())
- overview := &mesh_proto.ZoneIngressOverview{
- ZoneIngress: resource.GetSpec().(*mesh_proto.ZoneIngress),
- }
- if insight != nil {
- ins, ok := insight.GetSpec().(*mesh_proto.ZoneIngressInsight)
- if !ok {
- return errors.New("failed to convert to insight type 'ZoneIngressInsight'")
- }
- overview.ZoneIngressInsight = ins
- }
- return t.SetSpec(overview)
-}
-
-var _ model.ResourceList = &ZoneIngressOverviewResourceList{}
-
-type ZoneIngressOverviewResourceList struct {
- Items []*ZoneIngressOverviewResource
- Pagination model.Pagination
-}
-
-func (l *ZoneIngressOverviewResourceList) GetItems() []model.Resource {
- res := make([]model.Resource, len(l.Items))
- for i, elem := range l.Items {
- res[i] = elem
- }
- return res
-}
-
-func (l *ZoneIngressOverviewResourceList) GetItemType() model.ResourceType {
- return ZoneIngressOverviewType
-}
-
-func (l *ZoneIngressOverviewResourceList) NewItem() model.Resource {
- return NewZoneIngressOverviewResource()
-}
-
-func (l *ZoneIngressOverviewResourceList) AddItem(r model.Resource) error {
- if trr, ok := r.(*ZoneIngressOverviewResource); ok {
- l.Items = append(l.Items, trr)
- return nil
- } else {
- return model.ErrorInvalidItemType((*ZoneIngressOverviewResource)(nil), r)
- }
-}
-
-func (l *ZoneIngressOverviewResourceList) GetPagination() *model.Pagination {
- return &l.Pagination
-}
-
-func (l *ZoneIngressOverviewResourceList) SetPagination(p model.Pagination) {
- l.Pagination = p
-}
-
-var ZoneIngressOverviewResourceTypeDescriptor = model.ResourceTypeDescriptor{
- Name: ZoneIngressOverviewType,
- Resource: NewZoneIngressOverviewResource(),
- ResourceList: &ZoneIngressOverviewResourceList{},
- ReadOnly: false,
- AdminOnly: false,
- Scope: model.ScopeGlobal,
- WsPath: "",
- DubboctlArg: "",
- DubboctlListArg: "",
- AllowToInspect: false,
- IsPolicy: false,
- SingularDisplayName: "Zone Ingress Overview",
- PluralDisplayName: "Zone Ingress Overviews",
- IsExperimental: false,
-}
diff --git a/pkg/core/runtime/builder.go b/pkg/core/runtime/builder.go
index 35e0521..55122a4 100644
--- a/pkg/core/runtime/builder.go
+++ b/pkg/core/runtime/builder.go
@@ -36,7 +36,6 @@
import (
dubbo_cp "github.com/apache/dubbo-kubernetes/pkg/config/app/dubbo-cp"
"github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/admin"
config_manager "github.com/apache/dubbo-kubernetes/pkg/core/config/manager"
"github.com/apache/dubbo-kubernetes/pkg/core/datasource"
"github.com/apache/dubbo-kubernetes/pkg/core/dns/lookup"
@@ -49,7 +48,6 @@
dds_context "github.com/apache/dubbo-kubernetes/pkg/dds/context"
dp_server "github.com/apache/dubbo-kubernetes/pkg/dp-server/server"
"github.com/apache/dubbo-kubernetes/pkg/events"
- "github.com/apache/dubbo-kubernetes/pkg/intercp/client"
"github.com/apache/dubbo-kubernetes/pkg/xds/cache/mesh"
)
@@ -74,7 +72,6 @@
EventBus() events.EventBus
DpServer() *dp_server.DpServer
DataplaneCache() *sync.Map
- InterCPClientPool() *client.Pool
DDSContext() *dds_context.Context
ResourceValidators() ResourceValidators
}
@@ -90,7 +87,6 @@
txs core_store.Transactions
rm core_manager.CustomizableResourceManager
rom core_manager.ReadOnlyResourceManager
- eac admin.EnvoyAdminClient
ext context.Context
meshCache *mesh.Cache
lif lookup.LookupIPFunc
@@ -98,7 +94,6 @@
leadInfo component.LeaderInfo
erf events.EventBus
dsl datasource.Loader
- interCpPool *client.Pool
dps *dp_server.DpServer
registryCenter dubboRegistry.Registry
metadataReportCenter report.MetadataReport
@@ -213,11 +208,6 @@
return b
}
-func (b *Builder) WithEnvoyAdminClient(eac admin.EnvoyAdminClient) *Builder {
- b.eac = eac
- return b
-}
-
func (b *Builder) WithDDSContext(ddsctx *dds_context.Context) *Builder {
b.ddsctx = ddsctx
return b
@@ -311,7 +301,6 @@
erf: b.erf,
dCache: b.dCache,
dps: b.dps,
- eac: b.eac,
serviceDiscovery: b.serviceDiscover,
rv: b.rv,
appCtx: b.appCtx,
@@ -377,10 +366,6 @@
return b.rom
}
-func (b *Builder) InterCPClientPool() *client.Pool {
- return b.interCpPool
-}
-
func (b *Builder) LookupIP() lookup.LookupIPFunc {
return b.lif
}
diff --git a/pkg/core/runtime/runtime.go b/pkg/core/runtime/runtime.go
index 902e331..e2e6496 100644
--- a/pkg/core/runtime/runtime.go
+++ b/pkg/core/runtime/runtime.go
@@ -32,7 +32,6 @@
import (
dubbo_cp "github.com/apache/dubbo-kubernetes/pkg/config/app/dubbo-cp"
"github.com/apache/dubbo-kubernetes/pkg/config/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/admin"
config_manager "github.com/apache/dubbo-kubernetes/pkg/core/config/manager"
"github.com/apache/dubbo-kubernetes/pkg/core/governance"
managers_dataplane "github.com/apache/dubbo-kubernetes/pkg/core/managers/apis/dataplane"
@@ -71,7 +70,6 @@
ReadOnlyResourceManager() core_manager.ReadOnlyResourceManager
ConfigStore() core_store.ResourceStore
Extensions() context.Context
- EnvoyAdminClient() admin.EnvoyAdminClient
ConfigManager() config_manager.ConfigManager
LeaderInfo() component.LeaderInfo
EventBus() events.EventBus
@@ -155,7 +153,6 @@
cs core_store.ResourceStore
rom core_manager.ReadOnlyResourceManager
ext context.Context
- eac admin.EnvoyAdminClient
configm config_manager.ConfigManager
xds xds_runtime.XDSRuntimeContext
leadInfo component.LeaderInfo
@@ -206,10 +203,6 @@
return b.metadataReportCenter
}
-func (rc *runtimeContext) EnvoyAdminClient() admin.EnvoyAdminClient {
- return rc.eac
-}
-
func (rc *runtimeContext) DDSContext() *dds_context.Context {
return rc.ddsctx
}
diff --git a/pkg/core/xds/sockets.go b/pkg/core/xds/sockets.go
index 32f11a9..089be44 100644
--- a/pkg/core/xds/sockets.go
+++ b/pkg/core/xds/sockets.go
@@ -7,12 +7,12 @@
// AccessLogSocketName generates a socket path that will fit the Unix socket path limitation of 104 chars
func AccessLogSocketName(tmpDir, name, mesh string) string {
- return socketName(filepath.Join(tmpDir, fmt.Sprintf("kuma-al-%s-%s", name, mesh)))
+ return socketName(filepath.Join(tmpDir, fmt.Sprintf("dubbo-al-%s-%s", name, mesh)))
}
// MetricsHijackerSocketName generates a socket path that will fit the Unix socket path limitation of 104 chars
func MetricsHijackerSocketName(tmpDir, name, mesh string) string {
- return socketName(filepath.Join(tmpDir, fmt.Sprintf("kuma-mh-%s-%s", name, mesh)))
+ return socketName(filepath.Join(tmpDir, fmt.Sprintf("dubbo-mh-%s-%s", name, mesh)))
}
func socketName(s string) string {
diff --git a/pkg/dds/context/context.go b/pkg/dds/context/context.go
index 1ae593d..9a9da71 100644
--- a/pkg/dds/context/context.go
+++ b/pkg/dds/context/context.go
@@ -46,7 +46,6 @@
"github.com/apache/dubbo-kubernetes/pkg/dds/hash"
"github.com/apache/dubbo-kubernetes/pkg/dds/mux"
"github.com/apache/dubbo-kubernetes/pkg/dds/reconcile"
- "github.com/apache/dubbo-kubernetes/pkg/dds/service"
"github.com/apache/dubbo-kubernetes/pkg/dds/util"
)
@@ -63,7 +62,6 @@
GlobalResourceMapper reconcile.ResourceMapper
ZoneResourceMapper reconcile.ResourceMapper
- EnvoyAdminRPCs service.EnvoyAdminRPCs
ServerStreamInterceptors []grpc.StreamServerInterceptor
ServerUnaryInterceptor []grpc.UnaryServerInterceptor
}
@@ -111,7 +109,6 @@
Configs: configs,
GlobalResourceMapper: CompositeResourceMapper(globalMappers...),
ZoneResourceMapper: CompositeResourceMapper(zoneMappers...),
- EnvoyAdminRPCs: service.NewEnvoyAdminRPCs(),
}
}
@@ -174,10 +171,10 @@
}
}
-// HashSuffixMapper returns mapper that adds a hash suffix to the name during KDS sync
-func HashSuffixMapper(checkKDSFeature bool, labelsToUse ...string) reconcile.ResourceMapper {
+// HashSuffixMapper returns mapper that adds a hash suffix to the name during DDS sync
+func HashSuffixMapper(checkDDSFeature bool, labelsToUse ...string) reconcile.ResourceMapper {
return func(features dds.Features, r core_model.Resource) (core_model.Resource, error) {
- if checkKDSFeature && !features.HasFeature(dds.FeatureHashSuffix) {
+ if checkDDSFeature && !features.HasFeature(dds.FeatureHashSuffix) {
return r, nil
}
diff --git a/pkg/dds/features.go b/pkg/dds/features.go
index 94326f9..4ac624e 100644
--- a/pkg/dds/features.go
+++ b/pkg/dds/features.go
@@ -45,8 +45,6 @@
// global control plane to indicate it's still running.
const FeatureZonePingHealth string = "zone-ping-health"
-// FeatureHashSuffix means that the zone control plane has a fix for the MeshGateway renaming
-// issue https://github.com/kumahq/kuma/pull/8450 and can handle the hash suffix in the resource name.
const FeatureHashSuffix string = "hash-suffix"
func ContextHasFeature(ctx context.Context, feature string) bool {
diff --git a/pkg/dds/global/components.go b/pkg/dds/global/components.go
index d568e4b..941d8e2 100644
--- a/pkg/dds/global/components.go
+++ b/pkg/dds/global/components.go
@@ -104,19 +104,19 @@
}
log := ddsDeltaGlobalLog.WithValues("peer-id", zoneID)
log = dubbo_log.AddFieldsFromCtx(log, stream.Context(), rt.Extensions())
- kdsStream := dds_client.NewDeltaDDSStream(stream, zoneID, rt, "")
+ ddsStream := dds_client.NewDeltaDDSStream(stream, zoneID, rt, "")
sink := dds_client.NewDDSSyncClient(
log,
reg.ObjectTypes(model.HasDDSFlag(model.ZoneToGlobalFlag)),
- kdsStream,
+ ddsStream,
dds_sync_store.GlobalSyncCallback(stream.Context(), resourceSyncer, rt.Config().Store.Type == store_config.KubernetesStore, kubeFactory, rt.Config().Store.Kubernetes.SystemNamespace),
rt.Config().Multizone.Global.DDS.ResponseBackoff.Duration,
)
go func() {
if err := sink.Receive(); err != nil {
- errChan <- errors.Wrap(err, "KDSSyncClient finished with an error")
+ errChan <- errors.Wrap(err, "DDSSyncClient finished with an error")
} else {
- log.V(1).Info("KDSSyncClient finished gracefully")
+ log.V(1).Info("DDSSyncClient finished gracefully")
}
}()
})
@@ -149,7 +149,6 @@
*rt.Config().Multizone.Global.DDS,
service.NewGlobalDDSServiceServer(
rt.AppContext(),
- rt.DDSContext().EnvoyAdminRPCs,
rt.ResourceManager(),
rt.GetInstanceId(),
streamInterceptors,
diff --git a/pkg/dds/mux/client.go b/pkg/dds/mux/client.go
index 4723ce5..c070e37 100644
--- a/pkg/dds/mux/client.go
+++ b/pkg/dds/mux/client.go
@@ -46,31 +46,40 @@
"github.com/apache/dubbo-kubernetes/pkg/core"
"github.com/apache/dubbo-kubernetes/pkg/core/runtime/component"
"github.com/apache/dubbo-kubernetes/pkg/dds"
- "github.com/apache/dubbo-kubernetes/pkg/dds/service"
"github.com/apache/dubbo-kubernetes/pkg/version"
)
+const (
+ DDSVersionHeaderKey = "dds-version"
+ DDSVersionV3 = "v3"
+)
+
var muxClientLog = core.Log.WithName("dds-mux-client")
type client struct {
- globalToZoneCb OnGlobalToZoneSyncStartedFunc
- zoneToGlobalCb OnZoneToGlobalSyncStartedFunc
- globalURL string
- clientID string
- config multizone.DdsClientConfig
- ctx context.Context
- envoyAdminProcessor service.EnvoyAdminProcessor
+ globalToZoneCb OnGlobalToZoneSyncStartedFunc
+ zoneToGlobalCb OnZoneToGlobalSyncStartedFunc
+ globalURL string
+ clientID string
+ config multizone.DdsClientConfig
+ ctx context.Context
}
-func NewClient(ctx context.Context, globalURL string, clientID string, globalToZoneCb OnGlobalToZoneSyncStartedFunc, zoneToGlobalCb OnZoneToGlobalSyncStartedFunc, config multizone.DdsClientConfig, envoyAdminProcessor service.EnvoyAdminProcessor) component.Component {
+func NewClient(
+ ctx context.Context,
+ globalURL string,
+ clientID string,
+ globalToZoneCb OnGlobalToZoneSyncStartedFunc,
+ zoneToGlobalCb OnZoneToGlobalSyncStartedFunc,
+ config multizone.DdsClientConfig,
+) component.Component {
return &client{
- ctx: ctx,
- globalToZoneCb: globalToZoneCb,
- zoneToGlobalCb: zoneToGlobalCb,
- globalURL: globalURL,
- clientID: clientID,
- config: config,
- envoyAdminProcessor: envoyAdminProcessor,
+ ctx: ctx,
+ globalToZoneCb: globalToZoneCb,
+ zoneToGlobalCb: zoneToGlobalCb,
+ globalURL: globalURL,
+ clientID: clientID,
+ config: config,
}
}
@@ -123,10 +132,6 @@
go c.startHealthCheck(withDDSCtx, log, conn, errorCh)
- go c.startXDSConfigs(withDDSCtx, log, conn, errorCh)
- go c.startStats(withDDSCtx, log, conn, errorCh)
- go c.startClusters(withDDSCtx, log, conn, errorCh)
-
go c.startGlobalToZoneSync(withDDSCtx, log, conn, errorCh)
go c.startZoneToGlobalSync(withDDSCtx, log, conn, errorCh)
@@ -141,10 +146,10 @@
}
func (c *client) startGlobalToZoneSync(ctx context.Context, log logr.Logger, conn *grpc.ClientConn, errorCh chan error) {
- kdsClient := mesh_proto.NewDDSSyncServiceClient(conn)
+ ddsClient := mesh_proto.NewDDSSyncServiceClient(conn)
log = log.WithValues("rpc", "global-to-zone")
log.Info("initializing Dubbo Discovery Service (DDS) stream for global to zone sync of resources with delta xDS")
- stream, err := kdsClient.GlobalToZoneSync(ctx)
+ stream, err := ddsClient.GlobalToZoneSync(ctx)
if err != nil {
errorCh <- err
return
@@ -155,10 +160,10 @@
}
func (c *client) startZoneToGlobalSync(ctx context.Context, log logr.Logger, conn *grpc.ClientConn, errorCh chan error) {
- kdsClient := mesh_proto.NewDDSSyncServiceClient(conn)
+ ddsClient := mesh_proto.NewDDSSyncServiceClient(conn)
log = log.WithValues("rpc", "zone-to-global")
log.Info("initializing Dubbo Discovery Service (DDS) stream for zone to global sync of resources with delta xDS")
- stream, err := kdsClient.ZoneToGlobalSync(ctx)
+ stream, err := ddsClient.ZoneToGlobalSync(ctx)
if err != nil {
errorCh <- err
return
@@ -168,66 +173,6 @@
c.handleProcessingErrors(stream, log, processingErrorsCh, errorCh)
}
-func (c *client) startXDSConfigs(
- ctx context.Context,
- log logr.Logger,
- conn *grpc.ClientConn,
- errorCh chan error,
-) {
- client := mesh_proto.NewGlobalDDSServiceClient(conn)
- log = log.WithValues("rpc", "XDS Configs")
- log.Info("initializing rpc stream for executing config dump on data plane proxies")
- stream, err := client.StreamXDSConfigs(ctx)
- if err != nil {
- errorCh <- err
- return
- }
-
- processingErrorsCh := make(chan error)
- go c.envoyAdminProcessor.StartProcessingXDSConfigs(stream, processingErrorsCh)
- c.handleProcessingErrors(stream, log, processingErrorsCh, errorCh)
-}
-
-func (c *client) startStats(
- ctx context.Context,
- log logr.Logger,
- conn *grpc.ClientConn,
- errorCh chan error,
-) {
- client := mesh_proto.NewGlobalDDSServiceClient(conn)
- log = log.WithValues("rpc", "stats")
- log.Info("initializing rpc stream for executing stats on data plane proxies")
- stream, err := client.StreamStats(ctx)
- if err != nil {
- errorCh <- err
- return
- }
-
- processingErrorsCh := make(chan error)
- go c.envoyAdminProcessor.StartProcessingStats(stream, processingErrorsCh)
- c.handleProcessingErrors(stream, log, processingErrorsCh, errorCh)
-}
-
-func (c *client) startClusters(
- ctx context.Context,
- log logr.Logger,
- conn *grpc.ClientConn,
- errorCh chan error,
-) {
- client := mesh_proto.NewGlobalDDSServiceClient(conn)
- log = log.WithValues("rpc", "clusters")
- log.Info("initializing rpc stream for executing clusters on data plane proxies")
- stream, err := client.StreamClusters(ctx)
- if err != nil {
- errorCh <- err
- return
- }
-
- processingErrorsCh := make(chan error)
- go c.envoyAdminProcessor.StartProcessingClusters(stream, processingErrorsCh)
- c.handleProcessingErrors(stream, log, processingErrorsCh, errorCh)
-}
-
func (c *client) startHealthCheck(
ctx context.Context,
log logr.Logger,
@@ -278,7 +223,7 @@
err := <-processingErrorsCh
if status.Code(err) == codes.Unimplemented {
log.Error(err, "rpc stream failed, because global CP does not implement this rpc. Upgrade remote CP.")
- // backwards compatibility. Do not rethrow error, so KDS multiplex can still operate.
+ // backwards compatibility. Do not rethrow error, so DDS multiplex can still operate.
return
}
if errors.Is(err, context.Canceled) {
diff --git a/pkg/dds/mux/clientstream.go b/pkg/dds/mux/clientstream.go
deleted file mode 100644
index 959b187..0000000
--- a/pkg/dds/mux/clientstream.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package mux
-
-import (
- "context"
-)
-
-import (
- envoy_sd "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
-
- "google.golang.org/grpc/metadata"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
-)
-
-type ddsClientStream struct {
- ctx context.Context
- bufferStream *bufferStream
-}
-
-func (k *ddsClientStream) Send(request *envoy_sd.DiscoveryRequest) error {
- err := k.bufferStream.Send(&mesh_proto.Message{Value: &mesh_proto.Message_Request{Request: request}})
- return err
-}
-
-func (k *ddsClientStream) Recv() (*envoy_sd.DiscoveryResponse, error) {
- res, err := k.bufferStream.Recv()
- if err != nil {
- return nil, err
- }
- return res.GetResponse(), nil
-}
-
-func (k *ddsClientStream) Header() (metadata.MD, error) {
- panic("not implemented")
-}
-
-func (k *ddsClientStream) Trailer() metadata.MD {
- panic("not implemented")
-}
-
-func (k *ddsClientStream) CloseSend() error {
- panic("not implemented")
-}
-
-func (k *ddsClientStream) Context() context.Context {
- return k.ctx
-}
-
-func (k *ddsClientStream) SendMsg(m interface{}) error {
- panic("not implemented")
-}
-
-func (k *ddsClientStream) RecvMsg(m interface{}) error {
- panic("not implemented")
-}
diff --git a/pkg/dds/mux/server.go b/pkg/dds/mux/server.go
index 65338b9..efb6137 100644
--- a/pkg/dds/mux/server.go
+++ b/pkg/dds/mux/server.go
@@ -69,7 +69,6 @@
ddsSyncServiceServer *DDSSyncServiceServer
streamInterceptors []grpc.StreamServerInterceptor
unaryInterceptors []grpc.UnaryServerInterceptor
- mesh_proto.UnimplementedMultiplexServiceServer
}
func NewServer(
@@ -130,10 +129,6 @@
)
grpcServer := grpc.NewServer(grpcOptions...)
- // register services
- if !s.config.DisableSOTW {
- mesh_proto.RegisterMultiplexServiceServer(grpcServer, s)
- }
mesh_proto.RegisterGlobalDDSServiceServer(grpcServer, s.serviceServer)
mesh_proto.RegisterDDSSyncServiceServer(grpcServer, s.ddsSyncServiceServer)
diff --git a/pkg/dds/mux/serverstream.go b/pkg/dds/mux/serverstream.go
deleted file mode 100644
index 70546dc..0000000
--- a/pkg/dds/mux/serverstream.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package mux
-
-import (
- "context"
-)
-
-import (
- envoy_sd "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
-
- "google.golang.org/grpc/metadata"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
-)
-
-type ddsServerStream struct {
- ctx context.Context
- bufferStream *bufferStream
-}
-
-func (k *ddsServerStream) Send(response *envoy_sd.DiscoveryResponse) error {
- err := k.bufferStream.Send(&mesh_proto.Message{Value: &mesh_proto.Message_Response{Response: response}})
- return err
-}
-
-func (k *ddsServerStream) Recv() (*envoy_sd.DiscoveryRequest, error) {
- res, err := k.bufferStream.Recv()
- if err != nil {
- return nil, err
- }
- return res.GetRequest(), nil
-}
-
-func (k *ddsServerStream) SetHeader(metadata.MD) error {
- panic("not implemented")
-}
-
-func (k *ddsServerStream) SendHeader(metadata.MD) error {
- panic("not implemented")
-}
-
-func (k *ddsServerStream) SetTrailer(metadata.MD) {
- panic("not implemented")
-}
-
-func (k *ddsServerStream) Context() context.Context {
- return k.ctx
-}
-
-func (k *ddsServerStream) SendMsg(m interface{}) error {
- panic("not implemented")
-}
-
-func (k *ddsServerStream) RecvMsg(m interface{}) error {
- panic("not implemented")
-}
diff --git a/pkg/dds/mux/session.go b/pkg/dds/mux/session.go
deleted file mode 100644
index 9ac32a5..0000000
--- a/pkg/dds/mux/session.go
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package mux
-
-import (
- "context"
- "errors"
- "io"
- "sync"
- "time"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
-)
-
-type Session interface {
- ServerStream() mesh_proto.DubboDiscoveryService_StreamDubboResourcesServer
- ClientStream() mesh_proto.DubboDiscoveryService_StreamDubboResourcesClient
- PeerID() string
- Error() <-chan error
- SetError(err error)
-}
-
-type session struct {
- peerID string
- serverStream *ddsServerStream
- clientStream *ddsClientStream
-
- err chan error
- sync.Once // protects err, so we only send the first error and close the channel
-}
-
-// handleRecv polls to receive messages from the DDSStream (the actual grpc bidi-stream).
-// Depending on the message it dispatches to either the server receive buffer or the client receive buffer.
-// It also closes both streams when an error on the recv side happens.
-// We can rely on an error on recv to end the session because we're sure an error on recv will always happen, it might be io.EOF if we're just done.
-func (s *session) handleRecv(stream MultiplexStream) {
- msg, err := stream.Recv()
- if err != nil {
- s.clientStream.bufferStream.close()
- s.serverStream.bufferStream.close()
- // Recv always finishes with either an EOF or another error
- s.SetError(err)
- return
- }
- switch v := msg.Value.(type) {
- case *mesh_proto.Message_LegacyRequest:
- msg = &mesh_proto.Message{Value: &mesh_proto.Message_Request{Request: DiscoveryRequestV3(v.LegacyRequest)}}
- case *mesh_proto.Message_LegacyResponse:
- msg = &mesh_proto.Message{Value: &mesh_proto.Message_Response{Response: DiscoveryResponseV3(v.LegacyResponse)}}
- }
- // We can safely not care about locking as we're only closing the channel from this goroutine.
- switch msg.Value.(type) {
- case *mesh_proto.Message_Request:
- s.serverStream.bufferStream.recvBuffer <- msg
- case *mesh_proto.Message_Response:
- s.clientStream.bufferStream.recvBuffer <- msg
- }
-}
-
-// handleSend polls either sendBuffer and call send on the DDSStream (the actual grpc bidi-stream).
-// This call is stopped whenever either of the sendBuffer are closed (in practice they are always closed together anyway).
-func (s *session) handleSend(stream MultiplexStream, sendTimeout time.Duration) {
- for {
- var msgToSend *mesh_proto.Message
- select {
- case msg, more := <-s.serverStream.bufferStream.sendBuffer:
- if !more {
- return
- }
- msgToSend = msg
- case msg, more := <-s.clientStream.bufferStream.sendBuffer:
- if !more {
- return
- }
- msgToSend = msg
- }
- ctx, cancel := context.WithTimeout(context.Background(), sendTimeout)
- go func() {
- <-ctx.Done()
- if ctx.Err() == context.DeadlineExceeded {
- // This is very unlikely to happen, but it was introduced as a last resort protection from a gRPC streaming deadlock.
- // gRPC streaming deadlock may happen if both peers are stuck on Send() operation without calling Recv() often enough.
- // In this case, if data is big enough, both parties may wait for WINDOW_UPDATE on HTTP/2 stream.
- // We fixed the deadlock by increasing buffer size which is larger that all possible inflight request.
- // If the connection is broken and send is stuck, it's more likely for gRPC keep alive to catch such case.
- // If you still hit the timeout without deadlock, you may increase it. However, there are two possible scenarios
- // 1) This is a malicious client reading stream byte by byte. In this case it's actually better to end the stream
- // 2) A client is such overwhelmed that it cannot even let the server know that it's ready to receive more data.
- // In this case it's recommended to scale number of instances.
- s.SetError(errors.New("timeout while sending a message to peer"))
- }
- }()
- if err := stream.Send(msgToSend); err != nil {
- s.SetError(err)
- cancel()
- return
- }
- cancel()
- }
-}
-
-type MultiplexStream interface {
- Send(message *mesh_proto.Message) error
- Recv() (*mesh_proto.Message, error)
- Context() context.Context
-}
-
-type bufferStream struct {
- sendBuffer chan *mesh_proto.Message
- recvBuffer chan *mesh_proto.Message
-
- // Protects the send-buffer against writing on a closed channel, this is needed as we don't control in which goroutine `Send` will be called.
- lock sync.Mutex
- closed bool
-}
-
-func (s *session) SetError(err error) {
- // execute this once so writers to this channel won't be stuck or trying to write to a close channel
- // We only care about the first error, because it results in broken session anyway.
- s.Once.Do(func() {
- s.err <- err
- close(s.err)
- })
-}
-
-func (s *session) ServerStream() mesh_proto.DubboDiscoveryService_StreamDubboResourcesServer {
- return s.serverStream
-}
-
-func (s *session) ClientStream() mesh_proto.DubboDiscoveryService_StreamDubboResourcesClient {
- return s.clientStream
-}
-
-func (s *session) PeerID() string {
- return s.peerID
-}
-
-func (s *session) Error() <-chan error {
- return s.err
-}
-
-func newBufferStream(bufferSize uint32) *bufferStream {
- return &bufferStream{
- sendBuffer: make(chan *mesh_proto.Message, bufferSize),
- recvBuffer: make(chan *mesh_proto.Message, bufferSize),
- }
-}
-
-func (k *bufferStream) Send(message *mesh_proto.Message) error {
- k.lock.Lock()
- defer k.lock.Unlock()
- if k.closed {
- return io.EOF
- }
- k.sendBuffer <- message
- return nil
-}
-
-func (k *bufferStream) Recv() (*mesh_proto.Message, error) {
- r, more := <-k.recvBuffer
- if !more {
- return nil, io.EOF
- }
- return r, nil
-}
-
-func (k *bufferStream) close() {
- k.lock.Lock()
- defer k.lock.Unlock()
-
- k.closed = true
- close(k.sendBuffer)
- close(k.recvBuffer)
-}
diff --git a/pkg/dds/mux/version.go b/pkg/dds/mux/version.go
deleted file mode 100644
index a331dd8..0000000
--- a/pkg/dds/mux/version.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package mux
-
-import (
- envoy_api_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
- envoy_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
- envoy_sd_v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
-)
-
-const (
- DDSVersionHeaderKey = "dds-version"
- DDSVersionV3 = "v3"
-)
-
-func DiscoveryRequestV3(request *envoy_api_v2.DiscoveryRequest) *envoy_sd_v3.DiscoveryRequest {
- return &envoy_sd_v3.DiscoveryRequest{
- VersionInfo: request.VersionInfo,
- Node: &envoy_core_v3.Node{
- Id: request.Node.Id,
- Metadata: request.Node.Metadata,
- },
- ResourceNames: request.ResourceNames,
- TypeUrl: request.TypeUrl,
- ResponseNonce: request.ResponseNonce,
- ErrorDetail: request.ErrorDetail,
- }
-}
-
-func DiscoveryResponseV3(response *envoy_api_v2.DiscoveryResponse) *envoy_sd_v3.DiscoveryResponse {
- return &envoy_sd_v3.DiscoveryResponse{
- VersionInfo: response.VersionInfo,
- Resources: response.Resources,
- TypeUrl: response.TypeUrl,
- Nonce: response.Nonce,
- ControlPlane: &envoy_core_v3.ControlPlane{
- Identifier: response.ControlPlane.Identifier,
- },
- }
-}
diff --git a/pkg/dds/mux/zone_sync.go b/pkg/dds/mux/zone_sync.go
index c65a873..b6ef396 100644
--- a/pkg/dds/mux/zone_sync.go
+++ b/pkg/dds/mux/zone_sync.go
@@ -125,7 +125,7 @@
logger := clientLog.WithValues("clientID", zone)
for _, filter := range g.filters {
if err := filter.InterceptServerStream(stream); err != nil {
- return errors.Wrap(err, "closing KDS stream following a callback error")
+ return errors.Wrap(err, "closing DDS stream following a callback error")
}
}
diff --git a/pkg/dds/reconcile/reconciler.go b/pkg/dds/reconcile/reconciler.go
index c1fb527..9121efc 100644
--- a/pkg/dds/reconcile/reconciler.go
+++ b/pkg/dds/reconcile/reconciler.go
@@ -133,6 +133,7 @@
continue
}
+ // 如果旧版本不为空, 并且新版本和旧版本的资源是一样的, 那么以旧版本为主
if old != nil && r.equal(new.GetResources(typ), old.GetResources(typ)) {
version = old.GetVersion(typ)
}
diff --git a/pkg/dds/service/envoy_admin_processor.go b/pkg/dds/service/envoy_admin_processor.go
deleted file mode 100644
index 2d2675a..0000000
--- a/pkg/dds/service/envoy_admin_processor.go
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package service
-
-import (
- "context"
- "time"
-)
-
-import (
- "github.com/pkg/errors"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
- core_manager "github.com/apache/dubbo-kubernetes/pkg/core/resources/manager"
- core_model "github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/registry"
- core_store "github.com/apache/dubbo-kubernetes/pkg/core/resources/store"
-)
-
-type EnvoyAdminProcessor interface {
- StartProcessingXDSConfigs(stream mesh_proto.GlobalDDSService_StreamXDSConfigsClient, errorCh chan error)
- StartProcessingStats(stream mesh_proto.GlobalDDSService_StreamStatsClient, errorCh chan error)
- StartProcessingClusters(stream mesh_proto.GlobalDDSService_StreamClustersClient, errorCh chan error)
-}
-
-type EnvoyAdminFn = func(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error)
-
-type envoyAdminProcessor struct {
- resManager core_manager.ReadOnlyResourceManager
-
- configDumpFn EnvoyAdminFn
- statsFn EnvoyAdminFn
- clustersFn EnvoyAdminFn
-}
-
-func (e *envoyAdminProcessor) StartProcessingXDSConfigs(stream mesh_proto.GlobalDDSService_StreamXDSConfigsClient, errorCh chan error) {
- for {
- req, err := stream.Recv()
- if err != nil {
- errorCh <- err
- return
- }
- go func() { // schedule in the background to be able to quickly process more requests
- config, err := e.executeAdminFn(stream.Context(), req.ResourceType, req.ResourceName, req.ResourceMesh, e.configDumpFn)
-
- resp := &mesh_proto.XDSConfigResponse{
- RequestId: req.RequestId,
- }
- if len(config) > 0 {
- resp.Result = &mesh_proto.XDSConfigResponse_Config{
- Config: config,
- }
- }
- if err != nil { // send the error to the client instead of terminating stream.
- resp.Result = &mesh_proto.XDSConfigResponse_Error{
- Error: err.Error(),
- }
- }
- if err := stream.Send(resp); err != nil {
- errorCh <- err
- return
- }
- }()
- }
-}
-
-func (e *envoyAdminProcessor) StartProcessingStats(stream mesh_proto.GlobalDDSService_StreamStatsClient, errorCh chan error) {
- for {
- req, err := stream.Recv()
- if err != nil {
- errorCh <- err
- return
- }
- go func() { // schedule in the background to be able to quickly process more requests
- stats, err := e.executeAdminFn(stream.Context(), req.ResourceType, req.ResourceName, req.ResourceMesh, e.statsFn)
-
- resp := &mesh_proto.StatsResponse{
- RequestId: req.RequestId,
- }
- if len(stats) > 0 {
- resp.Result = &mesh_proto.StatsResponse_Stats{
- Stats: stats,
- }
- }
- if err != nil { // send the error to the client instead of terminating stream.
- resp.Result = &mesh_proto.StatsResponse_Error{
- Error: err.Error(),
- }
- }
- if err := stream.Send(resp); err != nil {
- errorCh <- err
- return
- }
- }()
- }
-}
-
-func (e *envoyAdminProcessor) StartProcessingClusters(stream mesh_proto.GlobalDDSService_StreamClustersClient, errorCh chan error) {
- for {
- req, err := stream.Recv()
- if err != nil {
- errorCh <- err
- return
- }
- go func() { // schedule in the background to be able to quickly process more requests
- clusters, err := e.executeAdminFn(stream.Context(), req.ResourceType, req.ResourceName, req.ResourceMesh, e.clustersFn)
-
- resp := &mesh_proto.ClustersResponse{
- RequestId: req.RequestId,
- }
- if len(clusters) > 0 {
- resp.Result = &mesh_proto.ClustersResponse_Clusters{
- Clusters: clusters,
- }
- }
- if err != nil { // send the error to the client instead of terminating stream.
- resp.Result = &mesh_proto.ClustersResponse_Error{
- Error: err.Error(),
- }
- }
- if err := stream.Send(resp); err != nil {
- errorCh <- err
- return
- }
- }()
- }
-}
-
-func (s *envoyAdminProcessor) executeAdminFn(
- ctx context.Context,
- resType string,
- resName string,
- resMesh string,
- adminFn EnvoyAdminFn,
-) ([]byte, error) {
- ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
- defer cancel()
-
- res, err := registry.Global().NewObject(core_model.ResourceType(resType))
- if err != nil {
- return nil, err
- }
- if err := s.resManager.Get(ctx, res, core_store.GetByKey(resName, resMesh)); err != nil {
- return nil, err
- }
-
- resWithAddr, ok := res.(core_model.ResourceWithAddress)
- if !ok {
- return nil, errors.Errorf("invalid type %T", resWithAddr)
- }
-
- return adminFn(ctx, resWithAddr)
-}
-
-var _ EnvoyAdminProcessor = &envoyAdminProcessor{}
-
-func NewEnvoyAdminProcessor(
- resManager core_manager.ReadOnlyResourceManager,
- configDumpFn EnvoyAdminFn,
- statsFn EnvoyAdminFn,
- clustersFn EnvoyAdminFn,
-) EnvoyAdminProcessor {
- return &envoyAdminProcessor{
- resManager: resManager,
- configDumpFn: configDumpFn,
- statsFn: statsFn,
- clustersFn: clustersFn,
- }
-}
diff --git a/pkg/dds/service/envoy_admin_rpcs.go b/pkg/dds/service/envoy_admin_rpcs.go
deleted file mode 100644
index a2a74ff..0000000
--- a/pkg/dds/service/envoy_admin_rpcs.go
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package service
-
-import (
- util_grpc "github.com/apache/dubbo-kubernetes/pkg/util/grpc"
-)
-
-const (
- ConfigDumpRPC = "XDS Config Dump"
- StatsRPC = "Stats"
- ClustersRPC = "Clusters"
-)
-
-type EnvoyAdminRPCs struct {
- XDSConfigDump util_grpc.ReverseUnaryRPCs
- Stats util_grpc.ReverseUnaryRPCs
- Clusters util_grpc.ReverseUnaryRPCs
-}
-
-func NewEnvoyAdminRPCs() EnvoyAdminRPCs {
- return EnvoyAdminRPCs{
- XDSConfigDump: util_grpc.NewReverseUnaryRPCs(),
- Stats: util_grpc.NewReverseUnaryRPCs(),
- Clusters: util_grpc.NewReverseUnaryRPCs(),
- }
-}
diff --git a/pkg/dds/service/server.go b/pkg/dds/service/server.go
index 92f6f7f..f960f51 100644
--- a/pkg/dds/service/server.go
+++ b/pkg/dds/service/server.go
@@ -20,21 +20,14 @@
import (
"context"
"fmt"
- "io"
- "math/rand"
"time"
)
import (
"github.com/pkg/errors"
- "github.com/sethvargo/go-retry"
-
- "golang.org/x/exp/slices"
-
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/durationpb"
@@ -49,11 +42,8 @@
"github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/system"
"github.com/apache/dubbo-kubernetes/pkg/core/resources/manager"
"github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
- core_store "github.com/apache/dubbo-kubernetes/pkg/core/resources/store"
- "github.com/apache/dubbo-kubernetes/pkg/dds"
"github.com/apache/dubbo-kubernetes/pkg/dds/util"
"github.com/apache/dubbo-kubernetes/pkg/events"
- util_grpc "github.com/apache/dubbo-kubernetes/pkg/util/grpc"
)
var log = core.Log.WithName("dds-service")
@@ -63,7 +53,6 @@
}
type GlobalDDSServiceServer struct {
- envoyAdminRPCs EnvoyAdminRPCs
resManager manager.ResourceManager
instanceID string
filters []StreamInterceptor
@@ -75,10 +64,17 @@
context context.Context
}
-func NewGlobalDDSServiceServer(ctx context.Context, envoyAdminRPCs EnvoyAdminRPCs, resManager manager.ResourceManager, instanceID string, filters []StreamInterceptor, extensions context.Context, upsertCfg config_store.UpsertConfig, eventBus events.EventBus, zoneHealthCheckInterval time.Duration) *GlobalDDSServiceServer {
+func NewGlobalDDSServiceServer(
+ ctx context.Context,
+ resManager manager.ResourceManager,
+ instanceID string, filters []StreamInterceptor,
+ extensions context.Context,
+ upsertCfg config_store.UpsertConfig,
+ eventBus events.EventBus,
+ zoneHealthCheckInterval time.Duration,
+) *GlobalDDSServiceServer {
return &GlobalDDSServiceServer{
context: ctx,
- envoyAdminRPCs: envoyAdminRPCs,
resManager: resManager,
instanceID: instanceID,
filters: filters,
@@ -89,24 +85,6 @@
}
}
-func (g *GlobalDDSServiceServer) StreamXDSConfigs(stream mesh_proto.GlobalDDSService_StreamXDSConfigsServer) error {
- return g.streamEnvoyAdminRPC(ConfigDumpRPC, g.envoyAdminRPCs.XDSConfigDump, stream, func() (util_grpc.ReverseUnaryMessage, error) {
- return stream.Recv()
- })
-}
-
-func (g *GlobalDDSServiceServer) StreamStats(stream mesh_proto.GlobalDDSService_StreamStatsServer) error {
- return g.streamEnvoyAdminRPC(StatsRPC, g.envoyAdminRPCs.Stats, stream, func() (util_grpc.ReverseUnaryMessage, error) {
- return stream.Recv()
- })
-}
-
-func (g *GlobalDDSServiceServer) StreamClusters(stream mesh_proto.GlobalDDSService_StreamClustersServer) error {
- return g.streamEnvoyAdminRPC(ClustersRPC, g.envoyAdminRPCs.Clusters, stream, func() (util_grpc.ReverseUnaryMessage, error) {
- return stream.Recv()
- })
-}
-
func (g *GlobalDDSServiceServer) HealthCheck(ctx context.Context, _ *mesh_proto.ZoneHealthCheckRequest) (*mesh_proto.ZoneHealthCheckResponse, error) {
zone, err := util.ClientIDFromIncomingCtx(ctx)
if err != nil {
@@ -135,93 +113,6 @@
}, nil
}
-func (g *GlobalDDSServiceServer) streamEnvoyAdminRPC(
- rpcName string,
- rpc util_grpc.ReverseUnaryRPCs,
- stream grpc.ServerStream,
- recv func() (util_grpc.ReverseUnaryMessage, error),
-) error {
- zone, err := util.ClientIDFromIncomingCtx(stream.Context())
- if err != nil {
- return status.Error(codes.InvalidArgument, err.Error())
- }
- zoneID := ZoneClientIDFromCtx(stream.Context(), zone)
-
- shouldDisconnectStream := events.NewNeverListener()
-
- md, _ := metadata.FromIncomingContext(stream.Context())
- features := md.Get(dds.FeaturesMetadataKey)
-
- if slices.Contains(features, dds.FeatureZonePingHealth) {
- shouldDisconnectStream = g.eventBus.Subscribe(func(e events.Event) bool {
- disconnectEvent, ok := e.(ZoneWentOffline)
- return ok && disconnectEvent.Zone == zone
- })
- g.eventBus.Send(ZoneOpenedStream{Zone: zone})
- }
-
- defer shouldDisconnectStream.Close()
-
- for _, filter := range g.filters {
- if err := filter.InterceptServerStream(stream); err != nil {
- switch status.Code(err) {
- case codes.InvalidArgument, codes.Unauthenticated, codes.PermissionDenied:
- log.Info("stream interceptor terminating the stream", "cause", err)
- default:
- log.Error(err, "stream interceptor terminating the stream")
- }
- return err
- }
- }
- log.Info("Envoy Admin RPC stream started")
- rpc.ClientConnected(zoneID.String(), stream)
- if err := g.storeStreamConnection(stream.Context(), zone, rpcName, g.instanceID); err != nil {
- if errors.Is(err, context.Canceled) {
- return status.Error(codes.Canceled, "stream was cancelled")
- }
- log.Error(err, "could not store stream connection")
- return status.Error(codes.Internal, "could not store stream connection")
- }
- log.Info("stored stream connection")
- streamResult := make(chan error, 1)
- go func() {
- for {
- resp, err := recv()
- if err == io.EOF {
- log.Info("stream stopped")
- streamResult <- nil
- return
- }
- if status.Code(err) == codes.Canceled {
- log.Info("stream cancelled")
- streamResult <- nil
- return
- }
- if err != nil {
- log.Error(err, "could not receive a message")
- streamResult <- status.Error(codes.Internal, "could not receive a message")
- return
- }
- log.V(1).Info("Envoy Admin RPC response received", "requestId", resp.GetRequestId())
- if err := rpc.ResponseReceived(zoneID.String(), resp); err != nil {
- log.Error(err, "could not mark the response as received")
- streamResult <- status.Error(codes.InvalidArgument, "could not mark the response as received")
- return
- }
- }
- }()
- select {
- case <-g.context.Done():
- log.Info("app context done")
- return status.Error(codes.Unavailable, "stream unavailable")
- case <-shouldDisconnectStream.Recv():
- log.Info("ending stream, zone health check failed")
- return status.Error(codes.Canceled, "stream canceled")
- case res := <-streamResult:
- return res
- }
-}
-
type ZoneWentOffline struct {
Zone string
}
@@ -230,45 +121,6 @@
Zone string
}
-func (g *GlobalDDSServiceServer) storeStreamConnection(ctx context.Context, zone string, rpcName string, instance string) error {
- key := model.ResourceKey{Name: zone}
-
- // wait for Zone to be created, only then we can create Zone Insight
- err := retry.Do(
- ctx,
- retry.WithMaxRetries(30, retry.NewConstant(1*time.Second)),
- func(ctx context.Context) error {
- return retry.RetryableError(g.resManager.Get(ctx, system.NewZoneResource(), core_store.GetBy(key)))
- },
- )
- if err != nil {
- return err
- }
-
- // Add delay for Upsert. If Global CP is behind an HTTP load balancer,
- // it might be the case that each Envoy Admin stream will land on separate instance.
- // In this case, all instances will try to update Zone Insight which will result in conflicts.
- // Since it's unusual to immediately execute envoy admin rpcs after zone is connected, 0-10s delay should be fine.
- // #nosec G404 - math rand is enough
- time.Sleep(time.Duration(rand.Int31n(10000)) * time.Millisecond)
-
- zoneInsight := system.NewZoneInsightResource()
- return manager.Upsert(ctx, g.resManager, key, zoneInsight, func(resource model.Resource) error {
- if zoneInsight.Spec.EnvoyAdminStreams == nil {
- zoneInsight.Spec.EnvoyAdminStreams = &system_proto.EnvoyAdminStreams{}
- }
- switch rpcName {
- case ConfigDumpRPC:
- zoneInsight.Spec.EnvoyAdminStreams.ConfigDumpGlobalInstanceId = instance
- case StatsRPC:
- zoneInsight.Spec.EnvoyAdminStreams.StatsGlobalInstanceId = instance
- case ClustersRPC:
- zoneInsight.Spec.EnvoyAdminStreams.ClustersGlobalInstanceId = instance
- }
- return nil
- }, manager.WithConflictRetry(g.upsertCfg.ConflictRetryBaseBackoff.Duration, g.upsertCfg.ConflictRetryMaxTimes, g.upsertCfg.ConflictRetryJitterPercent)) // we need retry because zone sink or other RPC may also update the insight.
-}
-
type ZoneClientID struct {
Zone string
}
diff --git a/pkg/dds/store/sync.go b/pkg/dds/store/sync.go
index 8abe6e2..ae1a2ea 100644
--- a/pkg/dds/store/sync.go
+++ b/pkg/dds/store/sync.go
@@ -305,11 +305,6 @@
return syncer.Sync(ctx, upstream, PrefilterBy(func(r core_model.Resource) bool {
if zi, ok := r.(*core_mesh.ZoneIngressResource); ok {
- // Old zones don't have a 'kuma.io/zone' label on ZoneIngress, when upgrading to the new 2.6 version
- // we don't want Zone CP to sync ZoneIngresses without 'kuma.io/zone' label to Global pretending
- // they're originating here. That's why upgrade from 2.5 to 2.6 (and 2.7) requires casting resource
- // to *core_mesh.ZoneIngressResource and checking its 'spec.zone' field.
- // todo: remove in 2 releases after 2.6.x
return zi.IsRemoteIngress(localZone)
}
@@ -318,6 +313,10 @@
return m.IsRemoteMapping(localZone)
}
+ if m, ok := r.(*core_mesh.MetaDataResource); ok {
+ return m.IsRemotingMetadata(localZone)
+ }
+
return !core_model.IsLocallyOriginated(config_core.Zone, r) || !isExpectedOnZoneCP(r.Descriptor())
}))
},
@@ -374,6 +373,10 @@
for _, m := range upstream.AddedResources.(*core_mesh.MappingResourceList).Items {
m.Spec.Zone = upstream.ControlPlaneId
}
+ case core_mesh.MetaDataType:
+ for _, m := range upstream.AddedResources.(*core_mesh.MetaDataResourceList).Items {
+ m.Spec.Zone = upstream.ControlPlaneId
+ }
}
return syncer.Sync(ctx, upstream, PrefilterBy(func(r model.Resource) bool {
diff --git a/pkg/dds/util/resource_test.go b/pkg/dds/util/resource_test.go
index 1b0004f..30e31e4 100644
--- a/pkg/dds/util/resource_test.go
+++ b/pkg/dds/util/resource_test.go
@@ -61,7 +61,7 @@
},
Entry(nil, testCase{name: "foo", suffix: "bar"}),
Entry(nil, testCase{name: "bar", suffix: "baz"}),
- Entry(nil, testCase{name: "baz", suffix: "kuma-system"}),
- Entry(nil, testCase{name: "faz", suffix: "daz.kuma-system"}),
+ Entry(nil, testCase{name: "baz", suffix: "dubbo-system"}),
+ Entry(nil, testCase{name: "faz", suffix: "daz.dubbo-system"}),
)
})
diff --git a/pkg/dds/zone/components.go b/pkg/dds/zone/components.go
index c52b8f0..0f4ff61 100644
--- a/pkg/dds/zone/components.go
+++ b/pkg/dds/zone/components.go
@@ -33,7 +33,6 @@
dds_client "github.com/apache/dubbo-kubernetes/pkg/dds/client"
"github.com/apache/dubbo-kubernetes/pkg/dds/mux"
dds_server "github.com/apache/dubbo-kubernetes/pkg/dds/server"
- "github.com/apache/dubbo-kubernetes/pkg/dds/service"
dds_sync_store "github.com/apache/dubbo-kubernetes/pkg/dds/store"
resources_k8s "github.com/apache/dubbo-kubernetes/pkg/plugins/resources/k8s"
)
@@ -76,7 +75,7 @@
}
onGlobalToZoneSyncStarted := mux.OnGlobalToZoneSyncStartedFunc(func(stream mesh_proto.DDSSyncService_GlobalToZoneSyncClient, errChan chan error) {
- log := ddsDeltaZoneLog.WithValues("kds-version", "v2")
+ log := ddsDeltaZoneLog.WithValues("dds-version", "v2")
syncClient := dds_client.NewDDSSyncClient(
log,
reg.ObjectTypes(model.HasDDSFlag(model.GlobalToZoneSelector)),
@@ -102,7 +101,7 @@
})
onZoneToGlobalSyncStarted := mux.OnZoneToGlobalSyncStartedFunc(func(stream mesh_proto.DDSSyncService_ZoneToGlobalSyncClient, errChan chan error) {
- log := ddsDeltaZoneLog.WithValues("kds-version", "v2", "peer-id", "global")
+ log := ddsDeltaZoneLog.WithValues("dds-version", "v2", "peer-id", "global")
log.Info("ZoneToGlobalSync new session created")
session := dds_server.NewServerStream(stream)
go func() {
@@ -121,12 +120,6 @@
onGlobalToZoneSyncStarted,
onZoneToGlobalSyncStarted,
*rt.Config().Multizone.Zone.DDS,
- service.NewEnvoyAdminProcessor(
- rt.ReadOnlyResourceManager(),
- rt.EnvoyAdminClient().ConfigDump,
- rt.EnvoyAdminClient().Stats,
- rt.EnvoyAdminClient().Clusters,
- ),
)
- return rt.Add(component.NewResilientComponent(ddsDeltaZoneLog.WithName("kds-mux-client"), muxClient))
+ return rt.Add(component.NewResilientComponent(ddsDeltaZoneLog.WithName("dds-mux-client"), muxClient))
}
diff --git a/pkg/dp-server/server/server.go b/pkg/dp-server/server/server.go
index 6d39626..ad269c0 100644
--- a/pkg/dp-server/server/server.go
+++ b/pkg/dp-server/server/server.go
@@ -18,21 +18,15 @@
package server
import (
- "context"
- "crypto/tls"
"fmt"
+ "github.com/apache/dubbo-kubernetes/pkg/core/logger"
+ "google.golang.org/grpc/reflection"
+ "net"
"net/http"
- "strings"
"time"
)
import (
- "github.com/bakito/go-log-logr-adapter/adapter"
-
- http_prometheus "github.com/slok/go-http-metrics/metrics/prometheus"
- "github.com/slok/go-http-metrics/middleware"
- "github.com/slok/go-http-metrics/middleware/std"
-
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)
@@ -53,11 +47,9 @@
type Filter func(writer http.ResponseWriter, request *http.Request) bool
type DpServer struct {
- config dp_server.DpServerConfig
- httpMux *http.ServeMux
- grpcServer *grpc.Server
- filter Filter
- promMiddleware middleware.Middleware
+ config dp_server.DpServerConfig
+ PlainServer *grpc.Server
+ httpMux *http.ServeMux
}
var _ component.Component = &DpServer{}
@@ -74,52 +66,40 @@
PermitWithoutStream: true,
}),
}
- grpcServer := grpc.NewServer(grpcOptions...)
- promMiddleware := middleware.New(middleware.Config{
- Recorder: http_prometheus.NewRecorder(http_prometheus.Config{
- Prefix: "dp_server",
- }),
- })
-
- return &DpServer{
- config: config,
- httpMux: http.NewServeMux(),
- grpcServer: grpcServer,
- filter: filter,
- promMiddleware: promMiddleware,
+ srv := &DpServer{
+ config: config,
+ httpMux: http.NewServeMux(),
}
+ srv.PlainServer = grpc.NewServer(grpcOptions...)
+ reflection.Register(srv.PlainServer)
+
+ return srv
}
func (d *DpServer) Start(stop <-chan struct{}) error {
- tlsConfig := &tls.Config{MinVersion: tls.VersionTLS12} // To make gosec pass this is always set after
- server := &http.Server{
- Addr: fmt.Sprintf(":%d", d.config.Port),
- Handler: http.HandlerFunc(d.handle),
- TLSConfig: tlsConfig,
- ErrorLog: adapter.ToStd(log),
+ plainLis, err := net.Listen("tcp", fmt.Sprintf(":%d", d.config.Port))
+ if err != nil {
+ return err
}
-
- errChan := make(chan error)
+ plainErrChan := make(chan error)
go func() {
- defer close(errChan)
- if err := server.ListenAndServe(); err != nil {
- if err != http.ErrServerClosed {
- log.Error(err, "terminated with an error")
- errChan <- err
- return
- }
+ defer close(plainErrChan)
+ if err = d.PlainServer.Serve(plainLis); err != nil {
+ logger.Sugar().Error(err, "[cp-server] terminated with an error")
+ plainErrChan <- err
+ } else {
+ logger.Sugar().Info("[cp-server] terminated normally")
}
- log.Info("terminated normally")
}()
- log.Info("starting", "interface", "0.0.0.0", "port", d.config.Port, "tls", true)
-
select {
case <-stop:
log.Info("stopping")
- return server.Shutdown(context.Background())
- case err := <-errChan:
+ logger.Sugar().Info("[cp-server] stopping gracefully")
+ d.PlainServer.GracefulStop()
+ return nil
+ case err := <-plainErrChan:
return err
}
}
@@ -128,28 +108,10 @@
return false
}
-func (d *DpServer) handle(writer http.ResponseWriter, request *http.Request) {
- if !d.filter(writer, request) {
- return
- }
- // add filter function that will be in runtime, and we will implement it in kong-mesh
- if request.ProtoMajor == 2 && strings.Contains(request.Header.Get("Content-Type"), "application/grpc") {
- d.grpcServer.ServeHTTP(writer, request)
- } else {
- // we only want to measure HTTP not GRPC requests because they can mess up metrics
- // for example ADS bi-directional stream counts as one really long request
- std.Handler("", d.promMiddleware, d.httpMux).ServeHTTP(writer, request)
- }
-}
-
func (d *DpServer) HTTPMux() *http.ServeMux {
return d.httpMux
}
func (d *DpServer) GrpcServer() *grpc.Server {
- return d.grpcServer
-}
-
-func (d *DpServer) SetFilter(filter Filter) {
- d.filter = filter
+ return d.PlainServer
}
diff --git a/pkg/dubbo/components.go b/pkg/dubbo/components.go
index 0fc70f9..7d39d16 100644
--- a/pkg/dubbo/components.go
+++ b/pkg/dubbo/components.go
@@ -67,6 +67,7 @@
dubboPusher,
rt.ResourceManager(),
rt.Transactions(),
+ rt.Config().Multizone.Zone.Name,
)
mesh_proto.RegisterMetadataServiceServer(rt.DpServer().GrpcServer(), metadata)
return rt.Add(dubboPusher, serviceMapping, metadata)
diff --git a/pkg/dubbo/metadata/server.go b/pkg/dubbo/metadata/server.go
index c0ef20e..60a8b4f 100644
--- a/pkg/dubbo/metadata/server.go
+++ b/pkg/dubbo/metadata/server.go
@@ -19,7 +19,6 @@
import (
"context"
- "github.com/apache/dubbo-kubernetes/pkg/util/rmkey"
"io"
"strings"
"time"
@@ -45,6 +44,7 @@
core_store "github.com/apache/dubbo-kubernetes/pkg/core/resources/store"
"github.com/apache/dubbo-kubernetes/pkg/dubbo/client"
"github.com/apache/dubbo-kubernetes/pkg/dubbo/pusher"
+ "github.com/apache/dubbo-kubernetes/pkg/util/rmkey"
)
var log = core.Log.WithName("dubbo").WithName("server").WithName("metadata")
@@ -54,9 +54,10 @@
type MetadataServer struct {
mesh_proto.MetadataServiceServer
- config dubbo.DubboConfig
- queue chan *RegisterRequest
- pusher pusher.Pusher
+ localZone string
+ config dubbo.DubboConfig
+ queue chan *RegisterRequest
+ pusher pusher.Pusher
ctx context.Context
resourceManager manager.ResourceManager
@@ -80,6 +81,7 @@
pusher pusher.Pusher,
resourceManager manager.ResourceManager,
transactions core_store.Transactions,
+ localZone string,
) *MetadataServer {
return &MetadataServer{
config: config,
@@ -88,6 +90,7 @@
ctx: ctx,
resourceManager: resourceManager,
transactions: transactions,
+ localZone: localZone,
}
}
@@ -333,7 +336,6 @@
func (m *MetadataServer) tryRegister(key core_model.ResourceReq, newMetadata *mesh_proto.MetaData) error {
err := core_store.InTx(m.ctx, m.transactions, func(ctx context.Context) error {
-
// get Metadata Resource first,
// if Metadata is not found, create it,
// else update it.
@@ -350,6 +352,7 @@
if core_store.IsResourceNotFound(err) {
// create if not found
metadata.Spec = newMetadata
+ metadata.Spec.Zone = m.localZone
err = m.resourceManager.Create(m.ctx, metadata, core_store.CreateBy(core_model.ResourceKey{
Mesh: key.Mesh,
Name: key.Name,
diff --git a/pkg/dubbo/servicemapping/server.go b/pkg/dubbo/servicemapping/server.go
index a22f862..22aa31f 100644
--- a/pkg/dubbo/servicemapping/server.go
+++ b/pkg/dubbo/servicemapping/server.go
@@ -19,7 +19,6 @@
import (
"context"
- "github.com/apache/dubbo-kubernetes/pkg/util/rmkey"
"io"
"time"
)
@@ -45,6 +44,7 @@
"github.com/apache/dubbo-kubernetes/pkg/core/runtime/component"
"github.com/apache/dubbo-kubernetes/pkg/dubbo/client"
"github.com/apache/dubbo-kubernetes/pkg/dubbo/pusher"
+ "github.com/apache/dubbo-kubernetes/pkg/util/rmkey"
)
var log = core.Log.WithName("dubbo").WithName("server").WithName("service-name-mapping")
diff --git a/pkg/hds/server/server.go b/pkg/hds/server/server.go
index c4a507c..b997d93 100644
--- a/pkg/hds/server/server.go
+++ b/pkg/hds/server/server.go
@@ -36,7 +36,6 @@
)
import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
hds_cache "github.com/apache/dubbo-kubernetes/pkg/hds/cache"
hds_callbacks "github.com/apache/dubbo-kubernetes/pkg/hds/callbacks"
util_proto "github.com/apache/dubbo-kubernetes/pkg/util/proto"
@@ -54,7 +53,6 @@
ctx context.Context
callbacks hds_callbacks.Callbacks
cache envoy_cache.Cache
- mesh_proto.UnimplementedMultiplexServiceServer
}
func New(ctx context.Context, config envoy_cache.Cache, callbacks hds_callbacks.Callbacks) envoy_service_health.HealthDiscoveryServiceServer {
diff --git a/pkg/intercp/catalog/catalog.go b/pkg/intercp/catalog/catalog.go
deleted file mode 100644
index 6d91fc7..0000000
--- a/pkg/intercp/catalog/catalog.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package catalog
-
-import (
- "context"
- "fmt"
- "net"
- "strconv"
-)
-
-import (
- "github.com/pkg/errors"
-)
-
-type Instance struct {
- Id string `json:"id"`
- Address string `json:"address"`
- InterCpPort uint16 `json:"interCpPort"`
- Leader bool `json:"leader"`
-}
-
-func (i Instance) InterCpURL() string {
- return fmt.Sprintf("grpcs://%s", net.JoinHostPort(i.Address, strconv.Itoa(int(i.InterCpPort))))
-}
-
-type Reader interface {
- Instances(context.Context) ([]Instance, error)
-}
-
-type Catalog interface {
- Reader
- Replace(context.Context, []Instance) (bool, error)
- ReplaceLeader(context.Context, Instance) error
-}
-
-var (
- ErrNoLeader = errors.New("leader not found")
- ErrInstanceNotFound = errors.New("instance not found")
-)
-
-func Leader(ctx context.Context, catalog Catalog) (Instance, error) {
- instances, err := catalog.Instances(ctx)
- if err != nil {
- return Instance{}, err
- }
- for _, instance := range instances {
- if instance.Leader {
- return instance, nil
- }
- }
- return Instance{}, ErrNoLeader
-}
-
-func InstanceOfID(ctx context.Context, catalog Catalog, id string) (Instance, error) {
- instances, err := catalog.Instances(ctx)
- if err != nil {
- return Instance{}, err
- }
- for _, instance := range instances {
- if instance.Id == id {
- return instance, nil
- }
- }
- return Instance{}, ErrInstanceNotFound
-}
-
-type InstancesByID []Instance
-
-func (a InstancesByID) Len() int { return len(a) }
-func (a InstancesByID) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a InstancesByID) Less(i, j int) bool {
- return a[i].Id < a[j].Id
-}
diff --git a/pkg/intercp/catalog/config_catalog.go b/pkg/intercp/catalog/config_catalog.go
deleted file mode 100644
index dd5f218..0000000
--- a/pkg/intercp/catalog/config_catalog.go
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package catalog
-
-import (
- "context"
- "encoding/json"
- "sort"
-)
-
-import (
- system_proto "github.com/apache/dubbo-kubernetes/api/system/v1alpha1"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/system"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/manager"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/store"
-)
-
-type ConfigInstances struct {
- Instances []Instance `json:"instances"`
-}
-
-var CatalogKey = model.ResourceKey{
- Name: "cp-catalog",
-}
-
-type ConfigCatalog struct {
- resManager manager.ResourceManager
- ConfigCatalogReader
-}
-
-var _ Catalog = &ConfigCatalog{}
-
-func NewConfigCatalog(resManager manager.ResourceManager) Catalog {
- return &ConfigCatalog{
- resManager: resManager,
- ConfigCatalogReader: ConfigCatalogReader{
- resManager: resManager,
- },
- }
-}
-
-func (c *ConfigCatalog) Replace(ctx context.Context, instances []Instance) (bool, error) {
- sort.Stable(InstancesByID(instances))
- bytes, err := json.Marshal(ConfigInstances{
- Instances: instances,
- })
- if err != nil {
- return false, nil
- }
- newConfig := string(bytes)
- var updated bool
- err = manager.Upsert(ctx, c.resManager, CatalogKey, system.NewConfigResource(), func(resource model.Resource) error {
- if resource.(*system.ConfigResource).Spec.GetConfig() != newConfig {
- resource.(*system.ConfigResource).Spec = &system_proto.Config{
- Config: newConfig,
- }
- updated = true
- }
- return nil
- })
- return updated, err
-}
-
-func (c *ConfigCatalog) ReplaceLeader(ctx context.Context, leader Instance) error {
- return manager.Upsert(ctx, c.resManager, CatalogKey, system.NewConfigResource(), func(resource model.Resource) error {
- instances := &ConfigInstances{}
- if cfg := resource.(*system.ConfigResource).Spec.GetConfig(); cfg != "" {
- if err := json.Unmarshal([]byte(cfg), instances); err != nil {
- return err
- }
- }
- leaderFound := false
- for i, instance := range instances.Instances {
- instance.Leader = false
- if instance.Id == leader.Id {
- instance.Leader = true
- leaderFound = true
- }
- instances.Instances[i] = instance
- }
- if !leaderFound {
- instances.Instances = append(instances.Instances, leader)
- sort.Stable(InstancesByID(instances.Instances))
- }
- bytes, err := json.Marshal(instances)
- if err != nil {
- return err
- }
- resource.(*system.ConfigResource).Spec = &system_proto.Config{
- Config: string(bytes),
- }
- return nil
- })
-}
-
-type ConfigCatalogReader struct {
- resManager manager.ReadOnlyResourceManager
-}
-
-var _ Reader = &ConfigCatalogReader{}
-
-func NewConfigCatalogReader(resManager manager.ReadOnlyResourceManager) Reader {
- return &ConfigCatalogReader{
- resManager: resManager,
- }
-}
-
-func (c *ConfigCatalogReader) Instances(ctx context.Context) ([]Instance, error) {
- cfg := system.NewConfigResource()
- if err := c.resManager.Get(ctx, cfg, store.GetBy(CatalogKey)); err != nil {
- if store.IsResourceNotFound(err) {
- return []Instance{}, nil
- }
- return nil, err
- }
- var instances ConfigInstances
- if err := json.Unmarshal([]byte(cfg.Spec.Config), &instances); err != nil {
- return nil, err
- }
- return instances.Instances, nil
-}
diff --git a/pkg/intercp/catalog/heartbeat_component.go b/pkg/intercp/catalog/heartbeat_component.go
deleted file mode 100644
index b36c2f4..0000000
--- a/pkg/intercp/catalog/heartbeat_component.go
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package catalog
-
-import (
- "context"
- "time"
-)
-
-import (
- "github.com/pkg/errors"
-)
-
-import (
- system_proto "github.com/apache/dubbo-kubernetes/api/system/v1alpha1"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/runtime/component"
-)
-
-var heartbeatLog = core.Log.WithName("intercp").WithName("catalog").WithName("heartbeat")
-
-type heartbeatComponent struct {
- catalog Catalog
- getClientFn GetClientFn
- request *system_proto.PingRequest
- interval time.Duration
-
- leader *Instance
-}
-
-var _ component.Component = &heartbeatComponent{}
-
-type GetClientFn = func(url string) (system_proto.InterCpPingServiceClient, error)
-
-func NewHeartbeatComponent(
- catalog Catalog,
- instance Instance,
- interval time.Duration,
- newClientFn GetClientFn,
-) (component.Component, error) {
- return &heartbeatComponent{
- catalog: catalog,
- request: &system_proto.PingRequest{
- InstanceId: instance.Id,
- Address: instance.Address,
- InterCpPort: uint32(instance.InterCpPort),
- },
- getClientFn: newClientFn,
- interval: interval,
- }, nil
-}
-
-func (h *heartbeatComponent) Start(stop <-chan struct{}) error {
- heartbeatLog.Info("starting heartbeats to a leader")
- ticker := time.NewTicker(h.interval)
- ctx := context.Background()
-
- for {
- select {
- case <-ticker.C:
- if !h.heartbeat(ctx, true) {
- continue
- }
- case <-stop:
- // send final heartbeat to gracefully signal that the instance is going down
- _ = h.heartbeat(ctx, false)
- return nil
- }
- }
-}
-
-func (h *heartbeatComponent) heartbeat(ctx context.Context, ready bool) bool {
- heartbeatLog := heartbeatLog.WithValues(
- "instanceId", h.request.InstanceId,
- "ready", ready,
- )
- if h.leader == nil {
- if err := h.connectToLeader(ctx); err != nil {
- heartbeatLog.Error(err, "could not connect to leader")
- return false
- }
- }
- if h.leader.Id == h.request.InstanceId {
- heartbeatLog.V(1).Info("this instance is a leader. No need to send a heartbeat.")
- return true
- }
- heartbeatLog = heartbeatLog.WithValues(
- "leaderAddress", h.leader.Address,
- )
- heartbeatLog.V(1).Info("sending a heartbeat to a leader")
- h.request.Ready = ready
- client, err := h.getClientFn(h.leader.InterCpURL())
- if err != nil {
- heartbeatLog.Error(err, "could not get or create a client to a leader")
- h.leader = nil
- return false
- }
- resp, err := client.Ping(ctx, h.request)
- if err != nil {
- heartbeatLog.Error(err, "could not send a heartbeat to a leader")
- h.leader = nil
- return false
- }
- if !resp.Leader {
- heartbeatLog.V(1).Info("instance responded that it is no longer a leader")
- h.leader = nil
- }
- return true
-}
-
-func (h *heartbeatComponent) connectToLeader(ctx context.Context) error {
- newLeader, err := Leader(ctx, h.catalog)
- if err != nil {
- return err
- }
- h.leader = &newLeader
- if h.leader.Id == h.request.InstanceId {
- return nil
- }
- heartbeatLog.Info("leader has changed. Creating connection to the new leader.",
- "previousLeaderAddress", h.leader.Address,
- "newLeaderAddress", newLeader.Leader,
- )
- _, err = h.getClientFn(h.leader.InterCpURL())
- if err != nil {
- return errors.Wrap(err, "could not create a client to a leader")
- }
- return nil
-}
-
-func (h *heartbeatComponent) NeedLeaderElection() bool {
- return false
-}
diff --git a/pkg/intercp/catalog/heartbeats.go b/pkg/intercp/catalog/heartbeats.go
deleted file mode 100644
index df65376..0000000
--- a/pkg/intercp/catalog/heartbeats.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package catalog
-
-import (
- "sync"
-)
-
-type Heartbeats struct {
- instances map[Instance]struct{}
- sync.Mutex
-}
-
-func NewHeartbeats() *Heartbeats {
- return &Heartbeats{
- instances: map[Instance]struct{}{},
- }
-}
-
-func (h *Heartbeats) ResetAndCollect() []Instance {
- h.Lock()
- currentInstances := h.instances
- h.instances = map[Instance]struct{}{}
- h.Unlock()
- var instances []Instance
- for k := range currentInstances {
- instances = append(instances, k)
- }
- return instances
-}
-
-func (h *Heartbeats) Add(instance Instance) {
- h.Lock()
- h.instances[instance] = struct{}{}
- h.Unlock()
-}
-
-func (h *Heartbeats) Remove(instance Instance) {
- h.Lock()
- delete(h.instances, instance)
- h.Unlock()
-}
diff --git a/pkg/intercp/catalog/server.go b/pkg/intercp/catalog/server.go
deleted file mode 100644
index db76ddc..0000000
--- a/pkg/intercp/catalog/server.go
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package catalog
-
-import (
- "context"
-)
-
-import (
- system_proto "github.com/apache/dubbo-kubernetes/api/system/v1alpha1"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/runtime/component"
-)
-
-var serverLog = core.Log.WithName("intercp").WithName("catalog").WithName("server")
-
-type server struct {
- heartbeats *Heartbeats
- leaderInfo component.LeaderInfo
-
- system_proto.UnimplementedInterCpPingServiceServer
-}
-
-var _ system_proto.InterCpPingServiceServer = &server{}
-
-func NewServer(heartbeats *Heartbeats, leaderInfo component.LeaderInfo) system_proto.InterCpPingServiceServer {
- return &server{
- heartbeats: heartbeats,
- leaderInfo: leaderInfo,
- }
-}
-
-func (s *server) Ping(_ context.Context, request *system_proto.PingRequest) (*system_proto.PingResponse, error) {
- serverLog.V(1).Info("received ping", "instanceID", request.InstanceId, "address", request.Address, "ready", request.Ready)
- instance := Instance{
- Id: request.InstanceId,
- Address: request.Address,
- InterCpPort: uint16(request.InterCpPort),
- Leader: false,
- }
- if request.Ready {
- s.heartbeats.Add(instance)
- } else {
- s.heartbeats.Remove(instance)
- }
- return &system_proto.PingResponse{
- Leader: s.leaderInfo.IsLeader(),
- }, nil
-}
diff --git a/pkg/intercp/catalog/writer.go b/pkg/intercp/catalog/writer.go
deleted file mode 100644
index 4861b83..0000000
--- a/pkg/intercp/catalog/writer.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package catalog
-
-import (
- "context"
- "time"
-)
-
-import (
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/runtime/component"
-)
-
-var writerLog = core.Log.WithName("intercp").WithName("catalog").WithName("writer")
-
-type catalogWriter struct {
- catalog Catalog
- heartbeats *Heartbeats
- instance Instance
- interval time.Duration
-}
-
-var _ component.Component = &catalogWriter{}
-
-func NewWriter(
- catalog Catalog,
- heartbeats *Heartbeats,
- instance Instance,
- interval time.Duration,
-) (component.Component, error) {
- leaderInstance := instance
- leaderInstance.Leader = true
- return &catalogWriter{
- catalog: catalog,
- heartbeats: heartbeats,
- instance: leaderInstance,
- interval: interval,
- }, nil
-}
-
-func (r *catalogWriter) Start(stop <-chan struct{}) error {
- heartbeatLog.Info("starting catalog writer")
- ctx := context.Background()
- writerLog.Info("replacing a leader in the catalog")
- if err := r.catalog.ReplaceLeader(ctx, r.instance); err != nil {
- writerLog.Error(err, "could not replace leader") // continue, it will be replaced in ticker anyways
- }
- ticker := time.NewTicker(r.interval)
- for {
- select {
- case <-ticker.C:
- instances := r.heartbeats.ResetAndCollect()
- instances = append(instances, r.instance)
- updated, err := r.catalog.Replace(ctx, instances)
- if err != nil {
- writerLog.Error(err, "could not update catalog")
- continue
- }
- if updated {
- writerLog.Info("instances catalog updated", "instances", instances)
- } else {
- writerLog.V(1).Info("no need to update instances, because the catalog is the same", "instances", instances)
- }
- case <-stop:
- return nil
- }
- }
-}
-
-func (r *catalogWriter) NeedLeaderElection() bool {
- return true
-}
diff --git a/pkg/intercp/client/client.go b/pkg/intercp/client/client.go
deleted file mode 100644
index 7f3cbf5..0000000
--- a/pkg/intercp/client/client.go
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package client
-
-import (
- "crypto/tls"
- "crypto/x509"
- "io"
- "net/url"
-)
-
-import (
- "github.com/pkg/errors"
-
- "google.golang.org/grpc"
- "google.golang.org/grpc/connectivity"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/credentials/insecure"
-)
-
-type TLSConfig struct {
- CaCert x509.Certificate
- ClientCert tls.Certificate
-}
-
-type Conn interface {
- grpc.ClientConnInterface
- io.Closer
- GetState() connectivity.State
-}
-
-func New(serverURL string, tlsCfg *TLSConfig) (Conn, error) {
- url, err := url.Parse(serverURL)
- if err != nil {
- return nil, err
- }
- var dialOpts []grpc.DialOption
- switch url.Scheme {
- case "grpc": // not used in production
- dialOpts = append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
- case "grpcs":
- tlsConfig := &tls.Config{MinVersion: tls.VersionTLS12}
- if tlsCfg != nil {
- cp := x509.NewCertPool()
- cp.AddCert(&tlsCfg.CaCert)
- tlsConfig.RootCAs = cp
- tlsConfig.Certificates = []tls.Certificate{tlsCfg.ClientCert}
- } else {
- tlsConfig.InsecureSkipVerify = true
- }
- dialOpts = append(dialOpts, grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)))
- default:
- return nil, errors.Errorf("unsupported scheme %q. Use one of %s", url.Scheme, []string{"grpc", "grpcs"})
- }
- return grpc.Dial(url.Host, dialOpts...)
-}
diff --git a/pkg/intercp/client/pool.go b/pkg/intercp/client/pool.go
deleted file mode 100644
index ed4486f..0000000
--- a/pkg/intercp/client/pool.go
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package client
-
-import (
- "context"
- "sync"
- "time"
-)
-
-import (
- "github.com/pkg/errors"
-
- "google.golang.org/grpc/connectivity"
-)
-
-import (
- "github.com/apache/dubbo-kubernetes/pkg/core"
-)
-
-var poolLog = core.Log.WithName("intercp").WithName("client").WithName("pool")
-
-type accessedConn struct {
- conn Conn
- url string
- lastAccessTime time.Time
-}
-
-// Pool keeps the list of clients to inter-cp servers.
-// Because the list of inter-cp servers changes in runtime, we need to properly manage the connections to them (initialize, share, close etc.)
-// Pool helps us to not reimplement this for every inter-cp service (catalog, envoyadmin, etc.)
-type Pool struct {
- newConn func(string, *TLSConfig) (Conn, error)
- idleDeadline time.Duration // the time after which we close the connection if it was not fetched from the pool
- now func() time.Time
- connections map[string]*accessedConn
- mut sync.Mutex
-
- tlsCfg *TLSConfig
-}
-
-var TLSNotConfigured = errors.New("tls config is not yet set")
-
-func NewPool(
- newConn func(string, *TLSConfig) (Conn, error),
- idleDeadline time.Duration,
- now func() time.Time,
-) *Pool {
- return &Pool{
- newConn: newConn,
- idleDeadline: idleDeadline,
- now: now,
- connections: map[string]*accessedConn{},
- mut: sync.Mutex{},
- }
-}
-
-func (c *Pool) Client(serverURL string) (Conn, error) {
- c.mut.Lock()
- defer c.mut.Unlock()
- if c.tlsCfg == nil {
- return nil, TLSNotConfigured
- }
- ac, ok := c.connections[serverURL]
- createNewConnection := !ok
- if ok && ac.conn.GetState() == connectivity.TransientFailure {
- createNewConnection = true
- poolLog.Info("closing broken connection", "url", serverURL)
- if err := ac.conn.Close(); err != nil {
- poolLog.Error(err, "cannot close the connection", "url", serverURL)
- }
- }
- if createNewConnection {
- poolLog.Info("creating new connection", "url", serverURL)
- conn, err := c.newConn(serverURL, c.tlsCfg)
- if err != nil {
- return nil, err
- }
- ac = &accessedConn{
- conn: conn,
- url: serverURL,
- }
- }
- ac.lastAccessTime = c.now()
- c.connections[serverURL] = ac
- return ac.conn, nil
-}
-
-// SetTLSConfig can configure TLS in runtime.
-// Because CA of the inter-cp server is managed by the CP in the runtime we cannot configure it when we create the pool.
-func (c *Pool) SetTLSConfig(tlsCfg *TLSConfig) {
- c.mut.Lock()
- c.tlsCfg = tlsCfg
- c.mut.Unlock()
-}
-
-func (c *Pool) StartCleanup(ctx context.Context, ticker *time.Ticker) {
- for {
- select {
- case now := <-ticker.C:
- c.cleanup(now)
- case <-ctx.Done():
- return
- }
- }
-}
-
-func (c *Pool) cleanup(now time.Time) {
- c.mut.Lock()
- defer c.mut.Unlock()
- for url, accessedConn := range c.connections {
- if now.Sub(accessedConn.lastAccessTime) > c.idleDeadline {
- poolLog.Info("closing connection due to lack of activity", "url", accessedConn.url)
- if err := accessedConn.conn.Close(); err != nil {
- poolLog.Error(err, "cannot close the connection", "url", accessedConn.url)
- }
- delete(c.connections, url)
- }
- }
-}
diff --git a/pkg/intercp/components.go b/pkg/intercp/components.go
deleted file mode 100644
index 4d55ec9..0000000
--- a/pkg/intercp/components.go
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package intercp
-
-import (
- "time"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/runtime"
- "github.com/apache/dubbo-kubernetes/pkg/intercp/client"
- "github.com/apache/dubbo-kubernetes/pkg/intercp/envoyadmin"
-)
-
-var log = core.Log.WithName("inter-cp")
-
-func Setup(rt runtime.Runtime) error {
- return nil
-}
-
-func DefaultClientPool() *client.Pool {
- return client.NewPool(client.New, 5*time.Minute, core.Now)
-}
-
-func PooledEnvoyAdminClientFn(pool *client.Pool) envoyadmin.NewClientFn {
- return func(url string) (mesh_proto.InterCPEnvoyAdminForwardServiceClient, error) {
- conn, err := pool.Client(url)
- if err != nil {
- return nil, err
- }
- return mesh_proto.NewInterCPEnvoyAdminForwardServiceClient(conn), nil
- }
-}
diff --git a/pkg/intercp/envoyadmin/forwarding_dds_client.go b/pkg/intercp/envoyadmin/forwarding_dds_client.go
deleted file mode 100644
index 604cddb..0000000
--- a/pkg/intercp/envoyadmin/forwarding_dds_client.go
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package envoyadmin
-
-import (
- "context"
- "fmt"
- "reflect"
-)
-
-import (
- "github.com/pkg/errors"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/admin"
- core_mesh "github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/mesh"
- core_system "github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/system"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/manager"
- core_model "github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
- core_store "github.com/apache/dubbo-kubernetes/pkg/core/resources/store"
- "github.com/apache/dubbo-kubernetes/pkg/dds/service"
- "github.com/apache/dubbo-kubernetes/pkg/intercp/catalog"
-)
-
-var clientLog = core.Log.WithName("intercp").WithName("envoyadmin").WithName("client")
-
-type NewClientFn = func(url string) (mesh_proto.InterCPEnvoyAdminForwardServiceClient, error)
-
-type forwardingKdsEnvoyAdminClient struct {
- resManager manager.ReadOnlyResourceManager
- cat catalog.Catalog
- instanceID string
- newClientFn NewClientFn
- fallbackClient admin.EnvoyAdminClient
-}
-
-// NewForwardingEnvoyAdminClient returns EnvoyAdminClient which is only used on Global CP in multizone environment.
-// It forwards the request to an instance of the Global CP to which Zone CP of given DPP is connected.
-//
-// For example:
-// We have 2 instances of Global CP (ins-1, ins-2). Dataplane "backend" is in zone "east".
-// The leader CP of zone "east" is connected to ins-1.
-// If we execute config dump for "backend" on ins-1, we follow the regular flow of pkg/envoy/admin/kds_client.go
-// If we execute config dump for "backend" on ins-2, we forward the request to ins-1 and then execute the regular flow.
-func NewForwardingEnvoyAdminClient(
- resManager manager.ReadOnlyResourceManager,
- cat catalog.Catalog,
- instanceID string,
- newClientFn NewClientFn,
- fallbackClient admin.EnvoyAdminClient,
-) admin.EnvoyAdminClient {
- return &forwardingKdsEnvoyAdminClient{
- resManager: resManager,
- cat: cat,
- instanceID: instanceID,
- newClientFn: newClientFn,
- fallbackClient: fallbackClient,
- }
-}
-
-var _ admin.EnvoyAdminClient = &forwardingKdsEnvoyAdminClient{}
-
-func (f *forwardingKdsEnvoyAdminClient) PostQuit(context.Context, *core_mesh.DataplaneResource) error {
- panic("not implemented")
-}
-
-func (f *forwardingKdsEnvoyAdminClient) ConfigDump(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- instanceID, err := f.globalInstanceID(ctx, core_model.ZoneOfResource(proxy), service.ConfigDumpRPC)
- if err != nil {
- return nil, err
- }
- f.logIntendedAction(proxy, instanceID)
- if instanceID == f.instanceID {
- return f.fallbackClient.ConfigDump(ctx, proxy)
- }
- client, err := f.clientForInstanceID(ctx, instanceID)
- if err != nil {
- return nil, err
- }
- req := &mesh_proto.XDSConfigRequest{
- ResourceType: string(proxy.Descriptor().Name),
- ResourceName: proxy.GetMeta().GetName(),
- ResourceMesh: proxy.GetMeta().GetMesh(),
- }
- resp, err := client.XDSConfig(ctx, req)
- if err != nil {
- return nil, err
- }
- return resp.GetConfig(), nil
-}
-
-func (f *forwardingKdsEnvoyAdminClient) Stats(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- instanceID, err := f.globalInstanceID(ctx, core_model.ZoneOfResource(proxy), service.StatsRPC)
- if err != nil {
- return nil, err
- }
- f.logIntendedAction(proxy, instanceID)
- if instanceID == f.instanceID {
- return f.fallbackClient.Stats(ctx, proxy)
- }
- client, err := f.clientForInstanceID(ctx, instanceID)
- if err != nil {
- return nil, err
- }
- req := &mesh_proto.StatsRequest{
- ResourceType: string(proxy.Descriptor().Name),
- ResourceName: proxy.GetMeta().GetName(),
- ResourceMesh: proxy.GetMeta().GetMesh(),
- }
- resp, err := client.Stats(ctx, req)
- if err != nil {
- return nil, err
- }
- return resp.GetStats(), nil
-}
-
-func (f *forwardingKdsEnvoyAdminClient) Clusters(ctx context.Context, proxy core_model.ResourceWithAddress) ([]byte, error) {
- instanceID, err := f.globalInstanceID(ctx, core_model.ZoneOfResource(proxy), service.ClustersRPC)
- if err != nil {
- return nil, err
- }
- f.logIntendedAction(proxy, instanceID)
- if instanceID == f.instanceID {
- return f.fallbackClient.Clusters(ctx, proxy)
- }
- client, err := f.clientForInstanceID(ctx, instanceID)
- if err != nil {
- return nil, err
- }
- req := &mesh_proto.ClustersRequest{
- ResourceType: string(proxy.Descriptor().Name),
- ResourceName: proxy.GetMeta().GetName(),
- ResourceMesh: proxy.GetMeta().GetMesh(),
- }
- resp, err := client.Clusters(ctx, req)
- if err != nil {
- return nil, err
- }
- return resp.GetClusters(), nil
-}
-
-func (f *forwardingKdsEnvoyAdminClient) logIntendedAction(proxy core_model.ResourceWithAddress, instanceID string) {
- log := clientLog.WithValues(
- "name", proxy.GetMeta().GetName(),
- "mesh", proxy.GetMeta().GetMesh(),
- "type", proxy.Descriptor().Name,
- "instanceID", instanceID,
- )
- if instanceID == f.instanceID {
- log.V(1).Info("zone CP of the resource is connected to this Global CP instance. Executing operation")
- } else {
- log.V(1).Info("zone CP of the resource is connected to other Global CP instance. Forwarding the request")
- }
-}
-
-func (f *forwardingKdsEnvoyAdminClient) globalInstanceID(ctx context.Context, zone string, rpcName string) (string, error) {
- zoneInsightRes := core_system.NewZoneInsightResource()
- if err := f.resManager.Get(ctx, zoneInsightRes, core_store.GetByKey(zone, core_model.NoMesh)); err != nil {
- return "", err
- }
- streams := zoneInsightRes.Spec.GetEnvoyAdminStreams()
- var globalInstanceID string
- switch rpcName {
- case service.ConfigDumpRPC:
- globalInstanceID = streams.GetConfigDumpGlobalInstanceId()
- case service.StatsRPC:
- globalInstanceID = streams.GetStatsGlobalInstanceId()
- case service.ClustersRPC:
- globalInstanceID = streams.GetClustersGlobalInstanceId()
- default:
- return "", errors.Errorf("invalid operation %s", rpcName)
- }
- if globalInstanceID == "" {
- return "", &StreamNotConnectedError{rpcName: rpcName}
- }
- return globalInstanceID, nil
-}
-
-func (f *forwardingKdsEnvoyAdminClient) clientForInstanceID(ctx context.Context, instanceID string) (mesh_proto.InterCPEnvoyAdminForwardServiceClient, error) {
- instance, err := catalog.InstanceOfID(ctx, f.cat, instanceID)
- if err != nil {
- return nil, err
- }
- return f.newClientFn(instance.InterCpURL())
-}
-
-type StreamNotConnectedError struct {
- rpcName string
-}
-
-func (e *StreamNotConnectedError) Error() string {
- return fmt.Sprintf("stream to execute %s operations is not yet connected", e.rpcName)
-}
-
-func (e *StreamNotConnectedError) Is(err error) bool {
- return reflect.TypeOf(e) == reflect.TypeOf(err)
-}
diff --git a/pkg/intercp/envoyadmin/server.go b/pkg/intercp/envoyadmin/server.go
deleted file mode 100644
index b1096e6..0000000
--- a/pkg/intercp/envoyadmin/server.go
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package envoyadmin
-
-import (
- "context"
- "errors"
-)
-
-import (
- mesh_proto "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/admin"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/manager"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
- "github.com/apache/dubbo-kubernetes/pkg/core/resources/registry"
- core_store "github.com/apache/dubbo-kubernetes/pkg/core/resources/store"
-)
-
-var serverLog = core.Log.WithName("intercp").WithName("catalog").WithName("server")
-
-type server struct {
- adminClient admin.EnvoyAdminClient
- resManager manager.ReadOnlyResourceManager
- mesh_proto.UnimplementedInterCPEnvoyAdminForwardServiceServer
-}
-
-var _ mesh_proto.InterCPEnvoyAdminForwardServiceServer = &server{}
-
-func NewServer(adminClient admin.EnvoyAdminClient, resManager manager.ReadOnlyResourceManager) mesh_proto.InterCPEnvoyAdminForwardServiceServer {
- return &server{
- adminClient: adminClient,
- resManager: resManager,
- }
-}
-
-func (s *server) XDSConfig(ctx context.Context, req *mesh_proto.XDSConfigRequest) (*mesh_proto.XDSConfigResponse, error) {
- serverLog.V(1).Info("received forwarded request", "operation", "XDSConfig", "request", req)
- resWithAddr, err := s.resWithAddress(ctx, req.ResourceType, req.ResourceName, req.ResourceMesh)
- if err != nil {
- return nil, err
- }
- configDump, err := s.adminClient.ConfigDump(ctx, resWithAddr)
- if err != nil {
- return nil, err
- }
- return &mesh_proto.XDSConfigResponse{
- Result: &mesh_proto.XDSConfigResponse_Config{
- Config: configDump,
- },
- }, nil
-}
-
-func (s *server) Stats(ctx context.Context, req *mesh_proto.StatsRequest) (*mesh_proto.StatsResponse, error) {
- serverLog.V(1).Info("received forwarded request", "operation", "Stats", "request", req)
- resWithAddr, err := s.resWithAddress(ctx, req.ResourceType, req.ResourceName, req.ResourceMesh)
- if err != nil {
- return nil, err
- }
- stats, err := s.adminClient.Stats(ctx, resWithAddr)
- if err != nil {
- return nil, err
- }
- return &mesh_proto.StatsResponse{
- Result: &mesh_proto.StatsResponse_Stats{
- Stats: stats,
- },
- }, nil
-}
-
-func (s *server) Clusters(ctx context.Context, req *mesh_proto.ClustersRequest) (*mesh_proto.ClustersResponse, error) {
- serverLog.V(1).Info("received forwarded request", "operation", "Clusters", "request", req)
- resWithAddr, err := s.resWithAddress(ctx, req.ResourceType, req.ResourceName, req.ResourceMesh)
- if err != nil {
- return nil, err
- }
- clusters, err := s.adminClient.Clusters(ctx, resWithAddr)
- if err != nil {
- return nil, err
- }
- return &mesh_proto.ClustersResponse{
- Result: &mesh_proto.ClustersResponse_Clusters{
- Clusters: clusters,
- },
- }, nil
-}
-
-func (s *server) resWithAddress(ctx context.Context, typ, name, mesh string) (model.ResourceWithAddress, error) {
- obj, err := registry.Global().NewObject(model.ResourceType(typ))
- if err != nil {
- return nil, err
- }
- if err := s.resManager.Get(ctx, obj, core_store.GetByKey(name, mesh)); err != nil {
- return nil, err
- }
- resourceWithAddr, ok := obj.(model.ResourceWithAddress)
- if !ok {
- return nil, errors.New("invalid resource type")
- }
- return resourceWithAddr, nil
-}
diff --git a/pkg/intercp/server/server.go b/pkg/intercp/server/server.go
deleted file mode 100644
index 59f7356..0000000
--- a/pkg/intercp/server/server.go
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package server
-
-import (
- "fmt"
- "net"
- "net/http"
- "time"
-)
-
-import (
- "google.golang.org/grpc"
- "google.golang.org/grpc/keepalive"
-)
-
-import (
- "github.com/apache/dubbo-kubernetes/pkg/config/intercp"
- "github.com/apache/dubbo-kubernetes/pkg/core"
- "github.com/apache/dubbo-kubernetes/pkg/core/runtime/component"
-)
-
-var log = core.Log.WithName("intercp-server")
-
-const (
- grpcMaxConcurrentStreams = 1000000
- grpcKeepAliveTime = 15 * time.Second
-)
-
-type InterCpServer struct {
- config intercp.InterCpServerConfig
- grpcServer *grpc.Server
- instanceId string
-}
-
-var _ component.Component = &InterCpServer{}
-
-func New(
- config intercp.InterCpServerConfig,
- instanceId string,
-) (*InterCpServer, error) {
- grpcOptions := []grpc.ServerOption{
- grpc.MaxConcurrentStreams(grpcMaxConcurrentStreams),
- grpc.KeepaliveParams(keepalive.ServerParameters{
- Time: grpcKeepAliveTime,
- Timeout: grpcKeepAliveTime,
- }),
- grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
- MinTime: grpcKeepAliveTime,
- PermitWithoutStream: true,
- }),
- }
-
- grpcOptions = append(grpcOptions)
- grpcServer := grpc.NewServer(grpcOptions...)
-
- return &InterCpServer{
- config: config,
- grpcServer: grpcServer,
- instanceId: instanceId,
- }, nil
-}
-
-func (d *InterCpServer) Start(stop <-chan struct{}) error {
- lis, err := net.Listen("tcp", fmt.Sprintf(":%d", d.config.Port))
- if err != nil {
- return err
- }
- log := log.WithValues(
- "instanceId",
- d.instanceId,
- )
-
- errChan := make(chan error)
- go func() {
- defer close(errChan)
- if err := d.grpcServer.Serve(lis); err != nil {
- if err != http.ErrServerClosed {
- log.Error(err, "terminated with an error")
- errChan <- err
- return
- }
- }
- log.Info("terminated normally")
- }()
- log.Info("starting", "interface", "0.0.0.0", "port", d.config.Port, "tls", true)
-
- select {
- case <-stop:
- log.Info("stopping gracefully")
- d.grpcServer.GracefulStop()
- log.Info("stopped")
- return nil
- case err := <-errChan:
- return err
- }
-}
-
-func (d *InterCpServer) NeedLeaderElection() bool {
- return false
-}
-
-func (d *InterCpServer) GrpcServer() *grpc.Server {
- return d.grpcServer
-}
diff --git a/pkg/plugins/common/zookeeper/connection.go b/pkg/plugins/common/zookeeper/connection.go
deleted file mode 100644
index af4cc0c..0000000
--- a/pkg/plugins/common/zookeeper/connection.go
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package zookeeper
-
-import (
- gxzookeeper "github.com/dubbogo/gost/database/kv/zk"
-)
-
-import (
- config "github.com/apache/dubbo-kubernetes/pkg/config/plugins/resources/zookeeper"
-)
-
-func ConnectToZK(cfg config.ZookeeperStoreConfig) (*gxzookeeper.ZookeeperClient, error) {
- client, err := gxzookeeper.NewZookeeperClient("default", cfg.Servers, true)
- if err != nil {
- return nil, err
- }
- return client, nil
-}
diff --git a/pkg/plugins/common/zookeeper/zk_listener.go b/pkg/plugins/common/zookeeper/zk_listener.go
deleted file mode 100644
index 70cc299..0000000
--- a/pkg/plugins/common/zookeeper/zk_listener.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package zookeeper
-
-import (
- "sync"
-)
-
-import (
- gxzookeeper "github.com/dubbogo/gost/database/kv/zk"
-
- "github.com/go-logr/logr"
-
- "go.uber.org/atomic"
-)
-
-import (
- "github.com/apache/dubbo-kubernetes/pkg/config/plugins/resources/zookeeper"
-)
-
-type zkListener struct {
- Client *gxzookeeper.ZookeeperClient
- pathMapLock sync.Mutex
- pathMap map[string]*atomic.Int32
- wg sync.WaitGroup
- err chan error
- notifications chan *Notification
- stop chan struct{}
-}
-
-func NewListener(cfg zookeeper.ZookeeperStoreConfig, log logr.Logger) (Listener, error) {
- return nil, nil
-}
-
-func (z *zkListener) Error() <-chan error {
- return z.err
-}
-
-func (z *zkListener) Notify() chan *Notification {
- return z.notifications
-}
-
-func (z *zkListener) Close() error {
- close(z.stop)
- z.wg.Wait()
- return nil
-}
diff --git a/pkg/plugins/resources/k8s/native/api/v1alpha1/zz_generated.mesh.go b/pkg/plugins/resources/k8s/native/api/v1alpha1/zz_generated.mesh.go
index 8a65fcf..58300a7 100644
--- a/pkg/plugins/resources/k8s/native/api/v1alpha1/zz_generated.mesh.go
+++ b/pkg/plugins/resources/k8s/native/api/v1alpha1/zz_generated.mesh.go
@@ -411,7 +411,7 @@
}
// +kubebuilder:object:root=true
-// +kubebuilder:resource:categories=dubbo,scope=Cluster
+// +kubebuilder:resource:categories=dubbo,scope=Namespaced
type Mapping struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -427,7 +427,7 @@
}
// +kubebuilder:object:root=true
-// +kubebuilder:resource:scope=Namespaced
+// +kubebuilder:resource:scope=Cluster
type MappingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
@@ -481,7 +481,7 @@
}
func (cb *Mapping) Scope() model.Scope {
- return model.ScopeCluster
+ return model.ScopeNamespace
}
func (l *MappingList) GetItems() []model.KubernetesObject {
@@ -702,7 +702,7 @@
}
// +kubebuilder:object:root=true
-// +kubebuilder:resource:categories=dubbo,scope=Cluster
+// +kubebuilder:resource:categories=dubbo,scope=Namespaced
type MetaData struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -718,7 +718,7 @@
}
// +kubebuilder:object:root=true
-// +kubebuilder:resource:scope=Namespaced
+// +kubebuilder:resource:scope=Cluster
type MetaDataList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
@@ -772,7 +772,7 @@
}
func (cb *MetaData) Scope() model.Scope {
- return model.ScopeCluster
+ return model.ScopeNamespace
}
func (l *MetaDataList) GetItems() []model.KubernetesObject {
diff --git a/pkg/plugins/resources/traditional/store.go b/pkg/plugins/resources/traditional/store.go
index 97b83f0..9825ff5 100644
--- a/pkg/plugins/resources/traditional/store.go
+++ b/pkg/plugins/resources/traditional/store.go
@@ -20,7 +20,6 @@
import (
"context"
"fmt"
- util_k8s "github.com/apache/dubbo-kubernetes/pkg/util/k8s"
"sync"
)
@@ -50,6 +49,7 @@
core_model "github.com/apache/dubbo-kubernetes/pkg/core/resources/model"
"github.com/apache/dubbo-kubernetes/pkg/core/resources/store"
"github.com/apache/dubbo-kubernetes/pkg/events"
+ util_k8s "github.com/apache/dubbo-kubernetes/pkg/util/k8s"
)
const (
diff --git a/pkg/plugins/runtime/k8s/controllers/inbound_converter.go b/pkg/plugins/runtime/k8s/controllers/inbound_converter.go
index c3df9ec..24f9064 100644
--- a/pkg/plugins/runtime/k8s/controllers/inbound_converter.go
+++ b/pkg/plugins/runtime/k8s/controllers/inbound_converter.go
@@ -77,7 +77,7 @@
Port: uint32(containerPort),
Tags: tags,
State: state,
- Health: &health, // write health for backwards compatibility with Kuma 2.5 and older
+ Health: &health, // write health for backwards compatibility with Dubbo
})
}
@@ -105,7 +105,7 @@
Port: mesh_proto.TCPPortReserved,
Tags: tags,
State: state,
- Health: &health, // write health for backwards compatibility with Kuma 2.5 and older
+ Health: &health, // write health for backwards compatibility with Dubbo
}
}
@@ -175,7 +175,7 @@
// ProtocolTagFor infers service protocol from a `<port>.service.dubbo.io/protocol` annotation or `appProtocol`.
func ProtocolTagFor(svc *kube_core.Service, svcPort *kube_core.ServicePort) string {
var protocolValue string
- protocolAnnotation := fmt.Sprintf("%d.service.kuma.io/protocol", svcPort.Port)
+ protocolAnnotation := fmt.Sprintf("%d.service.dubbo.io/protocol", svcPort.Port)
if svcPort.AppProtocol != nil {
protocolValue = *svcPort.AppProtocol
@@ -186,8 +186,8 @@
}
}
- if explicitKumaProtocol, ok := svc.Annotations[protocolAnnotation]; ok && protocolValue == "" {
- protocolValue = explicitKumaProtocol
+ if explicitDubboProtocol, ok := svc.Annotations[protocolAnnotation]; ok && protocolValue == "" {
+ protocolValue = explicitDubboProtocol
}
if protocolValue == "" {
diff --git a/pkg/plugins/runtime/k8s/controllers/pod_controller.go b/pkg/plugins/runtime/k8s/controllers/pod_controller.go
index a838de1..2b52018 100644
--- a/pkg/plugins/runtime/k8s/controllers/pod_controller.go
+++ b/pkg/plugins/runtime/k8s/controllers/pod_controller.go
@@ -287,7 +287,7 @@
if err != nil {
if !errors.Is(err, context.Canceled) {
log.Error(err, "unable to create/update Dataplane", "operationResult", operationResult)
- r.EventRecorder.Eventf(pod, kube_core.EventTypeWarning, FailedToGenerateDubboDataplaneReason, "Failed to generate Kuma Dataplane: %s", err.Error())
+ r.EventRecorder.Eventf(pod, kube_core.EventTypeWarning, FailedToGenerateDubboDataplaneReason, "Failed to generate Dubbo Dataplane: %s", err.Error())
}
return err
@@ -295,10 +295,10 @@
switch operationResult {
case kube_controllerutil.OperationResultCreated:
log.Info("Dataplane created")
- r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, CreatedDubboDataplaneReason, "Created Kuma Dataplane: %s", pod.Name)
+ r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, CreatedDubboDataplaneReason, "Created Dubbo Dataplane: %s", pod.Name)
case kube_controllerutil.OperationResultUpdated:
log.Info("Dataplane updated")
- r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, UpdatedDubboDataplaneReason, "Updated Kuma Dataplane: %s", pod.Name)
+ r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, UpdatedDubboDataplaneReason, "Updated Dubbo Dataplane: %s", pod.Name)
}
return nil
}
@@ -323,16 +323,16 @@
log := r.Log.WithValues("pod", kube_types.NamespacedName{Namespace: pod.Namespace, Name: pod.Name})
if err != nil {
log.Error(err, "unable to create/update Ingress", "operationResult", operationResult)
- r.EventRecorder.Eventf(pod, kube_core.EventTypeWarning, FailedToGenerateDubboDataplaneReason, "Failed to generate Kuma Ingress: %s", err.Error())
+ r.EventRecorder.Eventf(pod, kube_core.EventTypeWarning, FailedToGenerateDubboDataplaneReason, "Failed to generate Dubbo Ingress: %s", err.Error())
return err
}
switch operationResult {
case kube_controllerutil.OperationResultCreated:
log.Info("ZoneIngress created")
- r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, CreatedDubboDataplaneReason, "Created Kuma Ingress: %s", pod.Name)
+ r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, CreatedDubboDataplaneReason, "Created Dubbo Ingress: %s", pod.Name)
case kube_controllerutil.OperationResultUpdated:
log.Info("ZoneIngress updated")
- r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, UpdatedDubboDataplaneReason, "Updated Kuma Ingress: %s", pod.Name)
+ r.EventRecorder.Eventf(pod, kube_core.EventTypeNormal, UpdatedDubboDataplaneReason, "Updated Dubbo Ingress: %s", pod.Name)
}
return nil
}
diff --git a/pkg/plugins/runtime/k8s/metadata/annotations.go b/pkg/plugins/runtime/k8s/metadata/annotations.go
index 52b0298..5762beb 100644
--- a/pkg/plugins/runtime/k8s/metadata/annotations.go
+++ b/pkg/plugins/runtime/k8s/metadata/annotations.go
@@ -37,7 +37,7 @@
// which is crucial for Multizone communication
DubboIngressAnnotation = "dubbo.io/ingress"
- // DUBBOSidecarEnvVarsAnnotation is a ; separated list of env vars that will be applied on Kuma Sidecar
+ // DUBBOSidecarEnvVarsAnnotation is a ; separated list of env vars that will be applied on Dubbo Sidecar
// Example value: TEST1=1;TEST2=2
DUBBOSidecarEnvVarsAnnotation = "dubbo.io/sidecar-env-vars"
@@ -54,11 +54,11 @@
DubboTagsAnnotation = "dubbo.io/tags"
// DubboIngressPublicAddressAnnotation allows to pick public address for Ingress
- // If not defined, Kuma will try to pick this address from the Ingress Service
+ // If not defined, Dubbo will try to pick this address from the Ingress Service
DubboIngressPublicAddressAnnotation = "dubbo.io/ingress-public-address"
// DubboIngressPublicPortAnnotation allows to pick public port for Ingress
- // If not defined, Kuma will try to pick this address from the Ingress Service
+ // If not defined, Dubbo will try to pick this address from the Ingress Service
DubboIngressPublicPortAnnotation = "dubbo.io/ingress-public-port"
)
@@ -165,7 +165,7 @@
return v.([]string), exists
}
-// GetMap returns map from annotation. Example: "kuma.io/sidecar-env-vars: TEST1=1;TEST2=2"
+// GetMap returns map from annotation. Example: "dubbo.io/sidecar-env-vars: TEST1=1;TEST2=2"
func (a Annotations) GetMap(keys ...string) (map[string]string, bool, error) {
return a.GetMapWithDefault(map[string]string{}, keys...)
}
diff --git a/pkg/plugins/runtime/k8s/webhooks/service_validator.go b/pkg/plugins/runtime/k8s/webhooks/service_validator.go
index 0414bba..94cf513 100644
--- a/pkg/plugins/runtime/k8s/webhooks/service_validator.go
+++ b/pkg/plugins/runtime/k8s/webhooks/service_validator.go
@@ -61,7 +61,7 @@
func (v *ServiceValidator) validate(svc *kube_core.Service) error {
verr := &validators.ValidationError{}
for _, svcPort := range svc.Spec.Ports {
- protocolAnnotation := fmt.Sprintf("%d.service.kuma.io/protocol", svcPort.Port)
+ protocolAnnotation := fmt.Sprintf("%d.service.dubbo.io/protocol", svcPort.Port)
protocolAnnotationValue, exists := svc.Annotations[protocolAnnotation]
if exists && core_mesh.ParseProtocol(protocolAnnotationValue) == core_mesh.ProtocolUnknown {
verr.AddViolationAt(validators.RootedAt("metadata").Field("annotations").Key(protocolAnnotation),
diff --git a/pkg/plugins/runtime/k8s/webhooks/validation.go b/pkg/plugins/runtime/k8s/webhooks/validation.go
index ba125c3..6e15bd3 100644
--- a/pkg/plugins/runtime/k8s/webhooks/validation.go
+++ b/pkg/plugins/runtime/k8s/webhooks/validation.go
@@ -196,7 +196,7 @@
{
Type: "FieldValueInvalid",
Message: "cannot be empty",
- Field: "metadata.labels[kuma.io/origin]",
+ Field: "metadata.labels[dubbo.io/origin]",
},
},
},
@@ -226,7 +226,7 @@
{
Type: "FieldValueInvalid",
Message: "cannot be empty",
- Field: "metadata.annotations[kuma.io/synced]",
+ Field: "metadata.annotations[dubbo.io/synced]",
},
},
},
@@ -239,7 +239,7 @@
return true
}
-func convertValidationErrorOf(kumaErr validators.ValidationError, obj kube_runtime.Object, objMeta metav1.Object) admission.Response {
+func convertValidationErrorOf(dubboErr validators.ValidationError, obj kube_runtime.Object, objMeta metav1.Object) admission.Response {
details := &metav1.StatusDetails{
Name: objMeta.GetName(),
Kind: obj.GetObjectKind().GroupVersionKind().Kind,
@@ -249,14 +249,14 @@
Allowed: false,
Result: &metav1.Status{
Status: "Failure",
- Message: kumaErr.Error(),
+ Message: dubboErr.Error(),
Reason: "Invalid",
Code: int32(422),
Details: details,
},
},
}
- for _, violation := range kumaErr.Violations {
+ for _, violation := range dubboErr.Violations {
cause := metav1.StatusCause{
Type: "FieldValueInvalid",
Message: violation.Message,
diff --git a/pkg/util/xds/stats_callbacks.go b/pkg/util/xds/stats_callbacks.go
index cad899a..06a6f47 100644
--- a/pkg/util/xds/stats_callbacks.go
+++ b/pkg/util/xds/stats_callbacks.go
@@ -86,43 +86,6 @@
configsQueue: map[string]time.Time{},
}
- stats.responsesSentMetric = prometheus.NewCounterVec(prometheus.CounterOpts{
- Name: dsType + "_responses_sent",
- Help: "Number of responses sent by the server to a client",
- }, []string{"type_url"})
- if err := metrics.Register(stats.responsesSentMetric); err != nil {
- return nil, err
- }
-
- stats.requestsReceivedMetric = prometheus.NewCounterVec(prometheus.CounterOpts{
- Name: dsType + "_requests_received",
- Help: "Number of confirmations requests from a client",
- }, []string{"type_url", "confirmation"})
- if err := metrics.Register(stats.requestsReceivedMetric); err != nil {
- return nil, err
- }
-
- streamsActive := prometheus.NewGaugeFunc(prometheus.GaugeOpts{
- Name: dsType + "_streams_active",
- Help: "Number of active connections between a server and a client",
- }, func() float64 {
- stats.RLock()
- defer stats.RUnlock()
- return float64(stats.streamsActive)
- })
- if err := metrics.Register(streamsActive); err != nil {
- return nil, err
- }
-
- stats.deliveryMetricName = dsType + "_delivery"
- stats.deliveryMetric = prometheus.NewSummary(prometheus.SummaryOpts{
- Name: stats.deliveryMetricName,
- Help: "Summary of config delivery including a response (ACK/NACK) from the client",
- })
- if err := metrics.Register(stats.deliveryMetric); err != nil {
- return nil, err
- }
-
return stats, nil
}
diff --git a/pkg/xds/bootstrap/generator.go b/pkg/xds/bootstrap/generator.go
index 4c4fc70..7fc5c3b 100644
--- a/pkg/xds/bootstrap/generator.go
+++ b/pkg/xds/bootstrap/generator.go
@@ -241,7 +241,7 @@
var DpTokenRequired = errors.New("Dataplane Token is required. Generate token using 'dubboctl generate dataplane-token > /path/file' and provide it via --dataplane-token-file=/path/file argument to Dubbo DP")
var NotCA = errors.New("A data plane proxy is trying to verify the control plane using the certificate which is not a certificate authority (basic constraint 'CA' is set to 'false').\n" +
- "Provide CA that was used to sign a certificate used in the control plane by using 'dubbo-dp run --ca-cert-file=file' or via KUMA_CONTROL_PLANE_CA_CERT_FILE")
+ "Provide CA that was used to sign a certificate used in the control plane by using 'dubbo-dp run --ca-cert-file=file' or via DUBBO_CONTROL_PLANE_CA_CERT_FILE")
func SANMismatchErr(host string, sans []string) error {
return errors.Errorf("A data plane proxy is trying to connect to the control plane using %q address, but the certificate in the control plane has the following SANs %q. "+
diff --git a/pkg/xds/bootstrap/template_v3.go b/pkg/xds/bootstrap/template_v3.go
index b6151f9..71034f1 100644
--- a/pkg/xds/bootstrap/template_v3.go
+++ b/pkg/xds/bootstrap/template_v3.go
@@ -75,7 +75,7 @@
}
runtimeLayers := []*envoy_bootstrap_v3.RuntimeLayer{{
- Name: "kuma",
+ Name: "dubbo",
LayerSpecifier: &envoy_bootstrap_v3.RuntimeLayer_StaticLayer{
StaticLayer: util_proto.MustStruct(map[string]interface{}{
"re2.max_program_size.error_level": 4294967295,
diff --git a/pkg/xds/server/components.go b/pkg/xds/server/components.go
index c69ee28..166e632 100644
--- a/pkg/xds/server/components.go
+++ b/pkg/xds/server/components.go
@@ -18,6 +18,7 @@
package server
import (
+ util_xds "github.com/apache/dubbo-kubernetes/pkg/util/xds"
"github.com/pkg/errors"
)
@@ -42,6 +43,7 @@
)
func RegisterXDS(rt core_runtime.Runtime) error {
+ statsCallbacks, err := util_xds.NewStatsCallbacks(nil, "xds")
claCache, err := cla.NewCache(rt.Config().Store.Cache.ExpirationTime.Duration)
if err != nil {
return err
@@ -51,7 +53,7 @@
CLACache: claCache,
Zone: "",
}
- if err := v3.RegisterXDS(nil, envoyCpCtx, rt); err != nil {
+ if err := v3.RegisterXDS(statsCallbacks, envoyCpCtx, rt); err != nil {
return errors.Wrap(err, "could not register V3 XDS")
}
return nil
diff --git a/test/app/provider/deployment.yaml b/test/app/provider/deployment.yaml
index 52d34ab..c2bc771 100644
--- a/test/app/provider/deployment.yaml
+++ b/test/app/provider/deployment.yaml
@@ -26,7 +26,7 @@
template:
metadata:
annotations:
- dubbo.io/xds-enable: enabled
+ dubbo.io/ingress: enabled
labels:
app: dubbo-samples-apiserver-provider
spec:
diff --git a/tools/xds-client/main.go b/tools/xds-client/main.go
index 47e9aef..1a86f9c 100644
--- a/tools/xds-client/main.go
+++ b/tools/xds-client/main.go
@@ -52,7 +52,7 @@
outbounds int
rampUpPeriod time.Duration
}{
- xdsServerAddress: "grpcs://localhost:5678",
+ xdsServerAddress: "grpc://localhost:5678",
dps: 100,
services: 50,
inbounds: 1,
@@ -100,7 +100,7 @@
}
dp := &unversioned.Resource{
- Meta: rest_v1alpha1.ResourceMeta{Mesh: "default", Name: fmt.Sprintf("dataplane-%d", i), Type: "Dataplane"},
+ Meta: rest_v1alpha1.ResourceMeta{Mesh: "default", Name: fmt.Sprintf("dataplane-%d.dubbo-system", i), Type: "Dataplane"},
Spec: dpSpec,
}