From 61fe8de77bce6e6e4d156844b3806db1849aaf92 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Thu, 13 Dec 2018 16:28:20 -0800 Subject: [PATCH 01/14] Introduce forward looking MCP enhancements The initial version of Mesh Configuration Protocol (MCP) was introduced to decouple Pilot/Mixer from the k8s kube-apiserver. These enhancements address additional forward looking requirements as we bring Galley and the MCP API to beta quality. * Enable alternative control topologies where the source of configuration is not publicly accessible. * Provide a feedback mechanism to report the observed config state to the user (e.g via CRD status). * Improve performance at scale (e.g. Enterprise use case) * Rationalize the resource model The intent is to introduce these backwards incompatible API changes now before Galley and MCP ship as beta quality and on-by-default. Rationalization of the resource model and incremental improvements can be implemented immediately as they effect the contract between Pilot and Galley. Alternative control topologies and feedback/status are inherently new features and can be implemented later with the same APIs without concerns of breaking compatibility. Design proposal: https://goo.gl/RTKMwF --- .gitattributes | 2 + mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 326 ++- mcp/v1alpha1/mcp.pb.go | 1819 ++++++++++++++--- mcp/v1alpha1/mcp.proto | 128 +- mcp/v1alpha1/metadata.pb.go | 291 ++- mcp/v1alpha1/metadata.proto | 33 +- .../{envelope.pb.go => resource.pb.go} | 160 +- .../{envelope.proto => resource.proto} | 8 +- proto.lock | 132 +- python/istio_api/mcp/v1alpha1/envelope_pb2.py | 28 +- python/istio_api/mcp/v1alpha1/mcp_pb2.py | 302 ++- python/istio_api/mcp/v1alpha1/metadata_pb2.py | 75 +- 12 files changed, 2829 insertions(+), 475 deletions(-) create mode 100644 .gitattributes rename mcp/v1alpha1/{envelope.pb.go => resource.pb.go} (56%) rename mcp/v1alpha1/{envelope.proto => resource.proto} (81%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..1db2bfabfe --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.pb.go linguist-generated=true +*.pb.html linguist-generated=true diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index 48999418da..e685c02f8b 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -2,7 +2,7 @@ title: istio.mcp.v1alpha1 layout: protoc-gen-docs generator: protoc-gen-docs -number_of_entries: 9 +number_of_entries: 14 ---

This package defines the common, core types used by the Mesh Configuration Protocol.

@@ -26,6 +26,30 @@

AggregatedMeshConfigService

update the resources on the client. This supports the goal of scalability of MCP resources.

+ +

ResourceSink

+
+

Service where the source is the gRPC client. The source is responsible for +initiating connections and opening streams.

+ +
rpc EstablishResourceStream(Resources) returns (RequestResources)
+
+

The source, acting as gRPC client, establishes a new resource stream +with the sink. The sink sends RequestResources message to and +receives Resources messages from the source.

+ +
+

ResourceSource

+
+

Service where the sink is the gRPC client. The sink is responsible for +initiating connections and opening streams.

+ +
rpc EstablishResourceStream(RequestResources) returns (Resources)
+
+

The sink, acting as gRPC client, establishes a new resource stream +with the source. The sink sends RequestResources message to +and receives Resources messages from the source.

+

Types

Client

@@ -59,39 +83,6 @@

Client

Opaque metadata extending the client identifier.

- - - - - -

Envelope

-
-

Envelope for a configuration resource as transferred via the Mesh Configuration Protocol. -Each envelope is made up of common metadata, and a type-specific resource payload.

- - - - - - - - - - - - - - - - - - - @@ -203,9 +194,9 @@

IncrementalMeshConfigResponse

- - - + + + - - - + + + @@ -344,9 +335,9 @@

MeshConfigResponse

@@ -385,10 +376,23 @@

Metadata

@@ -404,8 +408,232 @@

Metadata

+ + + + + + + + + + + + +
FieldTypeDescription
metadataMetadata -

Common metadata describing the resource.

- -
resourcegoogle.protobuf.Any -

The resource itself.

-
envelopesEnvelope[]
resourcesResource[]

The response resources wrapped in the common MCP Envelope message. These are typed resources that match the type url in the @@ -331,11 +322,11 @@

MeshConfigResponse

envelopesEnvelope[]
resourcesResource[] -

The response resources wrapped in the common MCP Envelope +

The response resources wrapped in the common MCP Resource message.

typeUrl string -

Type URL for resources wrapped in the provided envelope(s). This +

Type URL for resources wrapped in the provided resources(s). This must be consistent with the type_url in the wrapper messages if -envelopes is non-empty.

+resources is non-empty.

name string -

The name of the resource. It is unique within the context of a -resource type and the origin server of the resource. The resource -type is identified by the TypeUrl of the resource field of the -Envelope message.

+

Fully qualified name of the resource. Unique in context of a collection.

+ +

The FQ name consists of path segments which includes the resources +location in a resource hierarchy. On k8s, this hierarchy is +two-levels: cluster and namespace, e.g.

+ +

namespaced => / + cluster-scoped => / # alt: reserved namespace (e.g. :cluster, :global)

+ +

Deeper hierarchy could also be represented, e.g.

+ +
   <org>/<team>/<name>
+
+ +

“/” should be used as the standard delimiter. The rightmost segment is +the most specific identifier (e.g. leaf). Segments moving towards the left +represent higher positions in the resource hierarchy.

version string -

The resource level version. It allows MCP to track the state of -individual resources.

+

Resource version. This is used to determine when resources change across +resource updates. It should be treated as opaque by consumers/sinks.

+ +
labelsmap<string, string> +

Map of string keys and values that can be used to organize and categorize +resources within a collection.

+ +
annotationsgoogle.protobuf.Struct +

Structured data that can be used by source and sink to communicate arbitrary +metadata about this resource.

+ +
+
+

Node

+
+

Identifies a specific MCP sink node instance. The node identifier is +presented to the resource source, which may use this identifier +to distinguish per sink configuration for serving. This +information is not authoritative. Authoritative identity should come +from the underlying transport layer (e.g. rpc credentials).

+ + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
idstring +

An opaque identifier for the MCP client.

+ +
metadatagoogle.protobuf.Struct +

Opaque metadata extending the node identifier.

+ +
+
+

RequestResources

+
+

A RequestResource can be sent in two situations:

+ +

Initial message in an MCP bidirectional change stream +As an ACK or NACK response to a previous Resources. In +this case the responsenonce is set to the nonce value +in the Resources. ACK/NACK is determined by the presence +of errordetail.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
nodeNode +

An opaque identifier and generic set of labels to identify the MCP sink node.

+ +
collectionstring +

Type of resource collection that is being requested, e.g.

+ +

istio/networking/v1alpha3/VirtualService +k8s//

+ +
initialResourceVersionsmap<string, string> +

When the RequestResources is the first in a stream, the initialresourceversions must +be populated. Otherwise, initialresourceversions must be omitted. The keys are the +resources names of the MCP resources known to the MCP client. The values in the map +are the associated resource level version info.

+ +
responseNoncestring +

When the RequestResources is an ACK or NACK message in response to a previous RequestResources, +the responsenonce must be the nonce in the RequestResources. Otherwise responsenonce must +be omitted.

+ +
errorDetailgoogle.rpc.Status +

This is populated when the previously received resources could not be applied +The message field in error_details provides the source internal exception +related to the failure.

+ +
+
+

Resource

+
+

Resource for a resource as transferred via the Mesh Configuration Protocol. Each +resource is made up of common metadata, and a type-specific resource payload.

+ + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
metadataMetadata +

Common metadata describing the resource.

+ +
bodygoogle.protobuf.Any +

The resource itself.

+ +
+
+

Resources

+
+

Resources do not need to include a full snapshot of the tracked +resources. Instead they are a diff to the state of a MCP client. +Per resource versions allow sources and sinks to track state at +the resource granularity. An MCP incremental session is always +in the context of a gRPC bidirectional stream. This allows the +MCP source to keep track of the state of MCP sink connected to +it.

+ +

In Incremental MCP the nonce field is required and used to pair +Resources to an RequestResources ACK or NACK.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mcp/v1alpha1/mcp.pb.go b/mcp/v1alpha1/mcp.pb.go index b8b77efd4a..57621588b0 100644 --- a/mcp/v1alpha1/mcp.pb.go +++ b/mcp/v1alpha1/mcp.pb.go @@ -1,12 +1,32 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: mcp/v1alpha1/mcp.proto +/* + Package v1alpha1 is a generated protocol buffer package. + + It is generated from these files: + mcp/v1alpha1/mcp.proto + mcp/v1alpha1/metadata.proto + mcp/v1alpha1/resource.proto + + It has these top-level messages: + Client + MeshConfigRequest + MeshConfigResponse + IncrementalMeshConfigRequest + IncrementalMeshConfigResponse + Node + RequestResources + Resources + Metadata + Resource +*/ package v1alpha1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf3 "github.com/gogo/protobuf/types" +import google_protobuf "github.com/gogo/protobuf/types" import google_rpc "github.com/gogo/googleapis/google/rpc" import _ "github.com/gogo/protobuf/gogoproto" @@ -20,6 +40,12 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + // Identifies a specific MCP client instance. The client identifier is // presented to the management server, which may use this identifier // to distinguish per client configuration for serving. This @@ -29,7 +55,7 @@ type Client struct { // An opaque identifier for the MCP client. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Opaque metadata extending the client identifier. - Metadata *google_protobuf3.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` + Metadata *google_protobuf.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` } func (m *Client) Reset() { *m = Client{} } @@ -44,7 +70,7 @@ func (m *Client) GetId() string { return "" } -func (m *Client) GetMetadata() *google_protobuf3.Struct { +func (m *Client) GetMetadata() *google_protobuf.Struct { if m != nil { return m.Metadata } @@ -127,12 +153,12 @@ func (m *MeshConfigRequest) GetErrorDetail() *google_rpc.Status { type MeshConfigResponse struct { // The version of the response data. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The response resources wrapped in the common MCP *Envelope* + // The response resources wrapped in the common MCP *Resource* // message. - Envelopes []Envelope `protobuf:"bytes,2,rep,name=envelopes" json:"envelopes"` - // Type URL for resources wrapped in the provided envelope(s). This + Resources []Resource `protobuf:"bytes,2,rep,name=resources" json:"resources"` + // Type URL for resources wrapped in the provided resources(s). This // must be consistent with the type_url in the wrapper messages if - // envelopes is non-empty. + // resources is non-empty. TypeUrl string `protobuf:"bytes,3,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // The nonce provides a way to explicitly ack a specific // MeshConfigResponse in a following MeshConfigRequest. Additional @@ -157,9 +183,9 @@ func (m *MeshConfigResponse) GetVersionInfo() string { return "" } -func (m *MeshConfigResponse) GetEnvelopes() []Envelope { +func (m *MeshConfigResponse) GetResources() []Resource { if m != nil { - return m.Envelopes + return m.Resources } return nil } @@ -266,7 +292,7 @@ type IncrementalMeshConfigResponse struct { // The response resources wrapped in the common MCP *Envelope* // message. These are typed resources that match the type url in the // IncrementalMeshConfigRequest. - Envelopes []Envelope `protobuf:"bytes,2,rep,name=envelopes" json:"envelopes"` + Resources []Resource `protobuf:"bytes,2,rep,name=resources" json:"resources"` // Resources names of resources that have be deleted and to be // removed from the MCP Client. Removed resources for missing // resources can be ignored. @@ -289,9 +315,9 @@ func (m *IncrementalMeshConfigResponse) GetSystemVersionInfo() string { return "" } -func (m *IncrementalMeshConfigResponse) GetEnvelopes() []Envelope { +func (m *IncrementalMeshConfigResponse) GetResources() []Resource { if m != nil { - return m.Envelopes + return m.Resources } return nil } @@ -310,12 +336,178 @@ func (m *IncrementalMeshConfigResponse) GetNonce() string { return "" } +// Identifies a specific MCP sink node instance. The node identifier is +// presented to the resource source, which may use this identifier +// to distinguish per sink configuration for serving. This +// information is not authoritative. Authoritative identity should come +// from the underlying transport layer (e.g. rpc credentials). +type Node struct { + // An opaque identifier for the MCP client. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Opaque metadata extending the node identifier. + Metadata *google_protobuf.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` +} + +func (m *Node) Reset() { *m = Node{} } +func (m *Node) String() string { return proto.CompactTextString(m) } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{5} } + +func (m *Node) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Node) GetMetadata() *google_protobuf.Struct { + if m != nil { + return m.Metadata + } + return nil +} + +// A RequestResource can be sent in two situations: +// +// Initial message in an MCP bidirectional change stream +// As an ACK or NACK response to a previous Resources. In +// this case the response_nonce is set to the nonce value +// in the Resources. ACK/NACK is determined by the presence +// of error_detail. +type RequestResources struct { + // An opaque identifier and generic set of labels to identify the MCP sink node. + Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"` + // Type of resource collection that is being requested, e.g. + // + // istio/networking/v1alpha3/VirtualService + // k8s// + Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` + // When the RequestResources is the first in a stream, the initial_resource_versions must + // be populated. Otherwise, initial_resource_versions must be omitted. The keys are the + // resources names of the MCP resources known to the MCP client. The values in the map + // are the associated resource level version info. + InitialResourceVersions map[string]string `protobuf:"bytes,3,rep,name=initial_resource_versions,json=initialResourceVersions" json:"initial_resource_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // When the RequestResources is an ACK or NACK message in response to a previous RequestResources, + // the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must + // be omitted. + ResponseNonce string `protobuf:"bytes,4,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` + // This is populated when the previously received resources could not be applied + // The *message* field in *error_details* provides the source internal exception + // related to the failure. + ErrorDetail *google_rpc.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail" json:"error_detail,omitempty"` +} + +func (m *RequestResources) Reset() { *m = RequestResources{} } +func (m *RequestResources) String() string { return proto.CompactTextString(m) } +func (*RequestResources) ProtoMessage() {} +func (*RequestResources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{6} } + +func (m *RequestResources) GetNode() *Node { + if m != nil { + return m.Node + } + return nil +} + +func (m *RequestResources) GetCollection() string { + if m != nil { + return m.Collection + } + return "" +} + +func (m *RequestResources) GetInitialResourceVersions() map[string]string { + if m != nil { + return m.InitialResourceVersions + } + return nil +} + +func (m *RequestResources) GetResponseNonce() string { + if m != nil { + return m.ResponseNonce + } + return "" +} + +func (m *RequestResources) GetErrorDetail() *google_rpc.Status { + if m != nil { + return m.ErrorDetail + } + return nil +} + +// Resources do not need to include a full snapshot of the tracked +// resources. Instead they are a diff to the state of a MCP client. +// Per resource versions allow sources and sinks to track state at +// the resource granularity. An MCP incremental session is always +// in the context of a gRPC bidirectional stream. This allows the +// MCP source to keep track of the state of MCP sink connected to +// it. +// +// In Incremental MCP the nonce field is required and used to pair +// Resources to an RequestResources ACK or NACK. +type Resources struct { + // Type of resource collection that is being requested, e.g. + // + // istio/networking/v1alpha3/VirtualService + // k8s// + Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` + // The response resources wrapped in the common MCP *Resource* message. + // These are typed resources that match the type url in the + // RequestResources message. + Resources []Resource `protobuf:"bytes,2,rep,name=resources" json:"resources"` + // Names of resources that have been deleted and to be + // removed from the MCP sink node. Removed resources for missing + // resources can be ignored. + RemovedResources []string `protobuf:"bytes,3,rep,name=removed_resources,json=removedResources" json:"removed_resources,omitempty"` + // Required. The nonce provides a way for RequestChange to uniquely + // reference a RequestResources. + Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *Resources) Reset() { *m = Resources{} } +func (m *Resources) String() string { return proto.CompactTextString(m) } +func (*Resources) ProtoMessage() {} +func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{7} } + +func (m *Resources) GetCollection() string { + if m != nil { + return m.Collection + } + return "" +} + +func (m *Resources) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *Resources) GetRemovedResources() []string { + if m != nil { + return m.RemovedResources + } + return nil +} + +func (m *Resources) GetNonce() string { + if m != nil { + return m.Nonce + } + return "" +} + func init() { proto.RegisterType((*Client)(nil), "istio.mcp.v1alpha1.Client") proto.RegisterType((*MeshConfigRequest)(nil), "istio.mcp.v1alpha1.MeshConfigRequest") proto.RegisterType((*MeshConfigResponse)(nil), "istio.mcp.v1alpha1.MeshConfigResponse") proto.RegisterType((*IncrementalMeshConfigRequest)(nil), "istio.mcp.v1alpha1.IncrementalMeshConfigRequest") proto.RegisterType((*IncrementalMeshConfigResponse)(nil), "istio.mcp.v1alpha1.IncrementalMeshConfigResponse") + proto.RegisterType((*Node)(nil), "istio.mcp.v1alpha1.Node") + proto.RegisterType((*RequestResources)(nil), "istio.mcp.v1alpha1.RequestResources") + proto.RegisterType((*Resources)(nil), "istio.mcp.v1alpha1.Resources") } func (this *Client) Equal(that interface{}) bool { if that == nil { @@ -402,11 +594,11 @@ func (this *MeshConfigResponse) Equal(that interface{}) bool { if this.VersionInfo != that1.VersionInfo { return false } - if len(this.Envelopes) != len(that1.Envelopes) { + if len(this.Resources) != len(that1.Resources) { return false } - for i := range this.Envelopes { - if !this.Envelopes[i].Equal(&that1.Envelopes[i]) { + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { return false } } @@ -481,11 +673,122 @@ func (this *IncrementalMeshConfigResponse) Equal(that interface{}) bool { if this.SystemVersionInfo != that1.SystemVersionInfo { return false } - if len(this.Envelopes) != len(that1.Envelopes) { + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if len(this.RemovedResources) != len(that1.RemovedResources) { + return false + } + for i := range this.RemovedResources { + if this.RemovedResources[i] != that1.RemovedResources[i] { + return false + } + } + if this.Nonce != that1.Nonce { + return false + } + return true +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if !this.Metadata.Equal(that1.Metadata) { + return false + } + return true +} +func (this *RequestResources) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RequestResources) + if !ok { + that2, ok := that.(RequestResources) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Node.Equal(that1.Node) { + return false + } + if this.Collection != that1.Collection { + return false + } + if len(this.InitialResourceVersions) != len(that1.InitialResourceVersions) { + return false + } + for i := range this.InitialResourceVersions { + if this.InitialResourceVersions[i] != that1.InitialResourceVersions[i] { + return false + } + } + if this.ResponseNonce != that1.ResponseNonce { + return false + } + if !this.ErrorDetail.Equal(that1.ErrorDetail) { + return false + } + return true +} +func (this *Resources) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Resources) + if !ok { + that2, ok := that.(Resources) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Collection != that1.Collection { return false } - for i := range this.Envelopes { - if !this.Envelopes[i].Equal(&that1.Envelopes[i]) { + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { return false } } @@ -686,53 +989,257 @@ var _AggregatedMeshConfigService_serviceDesc = grpc.ServiceDesc{ Metadata: "mcp/v1alpha1/mcp.proto", } -func (m *Client) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) +// Client API for ResourceSource service + +type ResourceSourceClient interface { + // The sink, acting as gRPC client, establishes a new resource stream + // with the source. The sink sends RequestResources message to + // and receives Resources messages from the source. + EstablishResourceStream(ctx context.Context, opts ...grpc.CallOption) (ResourceSource_EstablishResourceStreamClient, error) +} + +type resourceSourceClient struct { + cc *grpc.ClientConn +} + +func NewResourceSourceClient(cc *grpc.ClientConn) ResourceSourceClient { + return &resourceSourceClient{cc} +} + +func (c *resourceSourceClient) EstablishResourceStream(ctx context.Context, opts ...grpc.CallOption) (ResourceSource_EstablishResourceStreamClient, error) { + stream, err := grpc.NewClientStream(ctx, &_ResourceSource_serviceDesc.Streams[0], c.cc, "/istio.mcp.v1alpha1.ResourceSource/EstablishResourceStream", opts...) if err != nil { return nil, err } - return dAtA[:n], nil + x := &resourceSourceEstablishResourceStreamClient{stream} + return x, nil } -func (m *Client) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMcp(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if m.Metadata != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Metadata.Size())) - n1, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 +type ResourceSource_EstablishResourceStreamClient interface { + Send(*RequestResources) error + Recv() (*Resources, error) + grpc.ClientStream +} + +type resourceSourceEstablishResourceStreamClient struct { + grpc.ClientStream +} + +func (x *resourceSourceEstablishResourceStreamClient) Send(m *RequestResources) error { + return x.ClientStream.SendMsg(m) +} + +func (x *resourceSourceEstablishResourceStreamClient) Recv() (*Resources, error) { + m := new(Resources) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err } - return i, nil + return m, nil } -func (m *MeshConfigRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { +// Server API for ResourceSource service + +type ResourceSourceServer interface { + // The sink, acting as gRPC client, establishes a new resource stream + // with the source. The sink sends RequestResources message to + // and receives Resources messages from the source. + EstablishResourceStream(ResourceSource_EstablishResourceStreamServer) error +} + +func RegisterResourceSourceServer(s *grpc.Server, srv ResourceSourceServer) { + s.RegisterService(&_ResourceSource_serviceDesc, srv) +} + +func _ResourceSource_EstablishResourceStream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ResourceSourceServer).EstablishResourceStream(&resourceSourceEstablishResourceStreamServer{stream}) +} + +type ResourceSource_EstablishResourceStreamServer interface { + Send(*Resources) error + Recv() (*RequestResources, error) + grpc.ServerStream +} + +type resourceSourceEstablishResourceStreamServer struct { + grpc.ServerStream +} + +func (x *resourceSourceEstablishResourceStreamServer) Send(m *Resources) error { + return x.ServerStream.SendMsg(m) +} + +func (x *resourceSourceEstablishResourceStreamServer) Recv() (*RequestResources, error) { + m := new(RequestResources) + if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } - return dAtA[:n], nil + return m, nil } -func (m *MeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i +var _ResourceSource_serviceDesc = grpc.ServiceDesc{ + ServiceName: "istio.mcp.v1alpha1.ResourceSource", + HandlerType: (*ResourceSourceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "EstablishResourceStream", + Handler: _ResourceSource_EstablishResourceStream_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "mcp/v1alpha1/mcp.proto", +} + +// Client API for ResourceSink service + +type ResourceSinkClient interface { + // The source, acting as gRPC client, establishes a new resource stream + // with the sink. The sink sends RequestResources message to and + // receives Resources messages from the source. + EstablishResourceStream(ctx context.Context, opts ...grpc.CallOption) (ResourceSink_EstablishResourceStreamClient, error) +} + +type resourceSinkClient struct { + cc *grpc.ClientConn +} + +func NewResourceSinkClient(cc *grpc.ClientConn) ResourceSinkClient { + return &resourceSinkClient{cc} +} + +func (c *resourceSinkClient) EstablishResourceStream(ctx context.Context, opts ...grpc.CallOption) (ResourceSink_EstablishResourceStreamClient, error) { + stream, err := grpc.NewClientStream(ctx, &_ResourceSink_serviceDesc.Streams[0], c.cc, "/istio.mcp.v1alpha1.ResourceSink/EstablishResourceStream", opts...) + if err != nil { + return nil, err + } + x := &resourceSinkEstablishResourceStreamClient{stream} + return x, nil +} + +type ResourceSink_EstablishResourceStreamClient interface { + Send(*Resources) error + Recv() (*RequestResources, error) + grpc.ClientStream +} + +type resourceSinkEstablishResourceStreamClient struct { + grpc.ClientStream +} + +func (x *resourceSinkEstablishResourceStreamClient) Send(m *Resources) error { + return x.ClientStream.SendMsg(m) +} + +func (x *resourceSinkEstablishResourceStreamClient) Recv() (*RequestResources, error) { + m := new(RequestResources) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// Server API for ResourceSink service + +type ResourceSinkServer interface { + // The source, acting as gRPC client, establishes a new resource stream + // with the sink. The sink sends RequestResources message to and + // receives Resources messages from the source. + EstablishResourceStream(ResourceSink_EstablishResourceStreamServer) error +} + +func RegisterResourceSinkServer(s *grpc.Server, srv ResourceSinkServer) { + s.RegisterService(&_ResourceSink_serviceDesc, srv) +} + +func _ResourceSink_EstablishResourceStream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ResourceSinkServer).EstablishResourceStream(&resourceSinkEstablishResourceStreamServer{stream}) +} + +type ResourceSink_EstablishResourceStreamServer interface { + Send(*RequestResources) error + Recv() (*Resources, error) + grpc.ServerStream +} + +type resourceSinkEstablishResourceStreamServer struct { + grpc.ServerStream +} + +func (x *resourceSinkEstablishResourceStreamServer) Send(m *RequestResources) error { + return x.ServerStream.SendMsg(m) +} + +func (x *resourceSinkEstablishResourceStreamServer) Recv() (*Resources, error) { + m := new(Resources) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _ResourceSink_serviceDesc = grpc.ServiceDesc{ + ServiceName: "istio.mcp.v1alpha1.ResourceSink", + HandlerType: (*ResourceSinkServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "EstablishResourceStream", + Handler: _ResourceSink_EstablishResourceStream_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "mcp/v1alpha1/mcp.proto", +} + +func (m *Client) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Client) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.Metadata != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMcp(dAtA, i, uint64(m.Metadata.Size())) + n1, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *MeshConfigRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l if len(m.VersionInfo) > 0 { @@ -797,8 +1304,8 @@ func (m *MeshConfigResponse) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMcp(dAtA, i, uint64(len(m.VersionInfo))) i += copy(dAtA[i:], m.VersionInfo) } - if len(m.Envelopes) > 0 { - for _, msg := range m.Envelopes { + if len(m.Resources) > 0 { + for _, msg := range m.Resources { dAtA[i] = 0x12 i++ i = encodeVarintMcp(dAtA, i, uint64(msg.Size())) @@ -912,8 +1419,166 @@ func (m *IncrementalMeshConfigResponse) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMcp(dAtA, i, uint64(len(m.SystemVersionInfo))) i += copy(dAtA[i:], m.SystemVersionInfo) } - if len(m.Envelopes) > 0 { - for _, msg := range m.Envelopes { + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x12 + i++ + i = encodeVarintMcp(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.RemovedResources) > 0 { + for _, s := range m.RemovedResources { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Nonce) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(m.Nonce))) + i += copy(dAtA[i:], m.Nonce) + } + return i, nil +} + +func (m *Node) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.Metadata != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMcp(dAtA, i, uint64(m.Metadata.Size())) + n6, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *RequestResources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestResources) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Node != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMcp(dAtA, i, uint64(m.Node.Size())) + n7, err := m.Node.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if len(m.Collection) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(m.Collection))) + i += copy(dAtA[i:], m.Collection) + } + if len(m.InitialResourceVersions) > 0 { + for k, _ := range m.InitialResourceVersions { + dAtA[i] = 0x1a + i++ + v := m.InitialResourceVersions[k] + mapSize := 1 + len(k) + sovMcp(uint64(len(k))) + 1 + len(v) + sovMcp(uint64(len(v))) + i = encodeVarintMcp(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.ResponseNonce) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(m.ResponseNonce))) + i += copy(dAtA[i:], m.ResponseNonce) + } + if m.ErrorDetail != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMcp(dAtA, i, uint64(m.ErrorDetail.Size())) + n8, err := m.ErrorDetail.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} + +func (m *Resources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resources) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Collection) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(m.Collection))) + i += copy(dAtA[i:], m.Collection) + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { dAtA[i] = 0x12 i++ i = encodeVarintMcp(dAtA, i, uint64(msg.Size())) @@ -1004,8 +1669,8 @@ func (m *MeshConfigResponse) Size() (n int) { if l > 0 { n += 1 + l + sovMcp(uint64(l)) } - if len(m.Envelopes) > 0 { - for _, e := range m.Envelopes { + if len(m.Resources) > 0 { + for _, e := range m.Resources { l = e.Size() n += 1 + l + sovMcp(uint64(l)) } @@ -1058,8 +1723,8 @@ func (m *IncrementalMeshConfigResponse) Size() (n int) { if l > 0 { n += 1 + l + sovMcp(uint64(l)) } - if len(m.Envelopes) > 0 { - for _, e := range m.Envelopes { + if len(m.Resources) > 0 { + for _, e := range m.Resources { l = e.Size() n += 1 + l + sovMcp(uint64(l)) } @@ -1077,8 +1742,78 @@ func (m *IncrementalMeshConfigResponse) Size() (n int) { return n } -func sovMcp(x uint64) (n int) { - for { +func (m *Node) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovMcp(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovMcp(uint64(l)) + } + return n +} + +func (m *RequestResources) Size() (n int) { + var l int + _ = l + if m.Node != nil { + l = m.Node.Size() + n += 1 + l + sovMcp(uint64(l)) + } + l = len(m.Collection) + if l > 0 { + n += 1 + l + sovMcp(uint64(l)) + } + if len(m.InitialResourceVersions) > 0 { + for k, v := range m.InitialResourceVersions { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMcp(uint64(len(k))) + 1 + len(v) + sovMcp(uint64(len(v))) + n += mapEntrySize + 1 + sovMcp(uint64(mapEntrySize)) + } + } + l = len(m.ResponseNonce) + if l > 0 { + n += 1 + l + sovMcp(uint64(l)) + } + if m.ErrorDetail != nil { + l = m.ErrorDetail.Size() + n += 1 + l + sovMcp(uint64(l)) + } + return n +} + +func (m *Resources) Size() (n int) { + var l int + _ = l + l = len(m.Collection) + if l > 0 { + n += 1 + l + sovMcp(uint64(l)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMcp(uint64(l)) + } + } + if len(m.RemovedResources) > 0 { + for _, s := range m.RemovedResources { + l = len(s) + n += 1 + l + sovMcp(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + sovMcp(uint64(l)) + } + return n +} + +func sovMcp(x uint64) (n int) { + for { n++ x >>= 7 if x == 0 { @@ -1109,19 +1844,682 @@ func (m *Client) Unmarshal(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Client: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Client: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Client: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Client: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &google_protobuf.Struct{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMcp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMcp + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MeshConfigRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MeshConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionInfo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VersionInfo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Client == nil { + m.Client = &Client{} + } + if err := m.Client.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseNonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResponseNonce = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorDetail", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ErrorDetail == nil { + m.ErrorDetail = &google_rpc.Status{} + } + if err := m.ErrorDetail.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMcp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMcp + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MeshConfigResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MeshConfigResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MeshConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionInfo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VersionInfo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMcp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMcp + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IncrementalMeshConfigRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IncrementalMeshConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Client == nil { + m.Client = &Client{} + } + if err := m.Client.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialResourceVersions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.InitialResourceVersions == nil { + m.InitialResourceVersions = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMcp + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMcp + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMcp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMcp + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.InitialResourceVersions[mapkey] = mapvalue + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResponseNonce", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1146,11 +2544,11 @@ func (m *Client) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.ResponseNonce = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ErrorDetail", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1174,10 +2572,10 @@ func (m *Client) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Metadata == nil { - m.Metadata = &google_protobuf3.Struct{} + if m.ErrorDetail == nil { + m.ErrorDetail = &google_rpc.Status{} } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ErrorDetail.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1202,7 +2600,7 @@ func (m *Client) Unmarshal(dAtA []byte) error { } return nil } -func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { +func (m *IncrementalMeshConfigResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1225,15 +2623,15 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MeshConfigRequest: wiretype end group for non-group") + return fmt.Errorf("proto: IncrementalMeshConfigResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MeshConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IncrementalMeshConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SystemVersionInfo", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1258,11 +2656,11 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.VersionInfo = string(dAtA[iNdEx:postIndex]) + m.SystemVersionInfo = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1286,16 +2684,14 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Client == nil { - m.Client = &Client{} - } - if err := m.Client.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RemovedResources", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1320,11 +2716,11 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) + m.RemovedResources = append(m.RemovedResources, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseNonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1349,40 +2745,7 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResponseNonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorDetail", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMcp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMcp - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ErrorDetail == nil { - m.ErrorDetail = &google_rpc.Status{} - } - if err := m.ErrorDetail.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Nonce = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1405,7 +2768,7 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *MeshConfigResponse) Unmarshal(dAtA []byte) error { +func (m *Node) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1428,15 +2791,15 @@ func (m *MeshConfigResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MeshConfigResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Node: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MeshConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1461,11 +2824,11 @@ func (m *MeshConfigResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.VersionInfo = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Envelopes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1489,68 +2852,12 @@ func (m *MeshConfigResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Envelopes = append(m.Envelopes, Envelope{}) - if err := m.Envelopes[len(m.Envelopes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMcp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMcp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMcp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMcp + if m.Metadata == nil { + m.Metadata = &google_protobuf.Struct{} } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Nonce = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1573,7 +2880,7 @@ func (m *MeshConfigResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { +func (m *RequestResources) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1596,15 +2903,15 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IncrementalMeshConfigRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RequestResources: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IncrementalMeshConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestResources: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1628,16 +2935,16 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Client == nil { - m.Client = &Client{} + if m.Node == nil { + m.Node = &Node{} } - if err := m.Client.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1662,7 +2969,7 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) + m.Collection = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -1865,7 +3172,7 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *IncrementalMeshConfigResponse) Unmarshal(dAtA []byte) error { +func (m *Resources) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1888,15 +3195,15 @@ func (m *IncrementalMeshConfigResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IncrementalMeshConfigResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Resources: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IncrementalMeshConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Resources: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SystemVersionInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1921,11 +3228,11 @@ func (m *IncrementalMeshConfigResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SystemVersionInfo = string(dAtA[iNdEx:postIndex]) + m.Collection = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Envelopes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1949,8 +3256,8 @@ func (m *IncrementalMeshConfigResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Envelopes = append(m.Envelopes, Envelope{}) - if err := m.Envelopes[len(m.Envelopes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2141,45 +3448,53 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/mcp.proto", fileDescriptorMcp) } var fileDescriptorMcp = []byte{ - // 635 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x41, 0x4f, 0x13, 0x4f, - 0x14, 0x67, 0xb6, 0xc0, 0x1f, 0xa6, 0xfc, 0x09, 0x8c, 0x44, 0xb6, 0x05, 0x2b, 0x36, 0xc1, 0x34, - 0x21, 0xd9, 0x85, 0x12, 0x13, 0xe3, 0x49, 0x41, 0x0e, 0x98, 0xe0, 0x61, 0x1b, 0x39, 0x78, 0xd9, - 0x0c, 0xdb, 0xd7, 0x65, 0xe2, 0xee, 0xcc, 0x3a, 0x33, 0xdb, 0xa4, 0x1f, 0xc1, 0xf8, 0x19, 0x3c, - 0x79, 0x31, 0x7e, 0x12, 0x8e, 0x1e, 0x3c, 0x1b, 0x53, 0xbf, 0x88, 0xd9, 0xdd, 0x29, 0x2d, 0xe9, - 0x82, 0x62, 0xf4, 0x36, 0xf3, 0xde, 0x6f, 0xde, 0xfb, 0xfd, 0x7e, 0xef, 0x65, 0xf0, 0xdd, 0x38, - 0x48, 0xdc, 0xfe, 0x1e, 0x8d, 0x92, 0x73, 0xba, 0xe7, 0xc6, 0x41, 0xe2, 0x24, 0x52, 0x68, 0x41, - 0x08, 0x53, 0x9a, 0x09, 0x27, 0x0b, 0x8c, 0xb2, 0xf5, 0xcd, 0x50, 0x88, 0x30, 0x02, 0x37, 0x47, - 0x9c, 0xa5, 0x3d, 0x57, 0x69, 0x99, 0x06, 0xba, 0x78, 0x51, 0x5f, 0x37, 0x59, 0x99, 0x04, 0xae, - 0xd2, 0x54, 0xa7, 0xca, 0x24, 0xd6, 0x42, 0x11, 0x8a, 0xfc, 0xe8, 0x66, 0x27, 0x13, 0xdd, 0xb8, - 0xd2, 0x18, 0x78, 0x1f, 0x22, 0x91, 0x40, 0x91, 0x6c, 0x9e, 0xe0, 0xf9, 0xc3, 0x88, 0x01, 0xd7, - 0x64, 0x19, 0x5b, 0xac, 0x6b, 0xa3, 0x2d, 0xd4, 0x5a, 0xf4, 0x2c, 0xd6, 0x25, 0xfb, 0x78, 0x21, - 0x06, 0x4d, 0xbb, 0x54, 0x53, 0xdb, 0xda, 0x42, 0xad, 0x6a, 0x7b, 0xdd, 0x29, 0x1a, 0x3b, 0x23, - 0x5a, 0x4e, 0x27, 0xa7, 0xe5, 0x5d, 0x02, 0x9b, 0x3f, 0x10, 0x5e, 0x3d, 0x01, 0x75, 0x7e, 0x28, - 0x78, 0x8f, 0x85, 0x1e, 0xbc, 0x4d, 0x41, 0x69, 0xf2, 0x00, 0x2f, 0xf5, 0x41, 0x2a, 0x26, 0xb8, - 0xcf, 0x78, 0x4f, 0x98, 0x26, 0x55, 0x13, 0x3b, 0xe6, 0x3d, 0x41, 0xda, 0x78, 0x3e, 0xc8, 0x79, - 0x98, 0x5e, 0x75, 0x67, 0xda, 0x16, 0xa7, 0x60, 0xea, 0x19, 0x24, 0xa9, 0xe1, 0x05, 0x3d, 0x48, - 0xc0, 0x4f, 0x65, 0x64, 0x57, 0xf2, 0x92, 0xff, 0x65, 0xf7, 0x57, 0x32, 0x22, 0xdb, 0x78, 0x59, - 0x82, 0x4a, 0x04, 0x57, 0xe0, 0x73, 0xc1, 0x03, 0xb0, 0x67, 0x73, 0xc0, 0xff, 0xa3, 0xe8, 0xcb, - 0x2c, 0x48, 0x1e, 0xe1, 0x25, 0x90, 0x52, 0x48, 0xbf, 0x0b, 0x9a, 0xb2, 0xc8, 0x9e, 0xcb, 0x7b, - 0x93, 0x91, 0x4e, 0x99, 0x04, 0x4e, 0x27, 0x37, 0xd8, 0xab, 0xe6, 0xb8, 0xe7, 0x39, 0xac, 0xf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, 0xad, 0x98, 0xc4, 0x48, 0xb8, 0x2a, 0x5f, 0xbe, 0xf6, 0x07, 0x0b, 0x6f, - 0x3c, 0x0b, 0x43, 0x09, 0x21, 0xd5, 0xd0, 0x1d, 0xab, 0xea, 0x80, 0xec, 0xb3, 0x00, 0x48, 0x82, - 0x6b, 0x1d, 0x2d, 0x81, 0xc6, 0x63, 0xd0, 0xb8, 0xe4, 0x76, 0x19, 0xdd, 0xa9, 0xd5, 0xa8, 0x3f, - 0xfc, 0x15, 0xac, 0x30, 0xb0, 0x39, 0xd3, 0x42, 0xbb, 0x88, 0xbc, 0x47, 0xb8, 0x31, 0x61, 0x74, - 0x59, 0xdf, 0xdd, 0xdb, 0x6e, 0x67, 0x7d, 0xef, 0x16, 0x2f, 0x26, 0xd9, 0x1c, 0xec, 0x7c, 0x1a, - 0x36, 0xd0, 0xc5, 0xb0, 0x81, 0xbe, 0x0c, 0x1b, 0xe8, 0xfb, 0xb0, 0x81, 0x5e, 0xd7, 0x8a, 0x4a, - 0x4c, 0xb8, 0x34, 0x61, 0xee, 0xe4, 0xd7, 0x7d, 0x36, 0x9f, 0xff, 0xbb, 0xfb, 0x3f, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x7b, 0x9d, 0xce, 0x14, 0x4a, 0x06, 0x00, 0x00, + // 762 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x41, 0x4f, 0x13, 0x41, + 0x14, 0x66, 0xda, 0x82, 0x74, 0x8a, 0x04, 0x46, 0x62, 0xb7, 0x0b, 0x54, 0x6c, 0xc4, 0x34, 0xc1, + 0xec, 0x42, 0x89, 0x89, 0xf1, 0x24, 0x20, 0x07, 0x34, 0x70, 0xd8, 0x46, 0x0e, 0x5e, 0x36, 0xcb, + 0xee, 0x74, 0x99, 0xb0, 0xdd, 0x59, 0x67, 0xa6, 0x4d, 0x7a, 0xf0, 0x07, 0x10, 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0x65, 0xd8, + 0xb5, 0x04, 0x76, 0xd2, 0x2f, 0xac, 0x89, 0x59, 0x97, 0xd8, 0x18, 0x05, 0xb0, 0xd2, 0x14, 0x0c, + 0x5b, 0xed, 0xb4, 0x28, 0x6d, 0xb9, 0x9e, 0x45, 0x77, 0xec, 0x9a, 0x52, 0x1f, 0x5f, 0x55, 0x16, + 0xaf, 0xb1, 0x36, 0x55, 0x07, 0x9b, 0x00, 0x7d, 0x00, 0xb0, 0x3a, 0xf4, 0xd1, 0x67, 0xe1, 0x6e, + 0xde, 0xf4, 0xa6, 0x54, 0xb7, 0x6e, 0x70, 0x62, 0x98, 0x4d, 0xa3, 0x0b, 0xe7, 0x13, 0xdc, 0x66, + 0xf4, 0x8b, 0x1c, 0x58, 0xde, 0xe7, 0xc2, 0x3a, 0xf1, 0x08, 0x3f, 0x1d, 0xa4, 0x22, 0x89, 0xd0, + 0xa3, 0xeb, 0x7c, 0x05, 0xea, 0xea, 0xa4, 0x25, 0x73, 0x89, 0x2b, 0xe0, 0xdc, 0xa0, 0x39, 0xf1, + 0xcf, 0x26, 0xa1, 0x4e, 0xee, 0xa7, 0x5e, 0x8b, 0x54, 0x8c, 0xba, 0xbb, 0xf1, 0xb9, 0x5f, 0x05, + 0x17, 0xfd, 0x2a, 0xf8, 0xd6, 0xaf, 0x82, 0x9f, 0xfd, 0x2a, 0x78, 0x5b, 0x89, 0x0f, 0x13, 0xaa, + 0x5b, 0x01, 0xd1, 0x87, 0xff, 0x34, 0x9d, 0xcc, 0x44, 0x97, 0xd2, 0xf6, 0xef, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x31, 0xab, 0x22, 0xb4, 0xc4, 0x09, 0x00, 0x00, } diff --git a/mcp/v1alpha1/mcp.proto b/mcp/v1alpha1/mcp.proto index 9730430c9c..47d2a9df23 100644 --- a/mcp/v1alpha1/mcp.proto +++ b/mcp/v1alpha1/mcp.proto @@ -19,7 +19,7 @@ package istio.mcp.v1alpha1; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "gogoproto/gogo.proto"; -import "mcp/v1alpha1/envelope.proto"; +import "mcp/v1alpha1/resource.proto"; option go_package="istio.io/api/mcp/v1alpha1"; option (gogoproto.equal_all) = true; @@ -78,13 +78,13 @@ message MeshConfigResponse { // The version of the response data. string version_info = 1; - // The response resources wrapped in the common MCP *Envelope* + // The response resources wrapped in the common MCP *Resource* // message. - repeated Envelope envelopes = 2 [(gogoproto.nullable) = false]; + repeated Resource resources = 2 [(gogoproto.nullable) = false]; - // Type URL for resources wrapped in the provided envelope(s). This + // Type URL for resources wrapped in the provided resources(s). This // must be consistent with the type_url in the wrapper messages if - // envelopes is non-empty. + // resources is non-empty. string type_url = 3; // The nonce provides a way to explicitly ack a specific @@ -152,7 +152,7 @@ message IncrementalMeshConfigResponse { // The response resources wrapped in the common MCP *Envelope* // message. These are typed resources that match the type url in the // IncrementalMeshConfigRequest. - repeated Envelope envelopes = 2 [(gogoproto.nullable) = false]; + repeated Resource resources = 2 [(gogoproto.nullable) = false]; // Resources names of resources that have be deleted and to be // removed from the MCP Client. Removed resources for missing @@ -184,3 +184,119 @@ service AggregatedMeshConfigService { returns (stream IncrementalMeshConfigResponse) { } } + +/////////////////////////////////////////////////////////////////////////// +// +// MCP enhancements below. Remove AggregatedMeshConfigService once mcp +// packages migrate over to the enhanced version. Note that we don't bump +// the proto package version because MCP has not shipped yet. +// +/////////////////////////////////////////////////////////////////////////// + +// Identifies a specific MCP sink node instance. The node identifier is +// presented to the resource source, which may use this identifier +// to distinguish per sink configuration for serving. This +// information is not authoritative. Authoritative identity should come +// from the underlying transport layer (e.g. rpc credentials). +message Node { + // An opaque identifier for the MCP client. + string id = 1; + + // Opaque metadata extending the node identifier. + google.protobuf.Struct metadata = 2; +} + +// A RequestResource can be sent in two situations: +// +// Initial message in an MCP bidirectional change stream +// As an ACK or NACK response to a previous Resources. In +// this case the response_nonce is set to the nonce value +// in the Resources. ACK/NACK is determined by the presence +// of error_detail. +message RequestResources { + // An opaque identifier and generic set of labels to identify the MCP sink node. + Node node = 1; + + // Type of resource collection that is being requested, e.g. + // + // istio/networking/v1alpha3/VirtualService + // k8s// + string collection = 2; + + // When the RequestResources is the first in a stream, the initial_resource_versions must + // be populated. Otherwise, initial_resource_versions must be omitted. The keys are the + // resources names of the MCP resources known to the MCP client. The values in the map + // are the associated resource level version info. + map initial_resource_versions = 3; + + // When the RequestResources is an ACK or NACK message in response to a previous RequestResources, + // the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must + // be omitted. + string response_nonce = 4; + + // This is populated when the previously received resources could not be applied + // The *message* field in *error_details* provides the source internal exception + // related to the failure. + google.rpc.Status error_detail = 5; +} + +// Resources do not need to include a full snapshot of the tracked +// resources. Instead they are a diff to the state of a MCP client. +// Per resource versions allow sources and sinks to track state at +// the resource granularity. An MCP incremental session is always +// in the context of a gRPC bidirectional stream. This allows the +// MCP source to keep track of the state of MCP sink connected to +// it. +// +// In Incremental MCP the nonce field is required and used to pair +// Resources to an RequestResources ACK or NACK. +message Resources { + // Type of resource collection that is being requested, e.g. + // + // istio/networking/v1alpha3/VirtualService + // k8s// + string collection = 1; + + // The response resources wrapped in the common MCP *Resource* message. + // These are typed resources that match the type url in the + // RequestResources message. + repeated Resource resources = 2 [(gogoproto.nullable) = false]; + + // Names of resources that have been deleted and to be + // removed from the MCP sink node. Removed resources for missing + // resources can be ignored. + repeated string removed_resources = 3; + + // Required. The nonce provides a way for RequestChange to uniquely + // reference a RequestResources. + string nonce = 4; +} + +// ResourceSource and ResourceSink services are semantically +// equivalent with regards to the message exchange. The only meaningful +// difference is who initiates the connection and opens the stream. The +// following high-level overview applies to both service variants. +// +// After the connection and streams have been established, the sink sends +// a RequestResource messages to request the initial set of resources. The +// source sends a Resource message when new resources are available for the +// requested type. In response, the sink sends another RequestResource +// to ACK/NACK the received resources and request the next set of resources. + +// Service where the sink is the gRPC client. The sink is responsible for +// initiating connections and opening streams. +service ResourceSource { + // The sink, acting as gRPC client, establishes a new resource stream + // with the source. The sink sends RequestResources message to + // and receives Resources messages from the source. + rpc EstablishResourceStream(stream RequestResources) returns (stream Resources) {} +} + +// Service where the source is the gRPC client. The source is responsible for +// initiating connections and opening streams. +service ResourceSink { + // The source, acting as gRPC client, establishes a new resource stream + // with the sink. The sink sends RequestResources message to and + // receives Resources messages from the source. + rpc EstablishResourceStream(stream Resources) returns (stream RequestResources) {} +} diff --git a/mcp/v1alpha1/metadata.pb.go b/mcp/v1alpha1/metadata.pb.go index 97555f1cf2..fb70e9dc52 100644 --- a/mcp/v1alpha1/metadata.pb.go +++ b/mcp/v1alpha1/metadata.pb.go @@ -7,7 +7,8 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import google_protobuf2 "github.com/gogo/protobuf/types" +import google_protobuf3 "github.com/gogo/protobuf/types" +import google_protobuf "github.com/gogo/protobuf/types" import io "io" @@ -18,16 +19,34 @@ var _ = math.Inf // Metadata information that all resources within the Mesh Configuration Protocol must have. type Metadata struct { - // The name of the resource. It is unique within the context of a - // resource type and the origin server of the resource. The resource - // type is identified by the TypeUrl of the resource field of the - // Envelope message. + // Fully qualified name of the resource. Unique in context of a collection. + // + // The FQ name consists of path segments which includes the resources + // location in a resource hierarchy. On k8s, this hierarchy is + // two-levels: cluster and namespace, e.g. + // + // namespaced => / + // cluster-scoped => / # alt: reserved namespace (e.g. :cluster, :global) + // + // Deeper hierarchy could also be represented, e.g. + // + // // + // + // “/” should be used as the standard delimiter. The rightmost segment is + // the most specific identifier (e.g. leaf). Segments moving towards the left + // represent higher positions in the resource hierarchy. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The creation timestamp of the resource. - CreateTime *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime" json:"create_time,omitempty"` - // The resource level version. It allows MCP to track the state of - // individual resources. + CreateTime *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime" json:"create_time,omitempty"` + // Resource version. This is used to determine when resources change across + // resource updates. It should be treated as opaque by consumers/sinks. Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + // Map of string keys and values that can be used to organize and categorize + // resources within a collection. + Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Structured data that can be used by source and sink to communicate arbitrary + // metadata about this resource. + Annotations *google_protobuf.Struct `protobuf:"bytes,5,opt,name=annotations" json:"annotations,omitempty"` } func (m *Metadata) Reset() { *m = Metadata{} } @@ -42,7 +61,7 @@ func (m *Metadata) GetName() string { return "" } -func (m *Metadata) GetCreateTime() *google_protobuf2.Timestamp { +func (m *Metadata) GetCreateTime() *google_protobuf3.Timestamp { if m != nil { return m.CreateTime } @@ -56,6 +75,20 @@ func (m *Metadata) GetVersion() string { return "" } +func (m *Metadata) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *Metadata) GetAnnotations() *google_protobuf.Struct { + if m != nil { + return m.Annotations + } + return nil +} + func init() { proto.RegisterType((*Metadata)(nil), "istio.mcp.v1alpha1.Metadata") } @@ -87,6 +120,17 @@ func (this *Metadata) Equal(that interface{}) bool { if this.Version != that1.Version { return false } + if len(this.Labels) != len(that1.Labels) { + return false + } + for i := range this.Labels { + if this.Labels[i] != that1.Labels[i] { + return false + } + } + if !this.Annotations.Equal(that1.Annotations) { + return false + } return true } func (m *Metadata) Marshal() (dAtA []byte, err error) { @@ -126,6 +170,33 @@ func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMetadata(dAtA, i, uint64(len(m.Version))) i += copy(dAtA[i:], m.Version) } + if len(m.Labels) > 0 { + for k, _ := range m.Labels { + dAtA[i] = 0x22 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovMetadata(uint64(len(k))) + 1 + len(v) + sovMetadata(uint64(len(v))) + i = encodeVarintMetadata(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMetadata(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMetadata(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.Annotations != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMetadata(dAtA, i, uint64(m.Annotations.Size())) + n2, err := m.Annotations.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } return i, nil } @@ -153,6 +224,18 @@ func (m *Metadata) Size() (n int) { if l > 0 { n += 1 + l + sovMetadata(uint64(l)) } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMetadata(uint64(len(k))) + 1 + len(v) + sovMetadata(uint64(len(v))) + n += mapEntrySize + 1 + sovMetadata(uint64(mapEntrySize)) + } + } + if m.Annotations != nil { + l = m.Annotations.Size() + n += 1 + l + sovMetadata(uint64(l)) + } return n } @@ -254,7 +337,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.CreateTime == nil { - m.CreateTime = &google_protobuf2.Timestamp{} + m.CreateTime = &google_protobuf3.Timestamp{} } if err := m.CreateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -289,6 +372,157 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetadata + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMetadata + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMetadata + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMetadata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetadata + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetadata + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = &google_protobuf.Struct{} + } + if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMetadata(dAtA[iNdEx:]) @@ -418,19 +652,26 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/metadata.proto", fileDescriptorMetadata) } var fileDescriptorMetadata = []byte{ - // 220 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0xbf, 0x4e, 0xc5, 0x20, - 0x18, 0xc5, 0x83, 0x1a, 0xff, 0x70, 0x37, 0xe2, 0x80, 0x35, 0xc1, 0x1b, 0xa7, 0x26, 0x26, 0x90, - 0xea, 0xe8, 0xe6, 0xee, 0xd2, 0x38, 0xb9, 0x98, 0xaf, 0x15, 0x91, 0xa4, 0xf4, 0x23, 0x2d, 0xed, - 0x33, 0xf9, 0x28, 0x8e, 0x3e, 0x82, 0xe1, 0x49, 0x4c, 0x41, 0x92, 0xbb, 0x9d, 0x03, 0x3f, 0x7e, - 0xe4, 0xd0, 0x6b, 0xd7, 0x7b, 0xb5, 0x36, 0x30, 0xf8, 0x4f, 0x68, 0x94, 0xd3, 0x01, 0xde, 0x21, - 0x80, 0xf4, 0x13, 0x06, 0x64, 0xcc, 0xce, 0xc1, 0xa2, 0x74, 0xbd, 0x97, 0x05, 0xa9, 0x2e, 0x0d, - 0x1a, 0x4c, 0xd7, 0x6a, 0x4b, 0x99, 0xac, 0x6e, 0x0c, 0xa2, 0x19, 0xb4, 0x4a, 0xad, 0x5b, 0x3e, - 0x54, 0xb0, 0x4e, 0xcf, 0x01, 0x9c, 0xcf, 0xc0, 0xed, 0x42, 0xcf, 0x9f, 0xff, 0xe5, 0x8c, 0xd1, - 0x93, 0x11, 0x9c, 0xe6, 0x64, 0x4f, 0xea, 0x8b, 0x36, 0x65, 0xf6, 0x48, 0x77, 0xfd, 0xa4, 0x21, - 0xe8, 0xb7, 0xed, 0x25, 0x3f, 0xda, 0x93, 0x7a, 0x77, 0x5f, 0xc9, 0xac, 0x95, 0x45, 0x2b, 0x5f, - 0x8a, 0xb6, 0xa5, 0x19, 0xdf, 0x0e, 0x18, 0xa7, 0x67, 0xab, 0x9e, 0x66, 0x8b, 0x23, 0x3f, 0x4e, - 0xce, 0x52, 0x9f, 0xee, 0xbe, 0xa2, 0x20, 0xdf, 0x51, 0x90, 0x9f, 0x28, 0xc8, 0x6f, 0x14, 0xe4, - 0xf5, 0x2a, 0x6f, 0xb2, 0xa8, 0xc0, 0x5b, 0x75, 0xb8, 0xbe, 0x3b, 0x4d, 0xdf, 0x3c, 0xfc, 0x05, - 0x00, 0x00, 0xff, 0xff, 0x35, 0xb5, 0xd4, 0xb9, 0x14, 0x01, 0x00, 0x00, + // 321 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xcd, 0x4a, 0xc3, 0x40, + 0x14, 0x85, 0x99, 0xfe, 0x69, 0x27, 0x1b, 0x19, 0x0a, 0xc6, 0x28, 0xb1, 0xb8, 0x0a, 0x08, 0x33, + 0xb4, 0x6e, 0xac, 0x6e, 0x44, 0x70, 0xa7, 0x9b, 0xe8, 0xca, 0x8d, 0xdc, 0xc6, 0x31, 0x0e, 0x26, + 0x99, 0x90, 0xb9, 0x2d, 0xf4, 0x8d, 0xdc, 0xf8, 0x1e, 0x2e, 0x7d, 0x04, 0xc9, 0x93, 0x48, 0x66, + 0x12, 0x28, 0x76, 0x77, 0x4f, 0xee, 0x97, 0x73, 0xcf, 0x61, 0xe8, 0x71, 0x9e, 0x94, 0x62, 0x3d, + 0x83, 0xac, 0x7c, 0x87, 0x99, 0xc8, 0x25, 0xc2, 0x2b, 0x20, 0xf0, 0xb2, 0xd2, 0xa8, 0x19, 0x53, + 0x06, 0x95, 0xe6, 0x79, 0x52, 0xf2, 0x0e, 0x09, 0x26, 0xa9, 0x4e, 0xb5, 0x5d, 0x8b, 0x66, 0x72, + 0x64, 0x70, 0x9a, 0x6a, 0x9d, 0x66, 0x52, 0x58, 0xb5, 0x5c, 0xbd, 0x09, 0x54, 0xb9, 0x34, 0x08, + 0x79, 0xd9, 0x02, 0x27, 0xff, 0x01, 0x83, 0xd5, 0x2a, 0x41, 0xb7, 0x3d, 0xfb, 0xea, 0xd1, 0xfd, + 0x87, 0xf6, 0x36, 0x63, 0x74, 0x50, 0x40, 0x2e, 0x7d, 0x32, 0x25, 0xd1, 0x38, 0xb6, 0x33, 0xbb, + 0xa6, 0x5e, 0x52, 0x49, 0x40, 0xf9, 0xd2, 0x18, 0xfb, 0xbd, 0x29, 0x89, 0xbc, 0x79, 0xc0, 0x9d, + 0x29, 0xef, 0x4c, 0xf9, 0x53, 0x77, 0x35, 0xa6, 0x0e, 0x6f, 0x3e, 0x30, 0x9f, 0xee, 0xad, 0x65, + 0x65, 0x94, 0x2e, 0xfc, 0xbe, 0xf5, 0xec, 0x24, 0xbb, 0xa1, 0xa3, 0x0c, 0x96, 0x32, 0x33, 0xfe, + 0x60, 0xda, 0x8f, 0xbc, 0x79, 0xc4, 0x77, 0x1b, 0xf3, 0x2e, 0x18, 0xbf, 0xb7, 0xe8, 0x5d, 0x81, + 0xd5, 0x26, 0x6e, 0xff, 0x63, 0x0b, 0xea, 0x41, 0x51, 0x68, 0x04, 0x54, 0xba, 0x30, 0xfe, 0xd0, + 0x06, 0x3b, 0xdc, 0x09, 0xf6, 0x68, 0xdb, 0xc6, 0xdb, 0x6c, 0xb0, 0xa0, 0xde, 0x96, 0x23, 0x3b, + 0xa0, 0xfd, 0x0f, 0xb9, 0x69, 0x5b, 0x37, 0x23, 0x9b, 0xd0, 0xe1, 0x1a, 0xb2, 0x95, 0xab, 0x3b, + 0x8e, 0x9d, 0xb8, 0xea, 0x5d, 0x92, 0xdb, 0xf3, 0xcf, 0x3a, 0x24, 0xdf, 0x75, 0x48, 0x7e, 0xea, + 0x90, 0xfc, 0xd6, 0x21, 0x79, 0x3e, 0x72, 0xc1, 0x95, 0x16, 0x50, 0x2a, 0xb1, 0xfd, 0xa8, 0xcb, + 0x91, 0x4d, 0x71, 0xf1, 0x17, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0d, 0xfb, 0x92, 0xeb, 0x01, 0x00, + 0x00, } diff --git a/mcp/v1alpha1/metadata.proto b/mcp/v1alpha1/metadata.proto index 823d991774..744a5e479f 100644 --- a/mcp/v1alpha1/metadata.proto +++ b/mcp/v1alpha1/metadata.proto @@ -18,22 +18,43 @@ package istio.mcp.v1alpha1; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/struct.proto"; option go_package="istio.io/api/mcp/v1alpha1"; option (gogoproto.equal_all) = true; // Metadata information that all resources within the Mesh Configuration Protocol must have. message Metadata { - // The name of the resource. It is unique within the context of a - // resource type and the origin server of the resource. The resource - // type is identified by the TypeUrl of the resource field of the - // Envelope message. + // Fully qualified name of the resource. Unique in context of a collection. + // + // The FQ name consists of path segments which includes the resources + // location in a resource hierarchy. On k8s, this hierarchy is + // two-levels: cluster and namespace, e.g. + // + // namespaced => / + // cluster-scoped => / # alt: reserved namespace (e.g. :cluster, :global) + // + // Deeper hierarchy could also be represented, e.g. + // + // // + // + // “/” should be used as the standard delimiter. The rightmost segment is + // the most specific identifier (e.g. leaf). Segments moving towards the left + // represent higher positions in the resource hierarchy. string name = 1; // The creation timestamp of the resource. google.protobuf.Timestamp create_time = 2; - // The resource level version. It allows MCP to track the state of - // individual resources. + // Resource version. This is used to determine when resources change across + // resource updates. It should be treated as opaque by consumers/sinks. string version = 3; + + // Map of string keys and values that can be used to organize and categorize + // resources within a collection. + map labels = 4; + + // Structured data that can be used by source and sink to communicate arbitrary + // metadata about this resource. + google.protobuf.Struct annotations = 5; } diff --git a/mcp/v1alpha1/envelope.pb.go b/mcp/v1alpha1/resource.pb.go similarity index 56% rename from mcp/v1alpha1/envelope.pb.go rename to mcp/v1alpha1/resource.pb.go index 3eae73c787..76b81d88b4 100644 --- a/mcp/v1alpha1/envelope.pb.go +++ b/mcp/v1alpha1/resource.pb.go @@ -1,31 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mcp/v1alpha1/envelope.proto +// source: mcp/v1alpha1/resource.proto -/* - Package v1alpha1 is a generated protocol buffer package. - - This package defines the common, core types used by the Mesh Configuration Protocol. - - It is generated from these files: - mcp/v1alpha1/envelope.proto - mcp/v1alpha1/mcp.proto - mcp/v1alpha1/metadata.proto - - It has these top-level messages: - Envelope - Client - MeshConfigRequest - MeshConfigResponse - IncrementalMeshConfigRequest - IncrementalMeshConfigResponse - Metadata -*/ package v1alpha1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/gogo/protobuf/types" +import google_protobuf1 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/gogoproto" import io "io" @@ -35,51 +16,45 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// Envelope for a configuration resource as transferred via the Mesh Configuration Protocol. -// Each envelope is made up of common metadata, and a type-specific resource payload. -type Envelope struct { +// Resource for a resource as transferred via the Mesh Configuration Protocol. Each +// resource is made up of common metadata, and a type-specific resource payload. +type Resource struct { // Common metadata describing the resource. Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` // The resource itself. - Resource *google_protobuf.Any `protobuf:"bytes,2,opt,name=resource" json:"resource,omitempty"` + Body *google_protobuf1.Any `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"` } -func (m *Envelope) Reset() { *m = Envelope{} } -func (m *Envelope) String() string { return proto.CompactTextString(m) } -func (*Envelope) ProtoMessage() {} -func (*Envelope) Descriptor() ([]byte, []int) { return fileDescriptorEnvelope, []int{0} } +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { return fileDescriptorResource, []int{0} } -func (m *Envelope) GetMetadata() *Metadata { +func (m *Resource) GetMetadata() *Metadata { if m != nil { return m.Metadata } return nil } -func (m *Envelope) GetResource() *google_protobuf.Any { +func (m *Resource) GetBody() *google_protobuf1.Any { if m != nil { - return m.Resource + return m.Body } return nil } func init() { - proto.RegisterType((*Envelope)(nil), "istio.mcp.v1alpha1.Envelope") + proto.RegisterType((*Resource)(nil), "istio.mcp.v1alpha1.Resource") } -func (this *Envelope) Equal(that interface{}) bool { +func (this *Resource) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Envelope) + that1, ok := that.(*Resource) if !ok { - that2, ok := that.(Envelope) + that2, ok := that.(Resource) if ok { that1 = &that2 } else { @@ -94,12 +69,12 @@ func (this *Envelope) Equal(that interface{}) bool { if !this.Metadata.Equal(that1.Metadata) { return false } - if !this.Resource.Equal(that1.Resource) { + if !this.Body.Equal(that1.Body) { return false } return true } -func (m *Envelope) Marshal() (dAtA []byte, err error) { +func (m *Resource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -109,7 +84,7 @@ func (m *Envelope) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { +func (m *Resource) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -117,18 +92,18 @@ func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { if m.Metadata != nil { dAtA[i] = 0xa i++ - i = encodeVarintEnvelope(dAtA, i, uint64(m.Metadata.Size())) + i = encodeVarintResource(dAtA, i, uint64(m.Metadata.Size())) n1, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } - if m.Resource != nil { + if m.Body != nil { dAtA[i] = 0x12 i++ - i = encodeVarintEnvelope(dAtA, i, uint64(m.Resource.Size())) - n2, err := m.Resource.MarshalTo(dAtA[i:]) + i = encodeVarintResource(dAtA, i, uint64(m.Body.Size())) + n2, err := m.Body.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -137,7 +112,7 @@ func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeVarintEnvelope(dAtA []byte, offset int, v uint64) int { +func encodeVarintResource(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 @@ -146,21 +121,21 @@ func encodeVarintEnvelope(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *Envelope) Size() (n int) { +func (m *Resource) Size() (n int) { var l int _ = l if m.Metadata != nil { l = m.Metadata.Size() - n += 1 + l + sovEnvelope(uint64(l)) + n += 1 + l + sovResource(uint64(l)) } - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovEnvelope(uint64(l)) + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovResource(uint64(l)) } return n } -func sovEnvelope(x uint64) (n int) { +func sovResource(x uint64) (n int) { for { n++ x >>= 7 @@ -170,10 +145,10 @@ func sovEnvelope(x uint64) (n int) { } return n } -func sozEnvelope(x uint64) (n int) { - return sovEnvelope(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozResource(x uint64) (n int) { + return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Envelope) Unmarshal(dAtA []byte) error { +func (m *Resource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -181,7 +156,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEnvelope + return ErrIntOverflowResource } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -196,10 +171,10 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Envelope: wiretype end group for non-group") + return fmt.Errorf("proto: Resource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Envelope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -209,7 +184,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEnvelope + return ErrIntOverflowResource } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -222,7 +197,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEnvelope + return ErrInvalidLengthResource } postIndex := iNdEx + msglen if postIndex > l { @@ -237,12 +212,12 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowEnvelope + return ErrIntOverflowResource } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -255,27 +230,27 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthEnvelope + return ErrInvalidLengthResource } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - if m.Resource == nil { - m.Resource = &google_protobuf.Any{} + if m.Body == nil { + m.Body = &google_protobuf1.Any{} } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipEnvelope(dAtA[iNdEx:]) + skippy, err := skipResource(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthEnvelope + return ErrInvalidLengthResource } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -289,14 +264,14 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { } return nil } -func skipEnvelope(dAtA []byte) (n int, err error) { +func skipResource(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEnvelope + return 0, ErrIntOverflowResource } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -313,7 +288,7 @@ func skipEnvelope(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEnvelope + return 0, ErrIntOverflowResource } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -331,7 +306,7 @@ func skipEnvelope(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEnvelope + return 0, ErrIntOverflowResource } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -345,7 +320,7 @@ func skipEnvelope(dAtA []byte) (n int, err error) { } iNdEx += length if length < 0 { - return 0, ErrInvalidLengthEnvelope + return 0, ErrInvalidLengthResource } return iNdEx, nil case 3: @@ -354,7 +329,7 @@ func skipEnvelope(dAtA []byte) (n int, err error) { var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowEnvelope + return 0, ErrIntOverflowResource } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -370,7 +345,7 @@ func skipEnvelope(dAtA []byte) (n int, err error) { if innerWireType == 4 { break } - next, err := skipEnvelope(dAtA[start:]) + next, err := skipResource(dAtA[start:]) if err != nil { return 0, err } @@ -390,26 +365,25 @@ func skipEnvelope(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthEnvelope = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEnvelope = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("mcp/v1alpha1/envelope.proto", fileDescriptorEnvelope) } +func init() { proto.RegisterFile("mcp/v1alpha1/resource.proto", fileDescriptorResource) } -var fileDescriptorEnvelope = []byte{ - // 211 bytes of a gzipped FileDescriptorProto +var fileDescriptorResource = []byte{ + // 207 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xce, 0x4d, 0x2e, 0xd0, - 0x2f, 0x33, 0x4c, 0xcc, 0x29, 0xc8, 0x48, 0x34, 0xd4, 0x4f, 0xcd, 0x2b, 0x4b, 0xcd, 0xc9, 0x2f, - 0x48, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xca, 0x2c, 0x2e, 0xc9, 0xcc, 0xd7, 0xcb, + 0x2f, 0x33, 0x4c, 0xcc, 0x29, 0xc8, 0x48, 0x34, 0xd4, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, + 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xca, 0x2c, 0x2e, 0xc9, 0xcc, 0xd7, 0xcb, 0x4d, 0x2e, 0xd0, 0x83, 0x29, 0x91, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x07, 0xab, 0x48, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0x84, 0x28, 0x97, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, 0xa8, 0x28, 0xaa, 0x0d, 0xb9, 0xa9, 0x25, 0x89, 0x29, 0x89, 0x25, 0x89, - 0x10, 0x49, 0xa5, 0x32, 0x2e, 0x0e, 0x57, 0xa8, 0x9d, 0x42, 0x16, 0x5c, 0x1c, 0x30, 0x59, 0x09, + 0x10, 0x49, 0xa5, 0x3c, 0x2e, 0x8e, 0x20, 0xa8, 0x9d, 0x42, 0x16, 0x5c, 0x1c, 0x30, 0x59, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x19, 0x3d, 0x4c, 0x07, 0xe8, 0xf9, 0x42, 0xd5, 0x04, 0xc1, - 0x55, 0x0b, 0x19, 0x70, 0x71, 0x14, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, 0xa7, 0x4a, 0x30, 0x81, - 0x75, 0x8a, 0xe8, 0x41, 0x9c, 0xa9, 0x07, 0x73, 0xa6, 0x9e, 0x63, 0x5e, 0x65, 0x10, 0x5c, 0x95, - 0x93, 0xf6, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, - 0x91, 0x1c, 0x63, 0x94, 0x24, 0xc4, 0xaa, 0xcc, 0x7c, 0xfd, 0xc4, 0x82, 0x4c, 0x7d, 0x64, 0x37, - 0x27, 0xb1, 0x81, 0x0d, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x02, 0xf2, 0x13, 0xb4, 0x2c, - 0x01, 0x00, 0x00, + 0x55, 0x0b, 0x69, 0x70, 0xb1, 0x24, 0xe5, 0xa7, 0x54, 0x4a, 0x30, 0x81, 0x75, 0x89, 0xe8, 0x41, + 0x9c, 0xa8, 0x07, 0x73, 0xa2, 0x9e, 0x63, 0x5e, 0x65, 0x10, 0x58, 0x85, 0x93, 0xf6, 0x8a, 0x47, + 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, + 0x24, 0xc4, 0x8a, 0xcc, 0x7c, 0xfd, 0xc4, 0x82, 0x4c, 0x7d, 0x64, 0xb7, 0x26, 0xb1, 0x81, 0x0d, + 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xae, 0x63, 0x31, 0x24, 0x01, 0x00, 0x00, } diff --git a/mcp/v1alpha1/envelope.proto b/mcp/v1alpha1/resource.proto similarity index 81% rename from mcp/v1alpha1/envelope.proto rename to mcp/v1alpha1/resource.proto index 28ba4ca8ef..2d9d7eb7e4 100644 --- a/mcp/v1alpha1/envelope.proto +++ b/mcp/v1alpha1/resource.proto @@ -24,12 +24,12 @@ import "mcp/v1alpha1/metadata.proto"; option go_package="istio.io/api/mcp/v1alpha1"; option (gogoproto.equal_all) = true; -// Envelope for a configuration resource as transferred via the Mesh Configuration Protocol. -// Each envelope is made up of common metadata, and a type-specific resource payload. -message Envelope { +// Resource for a resource as transferred via the Mesh Configuration Protocol. Each +// resource is made up of common metadata, and a type-specific resource payload. +message Resource { // Common metadata describing the resource. istio.mcp.v1alpha1.Metadata metadata = 1; // The resource itself. - google.protobuf.Any resource = 2; + google.protobuf.Any body = 2; } diff --git a/proto.lock b/proto.lock index b9415c777f..e6052b7593 100644 --- a/proto.lock +++ b/proto.lock @@ -418,11 +418,11 @@ } }, { - "protopath": "mcp:/:v1alpha1:/:envelope.proto", + "protopath": "mcp:/:v1alpha1:/:resource.proto", "def": { "messages": [ { - "name": "Envelope", + "name": "Resource", "fields": [ { "id": 1, @@ -431,7 +431,7 @@ }, { "id": 2, - "name": "resource", + "name": "body", "type": "google.protobuf.Any" } ] @@ -498,8 +498,8 @@ }, { "id": 2, - "name": "envelopes", - "type": "Envelope", + "name": "resources", + "type": "Resource", "is_repeated": true }, { @@ -559,8 +559,85 @@ }, { "id": 2, - "name": "envelopes", - "type": "Envelope", + "name": "resources", + "type": "Resource", + "is_repeated": true + }, + { + "id": 3, + "name": "removed_resources", + "type": "string", + "is_repeated": true + }, + { + "id": 4, + "name": "nonce", + "type": "string" + } + ] + }, + { + "name": "Node", + "fields": [ + { + "id": 1, + "name": "id", + "type": "string" + }, + { + "id": 2, + "name": "metadata", + "type": "google.protobuf.Struct" + } + ] + }, + { + "name": "RequestResources", + "fields": [ + { + "id": 1, + "name": "node", + "type": "Node" + }, + { + "id": 2, + "name": "collection", + "type": "string" + }, + { + "id": 4, + "name": "response_nonce", + "type": "string" + }, + { + "id": 5, + "name": "error_detail", + "type": "google.rpc.Status" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "initial_resource_versions", + "type": "string" + } + } + ] + }, + { + "name": "Resources", + "fields": [ + { + "id": 1, + "name": "collection", + "type": "string" + }, + { + "id": 2, + "name": "resources", + "type": "Resource", "is_repeated": true }, { @@ -596,6 +673,30 @@ "out_streamed": true } ] + }, + { + "name": "ResourceSource", + "rpcs": [ + { + "name": "EstablishResourceStream", + "in_type": "RequestResources", + "out_type": "Resources", + "in_streamed": true, + "out_streamed": true + } + ] + }, + { + "name": "ResourceSink", + "rpcs": [ + { + "name": "EstablishResourceStream", + "in_type": "Resources", + "out_type": "RequestResources", + "in_streamed": true, + "out_streamed": true + } + ] } ] } @@ -621,6 +722,21 @@ "id": 3, "name": "version", "type": "string" + }, + { + "id": 5, + "name": "annotations", + "type": "google.protobuf.Struct" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 4, + "name": "labels", + "type": "string" + } } ] } @@ -4702,4 +4818,4 @@ } } ] -} \ No newline at end of file +} diff --git a/python/istio_api/mcp/v1alpha1/envelope_pb2.py b/python/istio_api/mcp/v1alpha1/envelope_pb2.py index 7357c432b9..1979a8b0ed 100644 --- a/python/istio_api/mcp/v1alpha1/envelope_pb2.py +++ b/python/istio_api/mcp/v1alpha1/envelope_pb2.py @@ -22,29 +22,29 @@ name='mcp/v1alpha1/envelope.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x1bmcp/v1alpha1/envelope.proto\x12\x12istio.mcp.v1alpha1\x1a\x19google/protobuf/any.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/metadata.proto\"b\n\x08\x45nvelope\x12.\n\x08metadata\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.Metadata\x12&\n\x08resource\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x1bmcp/v1alpha1/envelope.proto\x12\x12istio.mcp.v1alpha1\x1a\x19google/protobuf/any.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/metadata.proto\"^\n\x08Resource\x12.\n\x08metadata\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.Metadata\x12\"\n\x04\x62ody\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_metadata__pb2.DESCRIPTOR,]) -_ENVELOPE = _descriptor.Descriptor( - name='Envelope', - full_name='istio.mcp.v1alpha1.Envelope', +_RESOURCE = _descriptor.Descriptor( + name='Resource', + full_name='istio.mcp.v1alpha1.Resource', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='metadata', full_name='istio.mcp.v1alpha1.Envelope.metadata', index=0, + name='metadata', full_name='istio.mcp.v1alpha1.Resource.metadata', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='resource', full_name='istio.mcp.v1alpha1.Envelope.resource', index=1, + name='body', full_name='istio.mcp.v1alpha1.Resource.body', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -63,20 +63,20 @@ oneofs=[ ], serialized_start=129, - serialized_end=227, + serialized_end=223, ) -_ENVELOPE.fields_by_name['metadata'].message_type = mcp_dot_v1alpha1_dot_metadata__pb2._METADATA -_ENVELOPE.fields_by_name['resource'].message_type = google_dot_protobuf_dot_any__pb2._ANY -DESCRIPTOR.message_types_by_name['Envelope'] = _ENVELOPE +_RESOURCE.fields_by_name['metadata'].message_type = mcp_dot_v1alpha1_dot_metadata__pb2._METADATA +_RESOURCE.fields_by_name['body'].message_type = google_dot_protobuf_dot_any__pb2._ANY +DESCRIPTOR.message_types_by_name['Resource'] = _RESOURCE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Envelope = _reflection.GeneratedProtocolMessageType('Envelope', (_message.Message,), dict( - DESCRIPTOR = _ENVELOPE, +Resource = _reflection.GeneratedProtocolMessageType('Resource', (_message.Message,), dict( + DESCRIPTOR = _RESOURCE, __module__ = 'mcp.v1alpha1.envelope_pb2' - # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Envelope) + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Resource) )) -_sym_db.RegisterMessage(Envelope) +_sym_db.RegisterMessage(Resource) DESCRIPTOR.has_options = True diff --git a/python/istio_api/mcp/v1alpha1/mcp_pb2.py b/python/istio_api/mcp/v1alpha1/mcp_pb2.py index f49155f7a6..74eb48394f 100644 --- a/python/istio_api/mcp/v1alpha1/mcp_pb2.py +++ b/python/istio_api/mcp/v1alpha1/mcp_pb2.py @@ -16,16 +16,16 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 -from mcp.v1alpha1 import envelope_pb2 as mcp_dot_v1alpha1_dot_envelope__pb2 +from mcp.v1alpha1 import resource_pb2 as mcp_dot_v1alpha1_dot_resource__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='mcp/v1alpha1/mcp.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/envelope.proto\"?\n\x06\x43lient\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa9\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12*\n\x06\x63lient\x18\x02 \x01(\x0b\x32\x1a.istio.mcp.v1alpha1.Client\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tenvelopes\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.EnvelopeB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xd0\x02\n\x1cIncrementalMeshConfigRequest\x12*\n\x06\x63lient\x18\x01 \x01(\x0b\x32\x1a.istio.mcp.v1alpha1.Client\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tenvelopes\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.EnvelopeB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"?\n\x06\x43lient\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa9\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12*\n\x06\x63lient\x18\x02 \x01(\x0b\x32\x1a.istio.mcp.v1alpha1.Client\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xd0\x02\n\x1cIncrementalMeshConfigRequest\x12*\n\x06\x63lient\x18\x01 \x01(\x0b\x32\x1a.istio.mcp.v1alpha1.Client\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"=\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xb6\x02\n\x10RequestResources\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\tResources\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , - dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_envelope__pb2.DESCRIPTOR,]) + dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_resource__pb2.DESCRIPTOR,]) @@ -142,7 +142,7 @@ is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='envelopes', full_name='istio.mcp.v1alpha1.MeshConfigResponse.envelopes', index=1, + name='resources', full_name='istio.mcp.v1alpha1.MeshConfigResponse.resources', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -290,7 +290,7 @@ is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='envelopes', full_name='istio.mcp.v1alpha1.IncrementalMeshConfigResponse.envelopes', index=1, + name='resources', full_name='istio.mcp.v1alpha1.IncrementalMeshConfigResponse.resources', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -326,20 +326,215 @@ serialized_end=1019, ) + +_NODE = _descriptor.Descriptor( + name='Node', + full_name='istio.mcp.v1alpha1.Node', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='istio.mcp.v1alpha1.Node.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='metadata', full_name='istio.mcp.v1alpha1.Node.metadata', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1021, + serialized_end=1082, +) + + +_REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY = _descriptor.Descriptor( + name='InitialResourceVersionsEntry', + full_name='istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=797, + serialized_end=859, +) + +_REQUESTRESOURCES = _descriptor.Descriptor( + name='RequestResources', + full_name='istio.mcp.v1alpha1.RequestResources', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='node', full_name='istio.mcp.v1alpha1.RequestResources.node', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='collection', full_name='istio.mcp.v1alpha1.RequestResources.collection', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='initial_resource_versions', full_name='istio.mcp.v1alpha1.RequestResources.initial_resource_versions', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='response_nonce', full_name='istio.mcp.v1alpha1.RequestResources.response_nonce', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='error_detail', full_name='istio.mcp.v1alpha1.RequestResources.error_detail', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1085, + serialized_end=1395, +) + + +_RESOURCES = _descriptor.Descriptor( + name='Resources', + full_name='istio.mcp.v1alpha1.Resources', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='collection', full_name='istio.mcp.v1alpha1.Resources.collection', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='resources', full_name='istio.mcp.v1alpha1.Resources.resources', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='removed_resources', full_name='istio.mcp.v1alpha1.Resources.removed_resources', index=2, + number=3, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='nonce', full_name='istio.mcp.v1alpha1.Resources.nonce', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1398, + serialized_end=1526, +) + _CLIENT.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _MESHCONFIGREQUEST.fields_by_name['client'].message_type = _CLIENT _MESHCONFIGREQUEST.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS -_MESHCONFIGRESPONSE.fields_by_name['envelopes'].message_type = mcp_dot_v1alpha1_dot_envelope__pb2._ENVELOPE +_MESHCONFIGRESPONSE.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY.containing_type = _INCREMENTALMESHCONFIGREQUEST _INCREMENTALMESHCONFIGREQUEST.fields_by_name['client'].message_type = _CLIENT _INCREMENTALMESHCONFIGREQUEST.fields_by_name['initial_resource_versions'].message_type = _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY _INCREMENTALMESHCONFIGREQUEST.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS -_INCREMENTALMESHCONFIGRESPONSE.fields_by_name['envelopes'].message_type = mcp_dot_v1alpha1_dot_envelope__pb2._ENVELOPE +_INCREMENTALMESHCONFIGRESPONSE.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE +_NODE.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY.containing_type = _REQUESTRESOURCES +_REQUESTRESOURCES.fields_by_name['node'].message_type = _NODE +_REQUESTRESOURCES.fields_by_name['initial_resource_versions'].message_type = _REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY +_REQUESTRESOURCES.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS +_RESOURCES.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE DESCRIPTOR.message_types_by_name['Client'] = _CLIENT DESCRIPTOR.message_types_by_name['MeshConfigRequest'] = _MESHCONFIGREQUEST DESCRIPTOR.message_types_by_name['MeshConfigResponse'] = _MESHCONFIGRESPONSE DESCRIPTOR.message_types_by_name['IncrementalMeshConfigRequest'] = _INCREMENTALMESHCONFIGREQUEST DESCRIPTOR.message_types_by_name['IncrementalMeshConfigResponse'] = _INCREMENTALMESHCONFIGRESPONSE +DESCRIPTOR.message_types_by_name['Node'] = _NODE +DESCRIPTOR.message_types_by_name['RequestResources'] = _REQUESTRESOURCES +DESCRIPTOR.message_types_by_name['Resources'] = _RESOURCES _sym_db.RegisterFileDescriptor(DESCRIPTOR) Client = _reflection.GeneratedProtocolMessageType('Client', (_message.Message,), dict( @@ -385,15 +580,48 @@ )) _sym_db.RegisterMessage(IncrementalMeshConfigResponse) +Node = _reflection.GeneratedProtocolMessageType('Node', (_message.Message,), dict( + DESCRIPTOR = _NODE, + __module__ = 'mcp.v1alpha1.mcp_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Node) + )) +_sym_db.RegisterMessage(Node) + +RequestResources = _reflection.GeneratedProtocolMessageType('RequestResources', (_message.Message,), dict( + + InitialResourceVersionsEntry = _reflection.GeneratedProtocolMessageType('InitialResourceVersionsEntry', (_message.Message,), dict( + DESCRIPTOR = _REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY, + __module__ = 'mcp.v1alpha1.mcp_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry) + )) + , + DESCRIPTOR = _REQUESTRESOURCES, + __module__ = 'mcp.v1alpha1.mcp_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.RequestResources) + )) +_sym_db.RegisterMessage(RequestResources) +_sym_db.RegisterMessage(RequestResources.InitialResourceVersionsEntry) + +Resources = _reflection.GeneratedProtocolMessageType('Resources', (_message.Message,), dict( + DESCRIPTOR = _RESOURCES, + __module__ = 'mcp.v1alpha1.mcp_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Resources) + )) +_sym_db.RegisterMessage(Resources) + DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\031istio.io/api/mcp/v1alpha1\250\342\036\001')) -_MESHCONFIGRESPONSE.fields_by_name['envelopes'].has_options = True -_MESHCONFIGRESPONSE.fields_by_name['envelopes']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) +_MESHCONFIGRESPONSE.fields_by_name['resources'].has_options = True +_MESHCONFIGRESPONSE.fields_by_name['resources']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY.has_options = True _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -_INCREMENTALMESHCONFIGRESPONSE.fields_by_name['envelopes'].has_options = True -_INCREMENTALMESHCONFIGRESPONSE.fields_by_name['envelopes']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) +_INCREMENTALMESHCONFIGRESPONSE.fields_by_name['resources'].has_options = True +_INCREMENTALMESHCONFIGRESPONSE.fields_by_name['resources']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) +_REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY.has_options = True +_REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) +_RESOURCES.fields_by_name['resources'].has_options = True +_RESOURCES.fields_by_name['resources']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) _AGGREGATEDMESHCONFIGSERVICE = _descriptor.ServiceDescriptor( name='AggregatedMeshConfigService', @@ -401,8 +629,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=1022, - serialized_end=1307, + serialized_start=1529, + serialized_end=1814, methods=[ _descriptor.MethodDescriptor( name='StreamAggregatedResources', @@ -427,4 +655,52 @@ DESCRIPTOR.services_by_name['AggregatedMeshConfigService'] = _AGGREGATEDMESHCONFIGSERVICE + +_RESOURCESOURCE = _descriptor.ServiceDescriptor( + name='ResourceSource', + full_name='istio.mcp.v1alpha1.ResourceSource', + file=DESCRIPTOR, + index=1, + options=None, + serialized_start=1816, + serialized_end=1934, + methods=[ + _descriptor.MethodDescriptor( + name='EstablishResourceStream', + full_name='istio.mcp.v1alpha1.ResourceSource.EstablishResourceStream', + index=0, + containing_service=None, + input_type=_REQUESTRESOURCES, + output_type=_RESOURCES, + options=None, + ), +]) +_sym_db.RegisterServiceDescriptor(_RESOURCESOURCE) + +DESCRIPTOR.services_by_name['ResourceSource'] = _RESOURCESOURCE + + +_RESOURCESINK = _descriptor.ServiceDescriptor( + name='ResourceSink', + full_name='istio.mcp.v1alpha1.ResourceSink', + file=DESCRIPTOR, + index=2, + options=None, + serialized_start=1936, + serialized_end=2052, + methods=[ + _descriptor.MethodDescriptor( + name='EstablishResourceStream', + full_name='istio.mcp.v1alpha1.ResourceSink.EstablishResourceStream', + index=0, + containing_service=None, + input_type=_RESOURCES, + output_type=_REQUESTRESOURCES, + options=None, + ), +]) +_sym_db.RegisterServiceDescriptor(_RESOURCESINK) + +DESCRIPTOR.services_by_name['ResourceSink'] = _RESOURCESINK + # @@protoc_insertion_point(module_scope) diff --git a/python/istio_api/mcp/v1alpha1/metadata_pb2.py b/python/istio_api/mcp/v1alpha1/metadata_pb2.py index 0ed149b579..9931bf246f 100644 --- a/python/istio_api/mcp/v1alpha1/metadata_pb2.py +++ b/python/istio_api/mcp/v1alpha1/metadata_pb2.py @@ -15,19 +15,57 @@ from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='mcp/v1alpha1/metadata.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Z\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\tB\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf1\x01\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.istio.mcp.v1alpha1.Metadata.LabelsEntry\x12,\n\x0b\x61nnotations\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , - dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) +_METADATA_LABELSENTRY = _descriptor.Descriptor( + name='LabelsEntry', + full_name='istio.mcp.v1alpha1.Metadata.LabelsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='istio.mcp.v1alpha1.Metadata.LabelsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='istio.mcp.v1alpha1.Metadata.LabelsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=333, + serialized_end=378, +) + _METADATA = _descriptor.Descriptor( name='Metadata', full_name='istio.mcp.v1alpha1.Metadata', @@ -56,10 +94,24 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='labels', full_name='istio.mcp.v1alpha1.Metadata.labels', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='annotations', full_name='istio.mcp.v1alpha1.Metadata.annotations', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), ], extensions=[ ], - nested_types=[], + nested_types=[_METADATA_LABELSENTRY, ], enum_types=[ ], options=None, @@ -68,22 +120,35 @@ extension_ranges=[], oneofs=[ ], - serialized_start=106, - serialized_end=196, + serialized_start=137, + serialized_end=378, ) +_METADATA_LABELSENTRY.containing_type = _METADATA _METADATA.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_METADATA.fields_by_name['labels'].message_type = _METADATA_LABELSENTRY +_METADATA.fields_by_name['annotations'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT DESCRIPTOR.message_types_by_name['Metadata'] = _METADATA _sym_db.RegisterFileDescriptor(DESCRIPTOR) Metadata = _reflection.GeneratedProtocolMessageType('Metadata', (_message.Message,), dict( + + LabelsEntry = _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), dict( + DESCRIPTOR = _METADATA_LABELSENTRY, + __module__ = 'mcp.v1alpha1.metadata_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Metadata.LabelsEntry) + )) + , DESCRIPTOR = _METADATA, __module__ = 'mcp.v1alpha1.metadata_pb2' # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Metadata) )) _sym_db.RegisterMessage(Metadata) +_sym_db.RegisterMessage(Metadata.LabelsEntry) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\031istio.io/api/mcp/v1alpha1\250\342\036\001')) +_METADATA_LABELSENTRY.has_options = True +_METADATA_LABELSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) # @@protoc_insertion_point(module_scope) From 816885e71c89e817650bb044c89accf0c260c5bb Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 11:01:29 -0800 Subject: [PATCH 02/14] fix linter error --- prototool.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prototool.yaml b/prototool.yaml index 57e67aac35..ebf22bd55b 100644 --- a/prototool.yaml +++ b/prototool.yaml @@ -13,6 +13,9 @@ lint: - id: ENUM_FIELD_NAMES_UPPER_SNAKE_CASE files: - networking/v1alpha3/gateway.proto + - id: REQUEST_RESPONSE_TYPES_UNIQUE + files: + - mcp/v1alpha1/mcp.proto # Linter rules. rules: From 8ae6267797c806af9ff2ce299df9e69c6410106a Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 11:03:28 -0800 Subject: [PATCH 03/14] add missing generated file --- python/istio_api/mcp/v1alpha1/resource_pb2.py | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 python/istio_api/mcp/v1alpha1/resource_pb2.py diff --git a/python/istio_api/mcp/v1alpha1/resource_pb2.py b/python/istio_api/mcp/v1alpha1/resource_pb2.py new file mode 100644 index 0000000000..ce5615342d --- /dev/null +++ b/python/istio_api/mcp/v1alpha1/resource_pb2.py @@ -0,0 +1,84 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: mcp/v1alpha1/resource.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 +from mcp.v1alpha1 import metadata_pb2 as mcp_dot_v1alpha1_dot_metadata__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='mcp/v1alpha1/resource.proto', + package='istio.mcp.v1alpha1', + syntax='proto3', + serialized_pb=_b('\n\x1bmcp/v1alpha1/resource.proto\x12\x12istio.mcp.v1alpha1\x1a\x19google/protobuf/any.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/metadata.proto\"^\n\x08Resource\x12.\n\x08metadata\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.Metadata\x12\"\n\x04\x62ody\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + , + dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_metadata__pb2.DESCRIPTOR,]) + + + + +_RESOURCE = _descriptor.Descriptor( + name='Resource', + full_name='istio.mcp.v1alpha1.Resource', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='metadata', full_name='istio.mcp.v1alpha1.Resource.metadata', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='body', full_name='istio.mcp.v1alpha1.Resource.body', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=129, + serialized_end=223, +) + +_RESOURCE.fields_by_name['metadata'].message_type = mcp_dot_v1alpha1_dot_metadata__pb2._METADATA +_RESOURCE.fields_by_name['body'].message_type = google_dot_protobuf_dot_any__pb2._ANY +DESCRIPTOR.message_types_by_name['Resource'] = _RESOURCE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Resource = _reflection.GeneratedProtocolMessageType('Resource', (_message.Message,), dict( + DESCRIPTOR = _RESOURCE, + __module__ = 'mcp.v1alpha1.resource_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Resource) + )) +_sym_db.RegisterMessage(Resource) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\031istio.io/api/mcp/v1alpha1\250\342\036\001')) +# @@protoc_insertion_point(module_scope) From 01e7d5977030bfa9b54960c02f38a25fe043c575 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 11:05:30 -0800 Subject: [PATCH 04/14] proto-commit --- proto.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/proto.lock b/proto.lock index e6052b7593..1341a510cd 100644 --- a/proto.lock +++ b/proto.lock @@ -417,28 +417,6 @@ ] } }, - { - "protopath": "mcp:/:v1alpha1:/:resource.proto", - "def": { - "messages": [ - { - "name": "Resource", - "fields": [ - { - "id": 1, - "name": "metadata", - "type": "istio.mcp.v1alpha1.Metadata" - }, - { - "id": 2, - "name": "body", - "type": "google.protobuf.Any" - } - ] - } - ] - } - }, { "protopath": "mcp:/:v1alpha1:/:mcp.proto", "def": { @@ -743,6 +721,28 @@ ] } }, + { + "protopath": "mcp:/:v1alpha1:/:resource.proto", + "def": { + "messages": [ + { + "name": "Resource", + "fields": [ + { + "id": 1, + "name": "metadata", + "type": "istio.mcp.v1alpha1.Metadata" + }, + { + "id": 2, + "name": "body", + "type": "google.protobuf.Any" + } + ] + } + ] + } + }, { "protopath": "mesh:/:v1alpha1:/:config.proto", "def": { @@ -4818,4 +4818,4 @@ } } ] -} +} \ No newline at end of file From 7bdd87d93049745b794d9ccb03e3835c8686e746 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 11:06:34 -0800 Subject: [PATCH 05/14] remove python/istio_api/mcp/v1alpha1/envelope_pb2.py --- python/istio_api/mcp/v1alpha1/envelope_pb2.py | 84 ------------------- 1 file changed, 84 deletions(-) delete mode 100644 python/istio_api/mcp/v1alpha1/envelope_pb2.py diff --git a/python/istio_api/mcp/v1alpha1/envelope_pb2.py b/python/istio_api/mcp/v1alpha1/envelope_pb2.py deleted file mode 100644 index 1979a8b0ed..0000000000 --- a/python/istio_api/mcp/v1alpha1/envelope_pb2.py +++ /dev/null @@ -1,84 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mcp/v1alpha1/envelope.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 -from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 -from mcp.v1alpha1 import metadata_pb2 as mcp_dot_v1alpha1_dot_metadata__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='mcp/v1alpha1/envelope.proto', - package='istio.mcp.v1alpha1', - syntax='proto3', - serialized_pb=_b('\n\x1bmcp/v1alpha1/envelope.proto\x12\x12istio.mcp.v1alpha1\x1a\x19google/protobuf/any.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/metadata.proto\"^\n\x08Resource\x12.\n\x08metadata\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.Metadata\x12\"\n\x04\x62ody\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') - , - dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_metadata__pb2.DESCRIPTOR,]) - - - - -_RESOURCE = _descriptor.Descriptor( - name='Resource', - full_name='istio.mcp.v1alpha1.Resource', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='metadata', full_name='istio.mcp.v1alpha1.Resource.metadata', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='body', full_name='istio.mcp.v1alpha1.Resource.body', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=129, - serialized_end=223, -) - -_RESOURCE.fields_by_name['metadata'].message_type = mcp_dot_v1alpha1_dot_metadata__pb2._METADATA -_RESOURCE.fields_by_name['body'].message_type = google_dot_protobuf_dot_any__pb2._ANY -DESCRIPTOR.message_types_by_name['Resource'] = _RESOURCE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Resource = _reflection.GeneratedProtocolMessageType('Resource', (_message.Message,), dict( - DESCRIPTOR = _RESOURCE, - __module__ = 'mcp.v1alpha1.envelope_pb2' - # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Resource) - )) -_sym_db.RegisterMessage(Resource) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\031istio.io/api/mcp/v1alpha1\250\342\036\001')) -# @@protoc_insertion_point(module_scope) From 6d699553c0ed1fb0fa02a63a73e0678f61f465c7 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 11:12:22 -0800 Subject: [PATCH 06/14] s/envelope/resource --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 2 +- mcp/v1alpha1/mcp.pb.go | 2 +- mcp/v1alpha1/mcp.proto | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index e685c02f8b..cda6a15aca 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -198,7 +198,7 @@

IncrementalMeshConfigResponse

- - - + + + - - - + + + diff --git a/mcp/v1alpha1/mcp.pb.go b/mcp/v1alpha1/mcp.pb.go index 77109b2576..84e750a62e 100644 --- a/mcp/v1alpha1/mcp.pb.go +++ b/mcp/v1alpha1/mcp.pb.go @@ -10,12 +10,11 @@ mcp/v1alpha1/resource.proto It has these top-level messages: - Client + Node MeshConfigRequest MeshConfigResponse IncrementalMeshConfigRequest IncrementalMeshConfigResponse - Node RequestResources Resources Metadata @@ -46,31 +45,31 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -// Identifies a specific MCP client instance. The client identifier is -// presented to the management server, which may use this identifier -// to distinguish per client configuration for serving. This -// information is not authoriative. Authoritative identity should come +// Identifies a specific MCP sink node instance. The node identifier is +// presented to the resource source, which may use this identifier +// to distinguish per sink configuration for serving. This +// information is not authoritative. Authoritative identity should come // from the underlying transport layer (e.g. rpc credentials). -type Client struct { +type Node struct { // An opaque identifier for the MCP client. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Opaque metadata extending the client identifier. + // Opaque metadata extending the node identifier. Metadata *google_protobuf.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` } -func (m *Client) Reset() { *m = Client{} } -func (m *Client) String() string { return proto.CompactTextString(m) } -func (*Client) ProtoMessage() {} -func (*Client) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{0} } +func (m *Node) Reset() { *m = Node{} } +func (m *Node) String() string { return proto.CompactTextString(m) } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{0} } -func (m *Client) GetId() string { +func (m *Node) GetId() string { if m != nil { return m.Id } return "" } -func (m *Client) GetMetadata() *google_protobuf.Struct { +func (m *Node) GetMetadata() *google_protobuf.Struct { if m != nil { return m.Metadata } @@ -89,8 +88,8 @@ type MeshConfigRequest struct { // the previous API config version respectively. Each type_url (see // below) has an independent version associated with it. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The client making the request. - Client *Client `protobuf:"bytes,2,opt,name=client" json:"client,omitempty"` + // The node making the request. + Node *Node `protobuf:"bytes,2,opt,name=node" json:"node,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". TypeUrl string `protobuf:"bytes,3,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` @@ -120,9 +119,9 @@ func (m *MeshConfigRequest) GetVersionInfo() string { return "" } -func (m *MeshConfigRequest) GetClient() *Client { +func (m *MeshConfigRequest) GetNode() *Node { if m != nil { - return m.Client + return m.Node } return nil } @@ -213,7 +212,7 @@ func (m *MeshConfigResponse) GetNonce() string { // ACK or NACK is determined by the absence or presence of error_detail. type IncrementalMeshConfigRequest struct { // The client making the request. - Client *Client `protobuf:"bytes,1,opt,name=client" json:"client,omitempty"` + Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` @@ -239,9 +238,9 @@ func (m *IncrementalMeshConfigRequest) String() string { return proto func (*IncrementalMeshConfigRequest) ProtoMessage() {} func (*IncrementalMeshConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{3} } -func (m *IncrementalMeshConfigRequest) GetClient() *Client { +func (m *IncrementalMeshConfigRequest) GetNode() *Node { if m != nil { - return m.Client + return m.Node } return nil } @@ -336,37 +335,6 @@ func (m *IncrementalMeshConfigResponse) GetNonce() string { return "" } -// Identifies a specific MCP sink node instance. The node identifier is -// presented to the resource source, which may use this identifier -// to distinguish per sink configuration for serving. This -// information is not authoritative. Authoritative identity should come -// from the underlying transport layer (e.g. rpc credentials). -type Node struct { - // An opaque identifier for the MCP client. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Opaque metadata extending the node identifier. - Metadata *google_protobuf.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` -} - -func (m *Node) Reset() { *m = Node{} } -func (m *Node) String() string { return proto.CompactTextString(m) } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{5} } - -func (m *Node) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Node) GetMetadata() *google_protobuf.Struct { - if m != nil { - return m.Metadata - } - return nil -} - // A RequestResource can be sent in two situations: // // Initial message in an MCP bidirectional change stream @@ -400,7 +368,7 @@ type RequestResources struct { func (m *RequestResources) Reset() { *m = RequestResources{} } func (m *RequestResources) String() string { return proto.CompactTextString(m) } func (*RequestResources) ProtoMessage() {} -func (*RequestResources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{6} } +func (*RequestResources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{5} } func (m *RequestResources) GetNode() *Node { if m != nil { @@ -469,7 +437,7 @@ type Resources struct { func (m *Resources) Reset() { *m = Resources{} } func (m *Resources) String() string { return proto.CompactTextString(m) } func (*Resources) ProtoMessage() {} -func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{7} } +func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{6} } func (m *Resources) GetCollection() string { if m != nil { @@ -500,23 +468,22 @@ func (m *Resources) GetNonce() string { } func init() { - proto.RegisterType((*Client)(nil), "istio.mcp.v1alpha1.Client") + proto.RegisterType((*Node)(nil), "istio.mcp.v1alpha1.Node") proto.RegisterType((*MeshConfigRequest)(nil), "istio.mcp.v1alpha1.MeshConfigRequest") proto.RegisterType((*MeshConfigResponse)(nil), "istio.mcp.v1alpha1.MeshConfigResponse") proto.RegisterType((*IncrementalMeshConfigRequest)(nil), "istio.mcp.v1alpha1.IncrementalMeshConfigRequest") proto.RegisterType((*IncrementalMeshConfigResponse)(nil), "istio.mcp.v1alpha1.IncrementalMeshConfigResponse") - proto.RegisterType((*Node)(nil), "istio.mcp.v1alpha1.Node") proto.RegisterType((*RequestResources)(nil), "istio.mcp.v1alpha1.RequestResources") proto.RegisterType((*Resources)(nil), "istio.mcp.v1alpha1.Resources") } -func (this *Client) Equal(that interface{}) bool { +func (this *Node) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Client) + that1, ok := that.(*Node) if !ok { - that2, ok := that.(Client) + that2, ok := that.(Node) if ok { that1 = &that2 } else { @@ -558,7 +525,7 @@ func (this *MeshConfigRequest) Equal(that interface{}) bool { if this.VersionInfo != that1.VersionInfo { return false } - if !this.Client.Equal(that1.Client) { + if !this.Node.Equal(that1.Node) { return false } if this.TypeUrl != that1.TypeUrl { @@ -629,7 +596,7 @@ func (this *IncrementalMeshConfigRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Client.Equal(that1.Client) { + if !this.Node.Equal(that1.Node) { return false } if this.TypeUrl != that1.TypeUrl { @@ -694,33 +661,6 @@ func (this *IncrementalMeshConfigResponse) Equal(that interface{}) bool { } return true } -func (this *Node) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Id != that1.Id { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - return true -} func (this *RequestResources) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1193,7 +1133,7 @@ var _ResourceSink_serviceDesc = grpc.ServiceDesc{ Metadata: "mcp/v1alpha1/mcp.proto", } -func (m *Client) Marshal() (dAtA []byte, err error) { +func (m *Node) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1203,7 +1143,7 @@ func (m *Client) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Client) MarshalTo(dAtA []byte) (int, error) { +func (m *Node) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1248,11 +1188,11 @@ func (m *MeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMcp(dAtA, i, uint64(len(m.VersionInfo))) i += copy(dAtA[i:], m.VersionInfo) } - if m.Client != nil { + if m.Node != nil { dAtA[i] = 0x12 i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Client.Size())) - n2, err := m.Client.MarshalTo(dAtA[i:]) + i = encodeVarintMcp(dAtA, i, uint64(m.Node.Size())) + n2, err := m.Node.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1346,11 +1286,11 @@ func (m *IncrementalMeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Client != nil { + if m.Node != nil { dAtA[i] = 0xa i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Client.Size())) - n4, err := m.Client.MarshalTo(dAtA[i:]) + i = encodeVarintMcp(dAtA, i, uint64(m.Node.Size())) + n4, err := m.Node.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1455,40 +1395,6 @@ func (m *IncrementalMeshConfigResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *Node) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMcp(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if m.Metadata != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Metadata.Size())) - n6, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - return i, nil -} - func (m *RequestResources) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1508,11 +1414,11 @@ func (m *RequestResources) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintMcp(dAtA, i, uint64(m.Node.Size())) - n7, err := m.Node.MarshalTo(dAtA[i:]) + n6, err := m.Node.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n6 } if len(m.Collection) > 0 { dAtA[i] = 0x12 @@ -1547,11 +1453,11 @@ func (m *RequestResources) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintMcp(dAtA, i, uint64(m.ErrorDetail.Size())) - n8, err := m.ErrorDetail.MarshalTo(dAtA[i:]) + n7, err := m.ErrorDetail.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n7 } return i, nil } @@ -1622,7 +1528,7 @@ func encodeVarintMcp(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *Client) Size() (n int) { +func (m *Node) Size() (n int) { var l int _ = l l = len(m.Id) @@ -1643,8 +1549,8 @@ func (m *MeshConfigRequest) Size() (n int) { if l > 0 { n += 1 + l + sovMcp(uint64(l)) } - if m.Client != nil { - l = m.Client.Size() + if m.Node != nil { + l = m.Node.Size() n += 1 + l + sovMcp(uint64(l)) } l = len(m.TypeUrl) @@ -1689,8 +1595,8 @@ func (m *MeshConfigResponse) Size() (n int) { func (m *IncrementalMeshConfigRequest) Size() (n int) { var l int _ = l - if m.Client != nil { - l = m.Client.Size() + if m.Node != nil { + l = m.Node.Size() n += 1 + l + sovMcp(uint64(l)) } l = len(m.TypeUrl) @@ -1742,20 +1648,6 @@ func (m *IncrementalMeshConfigResponse) Size() (n int) { return n } -func (m *Node) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovMcp(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovMcp(uint64(l)) - } - return n -} - func (m *RequestResources) Size() (n int) { var l int _ = l @@ -1825,7 +1717,7 @@ func sovMcp(x uint64) (n int) { func sozMcp(x uint64) (n int) { return sovMcp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Client) Unmarshal(dAtA []byte) error { +func (m *Node) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1848,10 +1740,10 @@ func (m *Client) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Client: wiretype end group for non-group") + return fmt.Errorf("proto: Node: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Client: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1997,7 +1889,7 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2021,10 +1913,10 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Client == nil { - m.Client = &Client{} + if m.Node == nil { + m.Node = &Node{} } - if err := m.Client.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2339,7 +2231,7 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2363,10 +2255,10 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Client == nil { - m.Client = &Client{} + if m.Node == nil { + m.Node = &Node{} } - if err := m.Client.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2768,118 +2660,6 @@ func (m *IncrementalMeshConfigResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *Node) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMcp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Node: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMcp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMcp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMcp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMcp - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &google_protobuf.Struct{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMcp(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMcp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *RequestResources) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3448,53 +3228,52 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/mcp.proto", fileDescriptorMcp) } var fileDescriptorMcp = []byte{ - // 762 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x41, 0x4f, 0x13, 0x41, - 0x14, 0x66, 0xda, 0x82, 0x74, 0x8a, 0x04, 0x46, 0x62, 0xb7, 0x0b, 0x54, 0x6c, 0xc4, 0x34, 0xc1, - 0xec, 0x42, 0x89, 0x89, 0xf1, 0x24, 0x20, 0x07, 0x34, 0x70, 0xd8, 0x46, 0x0e, 0x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0x46, - 0x65, 0x05, 0x63, 0xb2, 0xfe, 0x0b, 0x5e, 0x6c, 0x7c, 0xcc, 0xc1, 0xe5, 0x1d, 0xd7, 0x65, 0xd8, - 0xb5, 0x04, 0x76, 0xd2, 0x2f, 0xac, 0x89, 0x59, 0x97, 0xd8, 0x18, 0x05, 0xb0, 0xd2, 0x14, 0x0c, - 0x5b, 0xed, 0xb4, 0x28, 0x6d, 0xb9, 0x9e, 0x45, 0x77, 0xec, 0x9a, 0x52, 0x1f, 0x5f, 0x55, 0x16, - 0xaf, 0xb1, 0x36, 0x55, 0x07, 0x9b, 0x00, 0x7d, 0x00, 0xb0, 0x3a, 0xf4, 0xd1, 0x67, 0xe1, 0x6e, - 0xde, 0xf4, 0xa6, 0x54, 0xb7, 0x6e, 0x70, 0x62, 0x98, 0x4d, 0xa3, 0x0b, 0xe7, 0x13, 0xdc, 0x66, - 0xf4, 0x8b, 0x1c, 0x58, 0xde, 0xe7, 0xc2, 0x3a, 0xf1, 0x08, 0x3f, 0x1d, 0xa4, 0x22, 0x89, 0xd0, - 0xa3, 0xeb, 0x7c, 0x05, 0xea, 0xea, 0xa4, 0x25, 0x73, 0x89, 0x2b, 0xe0, 0xdc, 0xa0, 0x39, 0xf1, - 0xcf, 0x26, 0xa1, 0x4e, 0xee, 0xa7, 0x5e, 0x8b, 0x54, 0x8c, 0xba, 0xbb, 0xf1, 0xb9, 0x5f, 0x05, - 0x17, 0xfd, 0x2a, 0xf8, 0xd6, 0xaf, 0x82, 0x9f, 0xfd, 0x2a, 0x78, 0x5b, 0x89, 0x0f, 0x13, 0xaa, - 0x5b, 0x01, 0xd1, 0x87, 0xff, 0x34, 0x9d, 0xcc, 0x44, 0x97, 0xd2, 0xf6, 0xef, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x31, 0xab, 0x22, 0xb4, 0xc4, 0x09, 0x00, 0x00, + // 741 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x4f, 0xdb, 0x48, + 0x14, 0x67, 0x92, 0xb0, 0x4b, 0x26, 0x2c, 0x82, 0x59, 0xb4, 0x71, 0x02, 0x64, 0xd9, 0x68, 0x59, + 0x45, 0x62, 0x65, 0x43, 0xd0, 0x4a, 0xab, 0x9e, 0x0a, 0x2d, 0x07, 0x5a, 0xc1, 0xc1, 0x51, 0x39, + 0xf4, 0x62, 0x19, 0xfb, 0xc5, 0x8c, 0x70, 0x3c, 0xee, 0xcc, 0x24, 0x52, 0x0e, 0xfd, 0x00, 0xa8, + 0x9f, 0x81, 0x7b, 0xd5, 0x53, 0x3f, 0x06, 0xc7, 0x1e, 0x7a, 0x6d, 0x55, 0xe5, 0x93, 0x54, 0xb6, + 0xc7, 0xf9, 0xa3, 0x98, 0x40, 0xa4, 0x56, 0xaa, 0x7a, 0xb1, 0x66, 0xde, 0xfb, 0xcd, 0xfb, 0xbd, + 0xf7, 0x7b, 0x6f, 0xac, 0xc1, 0x7f, 0x74, 0x9c, 0xd0, 0xe8, 0xed, 0xdb, 0x7e, 0x78, 0x69, 0xef, + 0x1b, 0x1d, 0x27, 0xd4, 0x43, 0xce, 0x24, 0x23, 0x84, 0x0a, 0x49, 0x99, 0x1e, 0x19, 0x52, 0x6f, + 0x75, 0xd3, 0x63, 0xcc, 0xf3, 0xc1, 0x88, 0x11, 0x17, 0xdd, 0xb6, 0x21, 0x24, 0xef, 0x3a, 0x32, + 0x39, 0x51, 0x2d, 0x2b, 0x2f, 0x0f, 0x1d, 0x43, 0x48, 0x5b, 0x76, 0x85, 0x72, 0xac, 0x7b, 0xcc, + 0x63, 0xf1, 0xd2, 0x88, 0x56, 0xca, 0xba, 0x31, 0x41, 0xcc, 0x41, 0xb0, 0x2e, 0x77, 0x20, 0x71, + 0xd6, 0x9f, 0xe3, 0xc2, 0x19, 0x73, 0x81, 0xac, 0xe0, 0x1c, 0x75, 0x35, 0xb4, 0x8d, 0x1a, 0x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, 0x69, 0x09, 0x00, 0x00, } diff --git a/mcp/v1alpha1/mcp.proto b/mcp/v1alpha1/mcp.proto index af77568fc2..badb236207 100644 --- a/mcp/v1alpha1/mcp.proto +++ b/mcp/v1alpha1/mcp.proto @@ -24,16 +24,16 @@ import "mcp/v1alpha1/resource.proto"; option go_package="istio.io/api/mcp/v1alpha1"; option (gogoproto.equal_all) = true; -// Identifies a specific MCP client instance. The client identifier is -// presented to the management server, which may use this identifier -// to distinguish per client configuration for serving. This -// information is not authoriative. Authoritative identity should come +// Identifies a specific MCP sink node instance. The node identifier is +// presented to the resource source, which may use this identifier +// to distinguish per sink configuration for serving. This +// information is not authoritative. Authoritative identity should come // from the underlying transport layer (e.g. rpc credentials). -message Client { +message Node { // An opaque identifier for the MCP client. string id = 1; - // Opaque metadata extending the client identifier. + // Opaque metadata extending the node identifier. google.protobuf.Struct metadata = 2; } @@ -50,8 +50,8 @@ message MeshConfigRequest { // below) has an independent version associated with it. string version_info = 1; - // The client making the request. - Client client = 2; + // The node making the request. + Node node = 2; // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". @@ -107,7 +107,7 @@ message MeshConfigResponse { // ACK or NACK is determined by the absence or presence of error_detail. message IncrementalMeshConfigRequest { // The client making the request. - Client client = 1; + Node node = 1; // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". @@ -193,19 +193,6 @@ service AggregatedMeshConfigService { // /////////////////////////////////////////////////////////////////////////// -// Identifies a specific MCP sink node instance. The node identifier is -// presented to the resource source, which may use this identifier -// to distinguish per sink configuration for serving. This -// information is not authoritative. Authoritative identity should come -// from the underlying transport layer (e.g. rpc credentials). -message Node { - // An opaque identifier for the MCP client. - string id = 1; - - // Opaque metadata extending the node identifier. - google.protobuf.Struct metadata = 2; -} - // A RequestResource can be sent in two situations: // // Initial message in an MCP bidirectional change stream diff --git a/proto.lock b/proto.lock index 1341a510cd..361c1d874f 100644 --- a/proto.lock +++ b/proto.lock @@ -422,7 +422,7 @@ "def": { "messages": [ { - "name": "Client", + "name": "Node", "fields": [ { "id": 1, @@ -446,8 +446,8 @@ }, { "id": 2, - "name": "client", - "type": "Client" + "name": "node", + "type": "Node" }, { "id": 3, @@ -497,8 +497,8 @@ "fields": [ { "id": 1, - "name": "client", - "type": "Client" + "name": "node", + "type": "Node" }, { "id": 2, @@ -4818,4 +4818,4 @@ } } ] -} \ No newline at end of file +} diff --git a/python/istio_api/mcp/v1alpha1/mcp_pb2.py b/python/istio_api/mcp/v1alpha1/mcp_pb2.py index 74eb48394f..76f39d6f09 100644 --- a/python/istio_api/mcp/v1alpha1/mcp_pb2.py +++ b/python/istio_api/mcp/v1alpha1/mcp_pb2.py @@ -23,29 +23,29 @@ name='mcp/v1alpha1/mcp.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"?\n\x06\x43lient\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa9\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12*\n\x06\x63lient\x18\x02 \x01(\x0b\x32\x1a.istio.mcp.v1alpha1.Client\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xd0\x02\n\x1cIncrementalMeshConfigRequest\x12*\n\x06\x63lient\x18\x01 \x01(\x0b\x32\x1a.istio.mcp.v1alpha1.Client\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"=\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xb6\x02\n\x10RequestResources\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\tResources\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"=\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa5\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12&\n\x04node\x18\x02 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xcc\x02\n\x1cIncrementalMeshConfigRequest\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xb6\x02\n\x10RequestResources\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\tResources\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_resource__pb2.DESCRIPTOR,]) -_CLIENT = _descriptor.Descriptor( - name='Client', - full_name='istio.mcp.v1alpha1.Client', +_NODE = _descriptor.Descriptor( + name='Node', + full_name='istio.mcp.v1alpha1.Node', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='id', full_name='istio.mcp.v1alpha1.Client.id', index=0, + name='id', full_name='istio.mcp.v1alpha1.Node.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='metadata', full_name='istio.mcp.v1alpha1.Client.metadata', index=1, + name='metadata', full_name='istio.mcp.v1alpha1.Node.metadata', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -64,7 +64,7 @@ oneofs=[ ], serialized_start=152, - serialized_end=215, + serialized_end=213, ) @@ -83,7 +83,7 @@ is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='client', full_name='istio.mcp.v1alpha1.MeshConfigRequest.client', index=1, + name='node', full_name='istio.mcp.v1alpha1.MeshConfigRequest.node', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -122,8 +122,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=218, - serialized_end=387, + serialized_start=216, + serialized_end=381, ) @@ -174,8 +174,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=390, - serialized_end=520, + serialized_start=384, + serialized_end=514, ) @@ -212,8 +212,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=797, - serialized_end=859, + serialized_start=787, + serialized_end=849, ) _INCREMENTALMESHCONFIGREQUEST = _descriptor.Descriptor( @@ -224,7 +224,7 @@ containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='client', full_name='istio.mcp.v1alpha1.IncrementalMeshConfigRequest.client', index=0, + name='node', full_name='istio.mcp.v1alpha1.IncrementalMeshConfigRequest.node', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -270,8 +270,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=523, - serialized_end=859, + serialized_start=517, + serialized_end=849, ) @@ -322,46 +322,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=862, - serialized_end=1019, -) - - -_NODE = _descriptor.Descriptor( - name='Node', - full_name='istio.mcp.v1alpha1.Node', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='istio.mcp.v1alpha1.Node.id', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='istio.mcp.v1alpha1.Node.metadata', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1021, - serialized_end=1082, + serialized_start=852, + serialized_end=1009, ) @@ -398,8 +360,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=797, - serialized_end=859, + serialized_start=787, + serialized_end=849, ) _REQUESTRESOURCES = _descriptor.Descriptor( @@ -456,8 +418,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1085, - serialized_end=1395, + serialized_start=1012, + serialized_end=1322, ) @@ -508,41 +470,39 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1398, - serialized_end=1526, + serialized_start=1325, + serialized_end=1453, ) -_CLIENT.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT -_MESHCONFIGREQUEST.fields_by_name['client'].message_type = _CLIENT +_NODE.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_MESHCONFIGREQUEST.fields_by_name['node'].message_type = _NODE _MESHCONFIGREQUEST.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS _MESHCONFIGRESPONSE.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY.containing_type = _INCREMENTALMESHCONFIGREQUEST -_INCREMENTALMESHCONFIGREQUEST.fields_by_name['client'].message_type = _CLIENT +_INCREMENTALMESHCONFIGREQUEST.fields_by_name['node'].message_type = _NODE _INCREMENTALMESHCONFIGREQUEST.fields_by_name['initial_resource_versions'].message_type = _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY _INCREMENTALMESHCONFIGREQUEST.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS _INCREMENTALMESHCONFIGRESPONSE.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE -_NODE.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY.containing_type = _REQUESTRESOURCES _REQUESTRESOURCES.fields_by_name['node'].message_type = _NODE _REQUESTRESOURCES.fields_by_name['initial_resource_versions'].message_type = _REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY _REQUESTRESOURCES.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS _RESOURCES.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE -DESCRIPTOR.message_types_by_name['Client'] = _CLIENT +DESCRIPTOR.message_types_by_name['Node'] = _NODE DESCRIPTOR.message_types_by_name['MeshConfigRequest'] = _MESHCONFIGREQUEST DESCRIPTOR.message_types_by_name['MeshConfigResponse'] = _MESHCONFIGRESPONSE DESCRIPTOR.message_types_by_name['IncrementalMeshConfigRequest'] = _INCREMENTALMESHCONFIGREQUEST DESCRIPTOR.message_types_by_name['IncrementalMeshConfigResponse'] = _INCREMENTALMESHCONFIGRESPONSE -DESCRIPTOR.message_types_by_name['Node'] = _NODE DESCRIPTOR.message_types_by_name['RequestResources'] = _REQUESTRESOURCES DESCRIPTOR.message_types_by_name['Resources'] = _RESOURCES _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Client = _reflection.GeneratedProtocolMessageType('Client', (_message.Message,), dict( - DESCRIPTOR = _CLIENT, +Node = _reflection.GeneratedProtocolMessageType('Node', (_message.Message,), dict( + DESCRIPTOR = _NODE, __module__ = 'mcp.v1alpha1.mcp_pb2' - # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Client) + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Node) )) -_sym_db.RegisterMessage(Client) +_sym_db.RegisterMessage(Node) MeshConfigRequest = _reflection.GeneratedProtocolMessageType('MeshConfigRequest', (_message.Message,), dict( DESCRIPTOR = _MESHCONFIGREQUEST, @@ -580,13 +540,6 @@ )) _sym_db.RegisterMessage(IncrementalMeshConfigResponse) -Node = _reflection.GeneratedProtocolMessageType('Node', (_message.Message,), dict( - DESCRIPTOR = _NODE, - __module__ = 'mcp.v1alpha1.mcp_pb2' - # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Node) - )) -_sym_db.RegisterMessage(Node) - RequestResources = _reflection.GeneratedProtocolMessageType('RequestResources', (_message.Message,), dict( InitialResourceVersionsEntry = _reflection.GeneratedProtocolMessageType('InitialResourceVersionsEntry', (_message.Message,), dict( @@ -629,8 +582,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=1529, - serialized_end=1814, + serialized_start=1456, + serialized_end=1741, methods=[ _descriptor.MethodDescriptor( name='StreamAggregatedResources', @@ -662,8 +615,8 @@ file=DESCRIPTOR, index=1, options=None, - serialized_start=1816, - serialized_end=1934, + serialized_start=1743, + serialized_end=1861, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', @@ -686,8 +639,8 @@ file=DESCRIPTOR, index=2, options=None, - serialized_start=1936, - serialized_end=2052, + serialized_start=1863, + serialized_end=1979, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', From 6b2f71453f11d1eafc8ae575473261aab403c1c6 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 11:54:49 -0800 Subject: [PATCH 08/14] make proto-commit --- proto.lock | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/proto.lock b/proto.lock index 361c1d874f..fc6ee101a3 100644 --- a/proto.lock +++ b/proto.lock @@ -554,21 +554,6 @@ } ] }, - { - "name": "Node", - "fields": [ - { - "id": 1, - "name": "id", - "type": "string" - }, - { - "id": 2, - "name": "metadata", - "type": "google.protobuf.Struct" - } - ] - }, { "name": "RequestResources", "fields": [ @@ -4818,4 +4803,4 @@ } } ] -} +} \ No newline at end of file From 071d19b761663e3a2eee31093c4034e5076dc6b7 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 12:06:55 -0800 Subject: [PATCH 09/14] fix comments --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 4 ++-- mcp/v1alpha1/resource.pb.go | 4 ++-- mcp/v1alpha1/resource.proto | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index e3a6a775d8..3ee3d9f895 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -508,7 +508,7 @@

RequestResources

Resource

-

Resource for a resource as transferred via the Mesh Configuration Protocol. Each +

Resource as transferred via the Mesh Configuration Protocol. Each resource is made up of common metadata, and a type-specific resource payload.

FieldTypeDescription
collectionstring +

Type of resource collection that is being requested, e.g.

+ +

istio/networking/v1alpha3/VirtualService +k8s//

+ +
resourcesResource[] +

The response resources wrapped in the common MCP Resource message. +These are typed resources that match the type url in the +RequestResources message.

+ +
removedResourcesstring[] +

Names of resources that have been deleted and to be +removed from the MCP sink node. Removed resources for missing +resources can be ignored.

+ +
noncestring +

Required. The nonce provides a way for RequestChange to uniquely +reference a RequestResources.

resources Resource[] -

The response resources wrapped in the common MCP Envelope +

The response resources wrapped in the common MCP Resource message. These are typed resources that match the type url in the IncrementalMeshConfigRequest.

diff --git a/mcp/v1alpha1/mcp.pb.go b/mcp/v1alpha1/mcp.pb.go index 57621588b0..77109b2576 100644 --- a/mcp/v1alpha1/mcp.pb.go +++ b/mcp/v1alpha1/mcp.pb.go @@ -289,7 +289,7 @@ func (m *IncrementalMeshConfigRequest) GetErrorDetail() *google_rpc.Status { type IncrementalMeshConfigResponse struct { // The version of the response data (used for debugging). SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` - // The response resources wrapped in the common MCP *Envelope* + // The response resources wrapped in the common MCP *Resource* // message. These are typed resources that match the type url in the // IncrementalMeshConfigRequest. Resources []Resource `protobuf:"bytes,2,rep,name=resources" json:"resources"` diff --git a/mcp/v1alpha1/mcp.proto b/mcp/v1alpha1/mcp.proto index 47d2a9df23..af77568fc2 100644 --- a/mcp/v1alpha1/mcp.proto +++ b/mcp/v1alpha1/mcp.proto @@ -149,7 +149,7 @@ message IncrementalMeshConfigResponse { // The version of the response data (used for debugging). string system_version_info = 1; - // The response resources wrapped in the common MCP *Envelope* + // The response resources wrapped in the common MCP *Resource* // message. These are typed resources that match the type url in the // IncrementalMeshConfigRequest. repeated Resource resources = 2 [(gogoproto.nullable) = false]; From 285e3703cf164aaceaa99243171360438782f041 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 11:45:49 -0800 Subject: [PATCH 07/14] s/client/node --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 52 +-- mcp/v1alpha1/mcp.pb.go | 429 ++++++----------------- mcp/v1alpha1/mcp.proto | 31 +- proto.lock | 12 +- python/istio_api/mcp/v1alpha1/mcp_pb2.py | 125 +++---- 5 files changed, 166 insertions(+), 483 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index cda6a15aca..e3a6a775d8 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -2,7 +2,7 @@ title: istio.mcp.v1alpha1 layout: protoc-gen-docs generator: protoc-gen-docs -number_of_entries: 14 +number_of_entries: 13 ---

This package defines the common, core types used by the Mesh Configuration Protocol.

@@ -52,42 +52,6 @@

ResourceSource

Types

-

Client

-
-

Identifies a specific MCP client instance. The client identifier is -presented to the management server, which may use this identifier -to distinguish per client configuration for serving. This -information is not authoriative. Authoritative identity should come -from the underlying transport layer (e.g. rpc credentials).

- - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
idstring -

An opaque identifier for the MCP client.

- -
metadatagoogle.protobuf.Struct -

Opaque metadata extending the client identifier.

- -
-

IncrementalMeshConfigRequest

IncrementalMeshConfigRequest are be sent in 2 situations:

@@ -109,9 +73,9 @@

IncrementalMeshConfigRequest

clientClient
nodeNode

The client making the request.

@@ -256,11 +220,11 @@

MeshConfigRequest

clientClient
nodeNode -

The client making the request.

+

The node making the request.

@@ -532,7 +532,7 @@

Resource

diff --git a/mcp/v1alpha1/resource.pb.go b/mcp/v1alpha1/resource.pb.go index 76b81d88b4..564415b99c 100644 --- a/mcp/v1alpha1/resource.pb.go +++ b/mcp/v1alpha1/resource.pb.go @@ -16,12 +16,12 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -// Resource for a resource as transferred via the Mesh Configuration Protocol. Each +// Resource as transferred via the Mesh Configuration Protocol. Each // resource is made up of common metadata, and a type-specific resource payload. type Resource struct { // Common metadata describing the resource. Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` - // The resource itself. + // The primary payload for the resource. Body *google_protobuf1.Any `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"` } diff --git a/mcp/v1alpha1/resource.proto b/mcp/v1alpha1/resource.proto index 2d9d7eb7e4..0698bb32bf 100644 --- a/mcp/v1alpha1/resource.proto +++ b/mcp/v1alpha1/resource.proto @@ -24,12 +24,12 @@ import "mcp/v1alpha1/metadata.proto"; option go_package="istio.io/api/mcp/v1alpha1"; option (gogoproto.equal_all) = true; -// Resource for a resource as transferred via the Mesh Configuration Protocol. Each +// Resource as transferred via the Mesh Configuration Protocol. Each // resource is made up of common metadata, and a type-specific resource payload. message Resource { // Common metadata describing the resource. istio.mcp.v1alpha1.Metadata metadata = 1; - // The resource itself. + // The primary payload for the resource. google.protobuf.Any body = 2; } From 4e0bcc12db92835418247aa16a62e3e5f1888a3a Mon Sep 17 00:00:00 2001 From: Jason Young Date: Fri, 21 Dec 2018 15:02:45 -0800 Subject: [PATCH 10/14] add system_version_info for compatibility with non-incremental MCP --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 8 ++ mcp/v1alpha1/mcp.pb.go | 161 +++++++++++++++-------- mcp/v1alpha1/mcp.proto | 11 +- proto.lock | 11 +- python/istio_api/mcp/v1alpha1/mcp_pb2.py | 37 +++--- 5 files changed, 151 insertions(+), 77 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index 3ee3d9f895..b96cb20252 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -561,6 +561,14 @@

Resources

+ + + + + diff --git a/mcp/v1alpha1/mcp.pb.go b/mcp/v1alpha1/mcp.pb.go index 84e750a62e..2b32878c24 100644 --- a/mcp/v1alpha1/mcp.pb.go +++ b/mcp/v1alpha1/mcp.pb.go @@ -416,22 +416,24 @@ func (m *RequestResources) GetErrorDetail() *google_rpc.Status { // In Incremental MCP the nonce field is required and used to pair // Resources to an RequestResources ACK or NACK. type Resources struct { + // The version of the response data (used for debugging). + SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` // Type of resource collection that is being requested, e.g. // // istio/networking/v1alpha3/VirtualService // k8s// - Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` + Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` // The response resources wrapped in the common MCP *Resource* message. // These are typed resources that match the type url in the // RequestResources message. - Resources []Resource `protobuf:"bytes,2,rep,name=resources" json:"resources"` + Resources []Resource `protobuf:"bytes,3,rep,name=resources" json:"resources"` // Names of resources that have been deleted and to be // removed from the MCP sink node. Removed resources for missing // resources can be ignored. - RemovedResources []string `protobuf:"bytes,3,rep,name=removed_resources,json=removedResources" json:"removed_resources,omitempty"` + RemovedResources []string `protobuf:"bytes,4,rep,name=removed_resources,json=removedResources" json:"removed_resources,omitempty"` // Required. The nonce provides a way for RequestChange to uniquely // reference a RequestResources. - Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` } func (m *Resources) Reset() { *m = Resources{} } @@ -439,6 +441,13 @@ func (m *Resources) String() string { return proto.CompactTextString( func (*Resources) ProtoMessage() {} func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{6} } +func (m *Resources) GetSystemVersionInfo() string { + if m != nil { + return m.SystemVersionInfo + } + return "" +} + func (m *Resources) GetCollection() string { if m != nil { return m.Collection @@ -721,6 +730,9 @@ func (this *Resources) Equal(that interface{}) bool { } else if this == nil { return false } + if this.SystemVersionInfo != that1.SystemVersionInfo { + return false + } if this.Collection != that1.Collection { return false } @@ -1477,15 +1489,21 @@ func (m *Resources) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Collection) > 0 { + if len(m.SystemVersionInfo) > 0 { dAtA[i] = 0xa i++ + i = encodeVarintMcp(dAtA, i, uint64(len(m.SystemVersionInfo))) + i += copy(dAtA[i:], m.SystemVersionInfo) + } + if len(m.Collection) > 0 { + dAtA[i] = 0x12 + i++ i = encodeVarintMcp(dAtA, i, uint64(len(m.Collection))) i += copy(dAtA[i:], m.Collection) } if len(m.Resources) > 0 { for _, msg := range m.Resources { - dAtA[i] = 0x12 + dAtA[i] = 0x1a i++ i = encodeVarintMcp(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) @@ -1497,7 +1515,7 @@ func (m *Resources) MarshalTo(dAtA []byte) (int, error) { } if len(m.RemovedResources) > 0 { for _, s := range m.RemovedResources { - dAtA[i] = 0x1a + dAtA[i] = 0x22 i++ l = len(s) for l >= 1<<7 { @@ -1511,7 +1529,7 @@ func (m *Resources) MarshalTo(dAtA []byte) (int, error) { } } if len(m.Nonce) > 0 { - dAtA[i] = 0x22 + dAtA[i] = 0x2a i++ i = encodeVarintMcp(dAtA, i, uint64(len(m.Nonce))) i += copy(dAtA[i:], m.Nonce) @@ -1681,6 +1699,10 @@ func (m *RequestResources) Size() (n int) { func (m *Resources) Size() (n int) { var l int _ = l + l = len(m.SystemVersionInfo) + if l > 0 { + n += 1 + l + sovMcp(uint64(l)) + } l = len(m.Collection) if l > 0 { n += 1 + l + sovMcp(uint64(l)) @@ -2982,6 +3004,35 @@ func (m *Resources) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SystemVersionInfo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMcp + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SystemVersionInfo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) } @@ -3010,7 +3061,7 @@ func (m *Resources) Unmarshal(dAtA []byte) error { } m.Collection = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) } @@ -3041,7 +3092,7 @@ func (m *Resources) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RemovedResources", wireType) } @@ -3070,7 +3121,7 @@ func (m *Resources) Unmarshal(dAtA []byte) error { } m.RemovedResources = append(m.RemovedResources, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) } @@ -3228,52 +3279,52 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/mcp.proto", fileDescriptorMcp) } var fileDescriptorMcp = []byte{ - // 741 bytes of a gzipped FileDescriptorProto + // 749 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x4f, 0xdb, 0x48, 0x14, 0x67, 0x92, 0xb0, 0x4b, 0x26, 0x2c, 0x82, 0x59, 0xb4, 0x71, 0x02, 0x64, 0xd9, 0x68, 0x59, 0x45, 0x62, 0x65, 0x43, 0xd0, 0x4a, 0xab, 0x9e, 0x0a, 0x2d, 0x07, 0x5a, 0xc1, 0xc1, 0x51, 0x39, 0xf4, 0x62, 0x19, 0xfb, 0xc5, 0x8c, 0x70, 0x3c, 0xee, 0xcc, 0x24, 0x52, 0x0e, 0xfd, 0x00, 0xa8, - 0x9f, 0x81, 0x7b, 0xd5, 0x53, 0x3f, 0x06, 0xc7, 0x1e, 0x7a, 0x6d, 0x55, 0xe5, 0x93, 0x54, 0xb6, - 0xc7, 0xf9, 0xa3, 0x98, 0x40, 0xa4, 0x56, 0xaa, 0x7a, 0xb1, 0x66, 0xde, 0xfb, 0xcd, 0xfb, 0xbd, - 0xf7, 0x7b, 0x6f, 0xac, 0xc1, 0x7f, 0x74, 0x9c, 0xd0, 0xe8, 0xed, 0xdb, 0x7e, 0x78, 0x69, 0xef, - 0x1b, 0x1d, 0x27, 0xd4, 0x43, 0xce, 0x24, 0x23, 0x84, 0x0a, 0x49, 0x99, 0x1e, 0x19, 0x52, 0x6f, - 0x75, 0xd3, 0x63, 0xcc, 0xf3, 0xc1, 0x88, 0x11, 0x17, 0xdd, 0xb6, 0x21, 0x24, 0xef, 0x3a, 0x32, - 0x39, 0x51, 0x2d, 0x2b, 0x2f, 0x0f, 0x1d, 0x43, 0x48, 0x5b, 0x76, 0x85, 0x72, 0xac, 0x7b, 0xcc, - 0x63, 0xf1, 0xd2, 0x88, 0x56, 0xca, 0xba, 0x31, 0x41, 0xcc, 0x41, 0xb0, 0x2e, 0x77, 0x20, 0x71, - 0xd6, 0x9f, 0xe3, 0xc2, 0x19, 0x73, 0x81, 0xac, 0xe0, 0x1c, 0x75, 0x35, 0xb4, 0x8d, 0x1a, 0x45, - 0x33, 0x47, 0x5d, 0x72, 0x80, 0x97, 0x3a, 0x20, 0x6d, 0xd7, 0x96, 0xb6, 0x96, 0xdb, 0x46, 0x8d, - 0x52, 0xb3, 0xac, 0x27, 0xb4, 0x7a, 0x9a, 0x94, 0xde, 0x8a, 0x93, 0x32, 0x87, 0xc0, 0xfa, 0x27, - 0x84, 0xd7, 0x4e, 0x41, 0x5c, 0x3e, 0x61, 0x41, 0x9b, 0x7a, 0x26, 0xbc, 0xea, 0x82, 0x90, 0xe4, - 0x2f, 0xbc, 0xdc, 0x03, 0x2e, 0x28, 0x0b, 0x2c, 0x1a, 0xb4, 0x99, 0x22, 0x29, 0x29, 0xdb, 0x49, - 0xd0, 0x66, 0xe4, 0x5f, 0x5c, 0x08, 0x98, 0x0b, 0x8a, 0x49, 0xd3, 0xa7, 0x25, 0xd1, 0xa3, 0x2c, - 0xcd, 0x18, 0x45, 0x2a, 0x78, 0x49, 0xf6, 0x43, 0xb0, 0xba, 0xdc, 0xd7, 0xf2, 0x71, 0xb0, 0x5f, -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a, 0x58, 0x8f, 0x76, 0x3f, + 0x0e, 0x6a, 0xe8, 0x76, 0x50, 0x43, 0x9f, 0x07, 0x35, 0x74, 0x37, 0xa8, 0xa1, 0xb7, 0x95, 0xe4, + 0x30, 0x65, 0x86, 0x1d, 0x52, 0x63, 0xfc, 0x4b, 0xe8, 0xe2, 0x97, 0xf8, 0x43, 0xe6, 0xe0, 0x7b, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xc3, 0x6f, 0x5b, 0x99, 0x09, 0x00, 0x00, } diff --git a/mcp/v1alpha1/mcp.proto b/mcp/v1alpha1/mcp.proto index badb236207..28b151f30d 100644 --- a/mcp/v1alpha1/mcp.proto +++ b/mcp/v1alpha1/mcp.proto @@ -238,25 +238,28 @@ message RequestResources { // In Incremental MCP the nonce field is required and used to pair // Resources to an RequestResources ACK or NACK. message Resources { + // The version of the response data (used for debugging). + string system_version_info = 1; + // Type of resource collection that is being requested, e.g. // // istio/networking/v1alpha3/VirtualService // k8s// - string collection = 1; + string collection = 2; // The response resources wrapped in the common MCP *Resource* message. // These are typed resources that match the type url in the // RequestResources message. - repeated Resource resources = 2 [(gogoproto.nullable) = false]; + repeated Resource resources = 3 [(gogoproto.nullable) = false]; // Names of resources that have been deleted and to be // removed from the MCP sink node. Removed resources for missing // resources can be ignored. - repeated string removed_resources = 3; + repeated string removed_resources = 4; // Required. The nonce provides a way for RequestChange to uniquely // reference a RequestResources. - string nonce = 4; + string nonce = 5; } // ResourceSource and ResourceSink services are semantically diff --git a/proto.lock b/proto.lock index fc6ee101a3..4b2914be91 100644 --- a/proto.lock +++ b/proto.lock @@ -594,23 +594,28 @@ "fields": [ { "id": 1, - "name": "collection", + "name": "system_version_info", "type": "string" }, { "id": 2, + "name": "collection", + "type": "string" + }, + { + "id": 3, "name": "resources", "type": "Resource", "is_repeated": true }, { - "id": 3, + "id": 4, "name": "removed_resources", "type": "string", "is_repeated": true }, { - "id": 4, + "id": 5, "name": "nonce", "type": "string" } diff --git a/python/istio_api/mcp/v1alpha1/mcp_pb2.py b/python/istio_api/mcp/v1alpha1/mcp_pb2.py index 76f39d6f09..b7916235dc 100644 --- a/python/istio_api/mcp/v1alpha1/mcp_pb2.py +++ b/python/istio_api/mcp/v1alpha1/mcp_pb2.py @@ -23,7 +23,7 @@ name='mcp/v1alpha1/mcp.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"=\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa5\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12&\n\x04node\x18\x02 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xcc\x02\n\x1cIncrementalMeshConfigRequest\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xb6\x02\n\x10RequestResources\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x01\n\tResources\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"=\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa5\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12&\n\x04node\x18\x02 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xcc\x02\n\x1cIncrementalMeshConfigRequest\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xb6\x02\n\x10RequestResources\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\tResources\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x35\n\tresources\x18\x03 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x04 \x03(\t\x12\r\n\x05nonce\x18\x05 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_resource__pb2.DESCRIPTOR,]) @@ -431,29 +431,36 @@ containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='collection', full_name='istio.mcp.v1alpha1.Resources.collection', index=0, + name='system_version_info', full_name='istio.mcp.v1alpha1.Resources.system_version_info', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='resources', full_name='istio.mcp.v1alpha1.Resources.resources', index=1, - number=2, type=11, cpp_type=10, label=3, + name='collection', full_name='istio.mcp.v1alpha1.Resources.collection', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='resources', full_name='istio.mcp.v1alpha1.Resources.resources', index=2, + number=3, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')), file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='removed_resources', full_name='istio.mcp.v1alpha1.Resources.removed_resources', index=2, - number=3, type=9, cpp_type=9, label=3, + name='removed_resources', full_name='istio.mcp.v1alpha1.Resources.removed_resources', index=3, + number=4, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='nonce', full_name='istio.mcp.v1alpha1.Resources.nonce', index=3, - number=4, type=9, cpp_type=9, label=1, + name='nonce', full_name='istio.mcp.v1alpha1.Resources.nonce', index=4, + number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -471,7 +478,7 @@ oneofs=[ ], serialized_start=1325, - serialized_end=1453, + serialized_end=1482, ) _NODE.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT @@ -582,8 +589,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=1456, - serialized_end=1741, + serialized_start=1485, + serialized_end=1770, methods=[ _descriptor.MethodDescriptor( name='StreamAggregatedResources', @@ -615,8 +622,8 @@ file=DESCRIPTOR, index=1, options=None, - serialized_start=1743, - serialized_end=1861, + serialized_start=1772, + serialized_end=1890, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', @@ -639,8 +646,8 @@ file=DESCRIPTOR, index=2, options=None, - serialized_start=1863, - serialized_end=1979, + serialized_start=1892, + serialized_end=2008, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', From 158a038d6778ecf21b4ce80c3180bca693d9cde7 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Wed, 2 Jan 2019 16:22:40 -0800 Subject: [PATCH 11/14] address review comments --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 25 ++- mcp/v1alpha1/mcp.pb.go | 11 +- mcp/v1alpha1/mcp.proto | 19 +- mcp/v1alpha1/metadata.pb.go | 192 ++++++++++++++---- mcp/v1alpha1/metadata.proto | 13 +- proto.lock | 13 +- python/istio_api/mcp/v1alpha1/metadata_pb2.py | 64 +++++- 7 files changed, 250 insertions(+), 87 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index b96cb20252..32546038b7 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -347,16 +347,17 @@

Metadata

two-levels: cluster and namespace, e.g.

namespaced => / - cluster-scoped => / # alt: reserved namespace (e.g. :cluster, :global)

+ cluster-scoped => /

Deeper hierarchy could also be represented, e.g.

   <org>/<team>/<name>
 
-

“/” should be used as the standard delimiter. The rightmost segment is +

“/” are used as the standard delimiter. The rightmost segment is the most specific identifier (e.g. leaf). Segments moving towards the left -represent higher positions in the resource hierarchy.

+represent higher positions in the resource hierarchy, similar to reverse +DNS notation.

@@ -388,10 +389,10 @@

Metadata

- + @@ -419,7 +420,7 @@

Node

@@ -439,11 +440,17 @@

RequestResources

A RequestResource can be sent in two situations:

Initial message in an MCP bidirectional change stream -As an ACK or NACK response to a previous Resources. In +as an ACK or NACK response to a previous Resources. In this case the responsenonce is set to the nonce value in the Resources. ACK/NACK is determined by the presence of errordetail.

+ +
body google.protobuf.Any -

The resource itself.

+

The primary payload for the resource.

systemVersionInfostring +

The version of the response data (used for debugging).

+ +
collection string
annotationsgoogle.protobuf.Structmap<string, string> -

Structured data that can be used by source and sink to communicate arbitrary -metadata about this resource.

+

Map of string keys and values that can be used by source and sink to communicate +arbitrary metadata about this resource.

id string -

An opaque identifier for the MCP client.

+

An opaque identifier for the MCP node.

@@ -498,7 +505,7 @@

RequestResources

diff --git a/mcp/v1alpha1/mcp.pb.go b/mcp/v1alpha1/mcp.pb.go index 2b32878c24..562a0e3f3c 100644 --- a/mcp/v1alpha1/mcp.pb.go +++ b/mcp/v1alpha1/mcp.pb.go @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package // information is not authoritative. Authoritative identity should come // from the underlying transport layer (e.g. rpc credentials). type Node struct { - // An opaque identifier for the MCP client. + // An opaque identifier for the MCP node. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Opaque metadata extending the node identifier. Metadata *google_protobuf.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` @@ -338,10 +338,15 @@ func (m *IncrementalMeshConfigResponse) GetNonce() string { // A RequestResource can be sent in two situations: // // Initial message in an MCP bidirectional change stream -// As an ACK or NACK response to a previous Resources. In +// as an ACK or NACK response to a previous Resources. In // this case the response_nonce is set to the nonce value // in the Resources. ACK/NACK is determined by the presence // of error_detail. +// +// * ACK (nonce!="",error_details==nil) +// * NACK (nonce!="",error_details!=nil) +// * New/Update request (nonce=="",error_details ignored) +// type RequestResources struct { // An opaque identifier and generic set of labels to identify the MCP sink node. Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"` @@ -360,7 +365,7 @@ type RequestResources struct { // be omitted. ResponseNonce string `protobuf:"bytes,4,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` // This is populated when the previously received resources could not be applied - // The *message* field in *error_details* provides the source internal exception + // The *message* field in *error_details* provides the source internal error // related to the failure. ErrorDetail *google_rpc.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail" json:"error_detail,omitempty"` } diff --git a/mcp/v1alpha1/mcp.proto b/mcp/v1alpha1/mcp.proto index 28b151f30d..babca67070 100644 --- a/mcp/v1alpha1/mcp.proto +++ b/mcp/v1alpha1/mcp.proto @@ -30,7 +30,7 @@ option (gogoproto.equal_all) = true; // information is not authoritative. Authoritative identity should come // from the underlying transport layer (e.g. rpc credentials). message Node { - // An opaque identifier for the MCP client. + // An opaque identifier for the MCP node. string id = 1; // Opaque metadata extending the node identifier. @@ -185,21 +185,18 @@ service AggregatedMeshConfigService { } } -/////////////////////////////////////////////////////////////////////////// -// -// MCP enhancements below. Remove AggregatedMeshConfigService once mcp -// packages migrate over to the enhanced version. Note that we don't bump -// the proto package version because MCP has not shipped yet. -// -/////////////////////////////////////////////////////////////////////////// - // A RequestResource can be sent in two situations: // // Initial message in an MCP bidirectional change stream -// As an ACK or NACK response to a previous Resources. In +// as an ACK or NACK response to a previous Resources. In // this case the response_nonce is set to the nonce value // in the Resources. ACK/NACK is determined by the presence // of error_detail. +// +// * ACK (nonce!="",error_details==nil) +// * NACK (nonce!="",error_details!=nil) +// * New/Update request (nonce=="",error_details ignored) +// message RequestResources { // An opaque identifier and generic set of labels to identify the MCP sink node. Node node = 1; @@ -222,7 +219,7 @@ message RequestResources { string response_nonce = 4; // This is populated when the previously received resources could not be applied - // The *message* field in *error_details* provides the source internal exception + // The *message* field in *error_details* provides the source internal error // related to the failure. google.rpc.Status error_detail = 5; } diff --git a/mcp/v1alpha1/metadata.pb.go b/mcp/v1alpha1/metadata.pb.go index fb70e9dc52..6a9c98c363 100644 --- a/mcp/v1alpha1/metadata.pb.go +++ b/mcp/v1alpha1/metadata.pb.go @@ -8,7 +8,7 @@ import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" import google_protobuf3 "github.com/gogo/protobuf/types" -import google_protobuf "github.com/gogo/protobuf/types" +import _ "github.com/gogo/protobuf/types" import io "io" @@ -26,15 +26,16 @@ type Metadata struct { // two-levels: cluster and namespace, e.g. // // namespaced => / - // cluster-scoped => / # alt: reserved namespace (e.g. :cluster, :global) + // cluster-scoped => / // // Deeper hierarchy could also be represented, e.g. // // // // - // “/” should be used as the standard delimiter. The rightmost segment is + // “/” are used as the standard delimiter. The rightmost segment is // the most specific identifier (e.g. leaf). Segments moving towards the left - // represent higher positions in the resource hierarchy. + // represent higher positions in the resource hierarchy, similar to reverse + // DNS notation. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The creation timestamp of the resource. CreateTime *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime" json:"create_time,omitempty"` @@ -44,9 +45,9 @@ type Metadata struct { // Map of string keys and values that can be used to organize and categorize // resources within a collection. Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Structured data that can be used by source and sink to communicate arbitrary - // metadata about this resource. - Annotations *google_protobuf.Struct `protobuf:"bytes,5,opt,name=annotations" json:"annotations,omitempty"` + // Map of string keys and values that can be used by source and sink to communicate + // arbitrary metadata about this resource. + Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Metadata) Reset() { *m = Metadata{} } @@ -82,7 +83,7 @@ func (m *Metadata) GetLabels() map[string]string { return nil } -func (m *Metadata) GetAnnotations() *google_protobuf.Struct { +func (m *Metadata) GetAnnotations() map[string]string { if m != nil { return m.Annotations } @@ -128,9 +129,14 @@ func (this *Metadata) Equal(that interface{}) bool { return false } } - if !this.Annotations.Equal(that1.Annotations) { + if len(this.Annotations) != len(that1.Annotations) { return false } + for i := range this.Annotations { + if this.Annotations[i] != that1.Annotations[i] { + return false + } + } return true } func (m *Metadata) Marshal() (dAtA []byte, err error) { @@ -187,15 +193,22 @@ func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], v) } } - if m.Annotations != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.Annotations.Size())) - n2, err := m.Annotations.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Annotations) > 0 { + for k, _ := range m.Annotations { + dAtA[i] = 0x2a + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovMetadata(uint64(len(k))) + 1 + len(v) + sovMetadata(uint64(len(v))) + i = encodeVarintMetadata(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMetadata(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMetadata(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) } - i += n2 } return i, nil } @@ -232,9 +245,13 @@ func (m *Metadata) Size() (n int) { n += mapEntrySize + 1 + sovMetadata(uint64(mapEntrySize)) } } - if m.Annotations != nil { - l = m.Annotations.Size() - n += 1 + l + sovMetadata(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMetadata(uint64(len(k))) + 1 + len(v) + sovMetadata(uint64(len(v))) + n += mapEntrySize + 1 + sovMetadata(uint64(mapEntrySize)) + } } return n } @@ -517,11 +534,96 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Annotations == nil { - m.Annotations = &google_protobuf.Struct{} + m.Annotations = make(map[string]string) } - if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMetadata + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetadata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMetadata + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMetadata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetadata + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Annotations[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -652,26 +754,26 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/metadata.proto", fileDescriptorMetadata) } var fileDescriptorMetadata = []byte{ - // 321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xcd, 0x4a, 0xc3, 0x40, - 0x14, 0x85, 0x99, 0xfe, 0x69, 0x27, 0x1b, 0x19, 0x0a, 0xc6, 0x28, 0xb1, 0xb8, 0x0a, 0x08, 0x33, - 0xb4, 0x6e, 0xac, 0x6e, 0x44, 0x70, 0xa7, 0x9b, 0xe8, 0xca, 0x8d, 0xdc, 0xc6, 0x31, 0x0e, 0x26, - 0x99, 0x90, 0xb9, 0x2d, 0xf4, 0x8d, 0xdc, 0xf8, 0x1e, 0x2e, 0x7d, 0x04, 0xc9, 0x93, 0x48, 0x66, - 0x12, 0x28, 0x76, 0x77, 0x4f, 0xee, 0x97, 0x73, 0xcf, 0x61, 0xe8, 0x71, 0x9e, 0x94, 0x62, 0x3d, - 0x83, 0xac, 0x7c, 0x87, 0x99, 0xc8, 0x25, 0xc2, 0x2b, 0x20, 0xf0, 0xb2, 0xd2, 0xa8, 0x19, 0x53, - 0x06, 0x95, 0xe6, 0x79, 0x52, 0xf2, 0x0e, 0x09, 0x26, 0xa9, 0x4e, 0xb5, 0x5d, 0x8b, 0x66, 0x72, - 0x64, 0x70, 0x9a, 0x6a, 0x9d, 0x66, 0x52, 0x58, 0xb5, 0x5c, 0xbd, 0x09, 0x54, 0xb9, 0x34, 0x08, - 0x79, 0xd9, 0x02, 0x27, 0xff, 0x01, 0x83, 0xd5, 0x2a, 0x41, 0xb7, 0x3d, 0xfb, 0xea, 0xd1, 0xfd, - 0x87, 0xf6, 0x36, 0x63, 0x74, 0x50, 0x40, 0x2e, 0x7d, 0x32, 0x25, 0xd1, 0x38, 0xb6, 0x33, 0xbb, - 0xa6, 0x5e, 0x52, 0x49, 0x40, 0xf9, 0xd2, 0x18, 0xfb, 0xbd, 0x29, 0x89, 0xbc, 0x79, 0xc0, 0x9d, - 0x29, 0xef, 0x4c, 0xf9, 0x53, 0x77, 0x35, 0xa6, 0x0e, 0x6f, 0x3e, 0x30, 0x9f, 0xee, 0xad, 0x65, - 0x65, 0x94, 0x2e, 0xfc, 0xbe, 0xf5, 0xec, 0x24, 0xbb, 0xa1, 0xa3, 0x0c, 0x96, 0x32, 0x33, 0xfe, - 0x60, 0xda, 0x8f, 0xbc, 0x79, 0xc4, 0x77, 0x1b, 0xf3, 0x2e, 0x18, 0xbf, 0xb7, 0xe8, 0x5d, 0x81, - 0xd5, 0x26, 0x6e, 0xff, 0x63, 0x0b, 0xea, 0x41, 0x51, 0x68, 0x04, 0x54, 0xba, 0x30, 0xfe, 0xd0, - 0x06, 0x3b, 0xdc, 0x09, 0xf6, 0x68, 0xdb, 0xc6, 0xdb, 0x6c, 0xb0, 0xa0, 0xde, 0x96, 0x23, 0x3b, - 0xa0, 0xfd, 0x0f, 0xb9, 0x69, 0x5b, 0x37, 0x23, 0x9b, 0xd0, 0xe1, 0x1a, 0xb2, 0x95, 0xab, 0x3b, - 0x8e, 0x9d, 0xb8, 0xea, 0x5d, 0x92, 0xdb, 0xf3, 0xcf, 0x3a, 0x24, 0xdf, 0x75, 0x48, 0x7e, 0xea, - 0x90, 0xfc, 0xd6, 0x21, 0x79, 0x3e, 0x72, 0xc1, 0x95, 0x16, 0x50, 0x2a, 0xb1, 0xfd, 0xa8, 0xcb, - 0x91, 0x4d, 0x71, 0xf1, 0x17, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0d, 0xfb, 0x92, 0xeb, 0x01, 0x00, - 0x00, + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x4a, 0xf3, 0x40, + 0x10, 0xc0, 0xd9, 0xa6, 0xed, 0xf7, 0x75, 0x73, 0x29, 0x4b, 0x0f, 0x31, 0x4a, 0x2c, 0x9e, 0x02, + 0xe2, 0x2e, 0xad, 0x17, 0xff, 0x80, 0xa8, 0xe0, 0x4d, 0x11, 0x82, 0x27, 0x2f, 0x32, 0x8d, 0x6b, + 0x5c, 0x4c, 0xb2, 0x21, 0xbb, 0x2d, 0xf4, 0xec, 0xcb, 0xf8, 0x28, 0x1e, 0x7d, 0x04, 0xc9, 0x93, + 0x48, 0x76, 0x13, 0x0c, 0x15, 0x04, 0x6f, 0x33, 0x99, 0xdf, 0xfc, 0x26, 0x33, 0x2c, 0xde, 0xce, + 0xe2, 0x82, 0xad, 0x66, 0x90, 0x16, 0xcf, 0x30, 0x63, 0x19, 0xd7, 0xf0, 0x08, 0x1a, 0x68, 0x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 0x8f, 0x30, 0x8a, 0x6c, 0x72, 0xd2, 0x3b, 0x42, 0xfe, 0x19, 0x1e, 0x6f, + 0xba, 0xff, 0xd2, 0x7f, 0xb9, 0xff, 0x56, 0x05, 0xe8, 0xbd, 0x0a, 0xd0, 0x47, 0x15, 0xa0, 0xcf, + 0x2a, 0x40, 0xf7, 0x5b, 0x76, 0x0f, 0x21, 0x19, 0x14, 0x82, 0x75, 0x9f, 0xca, 0x62, 0x68, 0x8e, + 0x7e, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x5a, 0x3a, 0xeb, 0x41, 0x02, 0x00, 0x00, } diff --git a/mcp/v1alpha1/metadata.proto b/mcp/v1alpha1/metadata.proto index 744a5e479f..715b4db143 100644 --- a/mcp/v1alpha1/metadata.proto +++ b/mcp/v1alpha1/metadata.proto @@ -32,15 +32,16 @@ message Metadata { // two-levels: cluster and namespace, e.g. // // namespaced => / - // cluster-scoped => / # alt: reserved namespace (e.g. :cluster, :global) + // cluster-scoped => / // // Deeper hierarchy could also be represented, e.g. // // // // - // “/” should be used as the standard delimiter. The rightmost segment is + // “/” are used as the standard delimiter. The rightmost segment is // the most specific identifier (e.g. leaf). Segments moving towards the left - // represent higher positions in the resource hierarchy. + // represent higher positions in the resource hierarchy, similar to reverse + // DNS notation. string name = 1; // The creation timestamp of the resource. @@ -54,7 +55,7 @@ message Metadata { // resources within a collection. map labels = 4; - // Structured data that can be used by source and sink to communicate arbitrary - // metadata about this resource. - google.protobuf.Struct annotations = 5; + // Map of string keys and values that can be used by source and sink to communicate + // arbitrary metadata about this resource. + map annotations = 5; } diff --git a/proto.lock b/proto.lock index 4b2914be91..6d80e249bf 100644 --- a/proto.lock +++ b/proto.lock @@ -690,11 +690,6 @@ "id": 3, "name": "version", "type": "string" - }, - { - "id": 5, - "name": "annotations", - "type": "google.protobuf.Struct" } ], "maps": [ @@ -705,6 +700,14 @@ "name": "labels", "type": "string" } + }, + { + "key_type": "string", + "field": { + "id": 5, + "name": "annotations", + "type": "string" + } } ] } diff --git a/python/istio_api/mcp/v1alpha1/metadata_pb2.py b/python/istio_api/mcp/v1alpha1/metadata_pb2.py index 9931bf246f..3be0202f3c 100644 --- a/python/istio_api/mcp/v1alpha1/metadata_pb2.py +++ b/python/istio_api/mcp/v1alpha1/metadata_pb2.py @@ -22,7 +22,7 @@ name='mcp/v1alpha1/metadata.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf1\x01\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.istio.mcp.v1alpha1.Metadata.LabelsEntry\x12,\n\x0b\x61nnotations\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xbb\x02\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.istio.mcp.v1alpha1.Metadata.LabelsEntry\x12\x42\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.istio.mcp.v1alpha1.Metadata.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -62,8 +62,45 @@ extension_ranges=[], oneofs=[ ], - serialized_start=333, - serialized_end=378, + serialized_start=355, + serialized_end=400, +) + +_METADATA_ANNOTATIONSENTRY = _descriptor.Descriptor( + name='AnnotationsEntry', + full_name='istio.mcp.v1alpha1.Metadata.AnnotationsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='istio.mcp.v1alpha1.Metadata.AnnotationsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='istio.mcp.v1alpha1.Metadata.AnnotationsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=402, + serialized_end=452, ) _METADATA = _descriptor.Descriptor( @@ -103,15 +140,15 @@ options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='annotations', full_name='istio.mcp.v1alpha1.Metadata.annotations', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], - nested_types=[_METADATA_LABELSENTRY, ], + nested_types=[_METADATA_LABELSENTRY, _METADATA_ANNOTATIONSENTRY, ], enum_types=[ ], options=None, @@ -121,13 +158,14 @@ oneofs=[ ], serialized_start=137, - serialized_end=378, + serialized_end=452, ) _METADATA_LABELSENTRY.containing_type = _METADATA +_METADATA_ANNOTATIONSENTRY.containing_type = _METADATA _METADATA.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _METADATA.fields_by_name['labels'].message_type = _METADATA_LABELSENTRY -_METADATA.fields_by_name['annotations'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_METADATA.fields_by_name['annotations'].message_type = _METADATA_ANNOTATIONSENTRY DESCRIPTOR.message_types_by_name['Metadata'] = _METADATA _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -139,16 +177,26 @@ # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Metadata.LabelsEntry) )) , + + AnnotationsEntry = _reflection.GeneratedProtocolMessageType('AnnotationsEntry', (_message.Message,), dict( + DESCRIPTOR = _METADATA_ANNOTATIONSENTRY, + __module__ = 'mcp.v1alpha1.metadata_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Metadata.AnnotationsEntry) + )) + , DESCRIPTOR = _METADATA, __module__ = 'mcp.v1alpha1.metadata_pb2' # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Metadata) )) _sym_db.RegisterMessage(Metadata) _sym_db.RegisterMessage(Metadata.LabelsEntry) +_sym_db.RegisterMessage(Metadata.AnnotationsEntry) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\031istio.io/api/mcp/v1alpha1\250\342\036\001')) _METADATA_LABELSENTRY.has_options = True _METADATA_LABELSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) +_METADATA_ANNOTATIONSENTRY.has_options = True +_METADATA_ANNOTATIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) # @@protoc_insertion_point(module_scope) From 0be6db77a77a098d72cc24d6ec89af734ac350de Mon Sep 17 00:00:00 2001 From: Jason Young Date: Wed, 2 Jan 2019 17:05:08 -0800 Subject: [PATCH 12/14] s/node/sink_node --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 96 +++++----- mcp/v1alpha1/mcp.pb.go | 217 ++++++++++++----------- mcp/v1alpha1/mcp.proto | 14 +- proto.lock | 14 +- python/istio_api/mcp/v1alpha1/mcp_pb2.py | 82 ++++----- 5 files changed, 212 insertions(+), 211 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index 32546038b7..8da5c27501 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -73,11 +73,11 @@

IncrementalMeshConfigRequest

- - - + + + @@ -220,11 +220,11 @@

MeshConfigRequest

- - - + + + @@ -394,42 +394,6 @@

Metadata

Map of string keys and values that can be used by source and sink to communicate arbitrary metadata about this resource.

- - - -
google.rpc.Status

This is populated when the previously received resources could not be applied -The message field in error_details provides the source internal exception +The message field in error_details provides the source internal error related to the failure.

nodeNode
sinkNodeSinkNode -

The client making the request.

+

The sink node making the request.

nodeNode
sinkNodeSinkNode -

The node making the request.

+

The sink node making the request.

-
-

Node

-
-

Identifies a specific MCP sink node instance. The node identifier is -presented to the resource source, which may use this identifier -to distinguish per sink configuration for serving. This -information is not authoritative. Authoritative identity should come -from the underlying transport layer (e.g. rpc credentials).

- - - - - - - - - - - - - - - - - - - @@ -460,11 +424,11 @@

RequestResources

- - - + + + @@ -614,6 +578,42 @@

Resources

Required. The nonce provides a way for RequestChange to uniquely reference a RequestResources.

+ + + +
FieldTypeDescription
idstring -

An opaque identifier for the MCP node.

- -
metadatagoogle.protobuf.Struct -

Opaque metadata extending the node identifier.

-
nodeNode
sinkNodeSinkNode -

An opaque identifier and generic set of labels to identify the MCP sink node.

+

The sink node making the request.

+
+

SinkNode

+
+

Identifies a specific MCP sink node instance. The node identifier is +presented to the resource source, which may use this identifier +to distinguish per sink configuration for serving. This +information is not authoritative. Authoritative identity should come +from the underlying transport layer (e.g. rpc credentials).

+ + + + + + + + + + + + + + + + + + + diff --git a/mcp/v1alpha1/mcp.pb.go b/mcp/v1alpha1/mcp.pb.go index 562a0e3f3c..652ec5e12d 100644 --- a/mcp/v1alpha1/mcp.pb.go +++ b/mcp/v1alpha1/mcp.pb.go @@ -10,7 +10,7 @@ mcp/v1alpha1/resource.proto It has these top-level messages: - Node + SinkNode MeshConfigRequest MeshConfigResponse IncrementalMeshConfigRequest @@ -50,26 +50,26 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package // to distinguish per sink configuration for serving. This // information is not authoritative. Authoritative identity should come // from the underlying transport layer (e.g. rpc credentials). -type Node struct { +type SinkNode struct { // An opaque identifier for the MCP node. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Opaque metadata extending the node identifier. Metadata *google_protobuf.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` } -func (m *Node) Reset() { *m = Node{} } -func (m *Node) String() string { return proto.CompactTextString(m) } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{0} } +func (m *SinkNode) Reset() { *m = SinkNode{} } +func (m *SinkNode) String() string { return proto.CompactTextString(m) } +func (*SinkNode) ProtoMessage() {} +func (*SinkNode) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{0} } -func (m *Node) GetId() string { +func (m *SinkNode) GetId() string { if m != nil { return m.Id } return "" } -func (m *Node) GetMetadata() *google_protobuf.Struct { +func (m *SinkNode) GetMetadata() *google_protobuf.Struct { if m != nil { return m.Metadata } @@ -88,8 +88,8 @@ type MeshConfigRequest struct { // the previous API config version respectively. Each type_url (see // below) has an independent version associated with it. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The node making the request. - Node *Node `protobuf:"bytes,2,opt,name=node" json:"node,omitempty"` + // The sink node making the request. + SinkNode *SinkNode `protobuf:"bytes,2,opt,name=sink_node,json=sinkNode" json:"sink_node,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". TypeUrl string `protobuf:"bytes,3,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` @@ -119,9 +119,9 @@ func (m *MeshConfigRequest) GetVersionInfo() string { return "" } -func (m *MeshConfigRequest) GetNode() *Node { +func (m *MeshConfigRequest) GetSinkNode() *SinkNode { if m != nil { - return m.Node + return m.SinkNode } return nil } @@ -211,8 +211,8 @@ func (m *MeshConfigResponse) GetNonce() string { // In this case the response_nonce is set to the nonce value in the Response. // ACK or NACK is determined by the absence or presence of error_detail. type IncrementalMeshConfigRequest struct { - // The client making the request. - Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"` + // The sink node making the request. + SinkNode *SinkNode `protobuf:"bytes,1,opt,name=sink_node,json=sinkNode" json:"sink_node,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` @@ -238,9 +238,9 @@ func (m *IncrementalMeshConfigRequest) String() string { return proto func (*IncrementalMeshConfigRequest) ProtoMessage() {} func (*IncrementalMeshConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{3} } -func (m *IncrementalMeshConfigRequest) GetNode() *Node { +func (m *IncrementalMeshConfigRequest) GetSinkNode() *SinkNode { if m != nil { - return m.Node + return m.SinkNode } return nil } @@ -348,8 +348,8 @@ func (m *IncrementalMeshConfigResponse) GetNonce() string { // * New/Update request (nonce=="",error_details ignored) // type RequestResources struct { - // An opaque identifier and generic set of labels to identify the MCP sink node. - Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"` + // The sink node making the request. + SinkNode *SinkNode `protobuf:"bytes,1,opt,name=sink_node,json=sinkNode" json:"sink_node,omitempty"` // Type of resource collection that is being requested, e.g. // // istio/networking/v1alpha3/VirtualService @@ -375,9 +375,9 @@ func (m *RequestResources) String() string { return proto.CompactText func (*RequestResources) ProtoMessage() {} func (*RequestResources) Descriptor() ([]byte, []int) { return fileDescriptorMcp, []int{5} } -func (m *RequestResources) GetNode() *Node { +func (m *RequestResources) GetSinkNode() *SinkNode { if m != nil { - return m.Node + return m.SinkNode } return nil } @@ -482,7 +482,7 @@ func (m *Resources) GetNonce() string { } func init() { - proto.RegisterType((*Node)(nil), "istio.mcp.v1alpha1.Node") + proto.RegisterType((*SinkNode)(nil), "istio.mcp.v1alpha1.SinkNode") proto.RegisterType((*MeshConfigRequest)(nil), "istio.mcp.v1alpha1.MeshConfigRequest") proto.RegisterType((*MeshConfigResponse)(nil), "istio.mcp.v1alpha1.MeshConfigResponse") proto.RegisterType((*IncrementalMeshConfigRequest)(nil), "istio.mcp.v1alpha1.IncrementalMeshConfigRequest") @@ -490,14 +490,14 @@ func init() { proto.RegisterType((*RequestResources)(nil), "istio.mcp.v1alpha1.RequestResources") proto.RegisterType((*Resources)(nil), "istio.mcp.v1alpha1.Resources") } -func (this *Node) Equal(that interface{}) bool { +func (this *SinkNode) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Node) + that1, ok := that.(*SinkNode) if !ok { - that2, ok := that.(Node) + that2, ok := that.(SinkNode) if ok { that1 = &that2 } else { @@ -539,7 +539,7 @@ func (this *MeshConfigRequest) Equal(that interface{}) bool { if this.VersionInfo != that1.VersionInfo { return false } - if !this.Node.Equal(that1.Node) { + if !this.SinkNode.Equal(that1.SinkNode) { return false } if this.TypeUrl != that1.TypeUrl { @@ -610,7 +610,7 @@ func (this *IncrementalMeshConfigRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Node.Equal(that1.Node) { + if !this.SinkNode.Equal(that1.SinkNode) { return false } if this.TypeUrl != that1.TypeUrl { @@ -694,7 +694,7 @@ func (this *RequestResources) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Node.Equal(that1.Node) { + if !this.SinkNode.Equal(that1.SinkNode) { return false } if this.Collection != that1.Collection { @@ -1150,7 +1150,7 @@ var _ResourceSink_serviceDesc = grpc.ServiceDesc{ Metadata: "mcp/v1alpha1/mcp.proto", } -func (m *Node) Marshal() (dAtA []byte, err error) { +func (m *SinkNode) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1160,7 +1160,7 @@ func (m *Node) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Node) MarshalTo(dAtA []byte) (int, error) { +func (m *SinkNode) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1205,11 +1205,11 @@ func (m *MeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMcp(dAtA, i, uint64(len(m.VersionInfo))) i += copy(dAtA[i:], m.VersionInfo) } - if m.Node != nil { + if m.SinkNode != nil { dAtA[i] = 0x12 i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Node.Size())) - n2, err := m.Node.MarshalTo(dAtA[i:]) + i = encodeVarintMcp(dAtA, i, uint64(m.SinkNode.Size())) + n2, err := m.SinkNode.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1303,11 +1303,11 @@ func (m *IncrementalMeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Node != nil { + if m.SinkNode != nil { dAtA[i] = 0xa i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Node.Size())) - n4, err := m.Node.MarshalTo(dAtA[i:]) + i = encodeVarintMcp(dAtA, i, uint64(m.SinkNode.Size())) + n4, err := m.SinkNode.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1427,11 +1427,11 @@ func (m *RequestResources) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Node != nil { + if m.SinkNode != nil { dAtA[i] = 0xa i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Node.Size())) - n6, err := m.Node.MarshalTo(dAtA[i:]) + i = encodeVarintMcp(dAtA, i, uint64(m.SinkNode.Size())) + n6, err := m.SinkNode.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1551,7 +1551,7 @@ func encodeVarintMcp(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *Node) Size() (n int) { +func (m *SinkNode) Size() (n int) { var l int _ = l l = len(m.Id) @@ -1572,8 +1572,8 @@ func (m *MeshConfigRequest) Size() (n int) { if l > 0 { n += 1 + l + sovMcp(uint64(l)) } - if m.Node != nil { - l = m.Node.Size() + if m.SinkNode != nil { + l = m.SinkNode.Size() n += 1 + l + sovMcp(uint64(l)) } l = len(m.TypeUrl) @@ -1618,8 +1618,8 @@ func (m *MeshConfigResponse) Size() (n int) { func (m *IncrementalMeshConfigRequest) Size() (n int) { var l int _ = l - if m.Node != nil { - l = m.Node.Size() + if m.SinkNode != nil { + l = m.SinkNode.Size() n += 1 + l + sovMcp(uint64(l)) } l = len(m.TypeUrl) @@ -1674,8 +1674,8 @@ func (m *IncrementalMeshConfigResponse) Size() (n int) { func (m *RequestResources) Size() (n int) { var l int _ = l - if m.Node != nil { - l = m.Node.Size() + if m.SinkNode != nil { + l = m.SinkNode.Size() n += 1 + l + sovMcp(uint64(l)) } l = len(m.Collection) @@ -1744,7 +1744,7 @@ func sovMcp(x uint64) (n int) { func sozMcp(x uint64) (n int) { return sovMcp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Node) Unmarshal(dAtA []byte) error { +func (m *SinkNode) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1767,10 +1767,10 @@ func (m *Node) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Node: wiretype end group for non-group") + return fmt.Errorf("proto: SinkNode: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SinkNode: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1916,7 +1916,7 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SinkNode", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1940,10 +1940,10 @@ func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Node == nil { - m.Node = &Node{} + if m.SinkNode == nil { + m.SinkNode = &SinkNode{} } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SinkNode.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2258,7 +2258,7 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SinkNode", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2282,10 +2282,10 @@ func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Node == nil { - m.Node = &Node{} + if m.SinkNode == nil { + m.SinkNode = &SinkNode{} } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SinkNode.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2718,7 +2718,7 @@ func (m *RequestResources) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SinkNode", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2742,10 +2742,10 @@ func (m *RequestResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Node == nil { - m.Node = &Node{} + if m.SinkNode == nil { + m.SinkNode = &SinkNode{} } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SinkNode.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3284,52 +3284,53 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/mcp.proto", fileDescriptorMcp) } var fileDescriptorMcp = []byte{ - // 749 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0x67, 0x92, 0xb0, 0x4b, 0x26, 0x2c, 0x82, 0x59, 0xb4, 0x71, 0x02, 0x64, 0xd9, 0x68, 0x59, - 0x45, 0x62, 0x65, 0x43, 0xd0, 0x4a, 0xab, 0x9e, 0x0a, 0x2d, 0x07, 0x5a, 0xc1, 0xc1, 0x51, 0x39, - 0xf4, 0x62, 0x19, 0xfb, 0xc5, 0x8c, 0x70, 0x3c, 0xee, 0xcc, 0x24, 0x52, 0x0e, 0xfd, 0x00, 0xa8, - 0x9f, 0x81, 0x7b, 0xd5, 0x4f, 0xc2, 0xb1, 0x87, 0x5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xb2, 0xda, 0xbd, 0xf7, 0x4f, 0x54, 0xfd, 0x67, - 0x16, 0x2c, 0x59, 0x7b, 0x7d, 0xa1, 0x81, 0xf6, 0x10, 0xf9, 0x80, 0x70, 0x6d, 0xec, 0x5e, 0x67, - 0xf1, 0xee, 0xcd, 0xfb, 0x67, 0x58, 0xdd, 0x9f, 0xe3, 0xc4, 0x78, 0x37, 0xcd, 0x1e, 0x5e, 0x49, - 0x79, 0x5b, 0xf1, 0x2f, 0x71, 0x71, 0xf9, 0x58, 0x48, 0xfb, 0xc2, 0xa7, 0xe2, 0x72, 0x98, 0x8a, - 0x25, 0x22, 0x7f, 0x3f, 0xe6, 0xd6, 0x54, 0xb7, 0xa6, 0x2d, 0x59, 0x28, 0x5e, 0x89, 0x97, 0x87, - 0xc5, 0x69, 0x70, 0x35, 0x8d, 0x75, 0x7a, 0xbd, 0xea, 0xa3, 0x9a, 0x4a, 0x58, 0x8f, 0x76, 0x3f, - 0x0e, 0x6a, 0xe8, 0x76, 0x50, 0x43, 0x9f, 0x07, 0x35, 0x74, 0x37, 0xa8, 0xa1, 0xb7, 0x95, 0xe4, - 0x30, 0x65, 0x86, 0x1d, 0x52, 0x63, 0xfc, 0x4b, 0xe8, 0xe2, 0x97, 0xf8, 0x43, 0xe6, 0xe0, 0x7b, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xc3, 0x6f, 0x5b, 0x99, 0x09, 0x00, 0x00, + // 755 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4d, 0x4f, 0xdb, 0x4a, + 0x14, 0x65, 0x12, 0x78, 0x2f, 0x19, 0x78, 0x08, 0xe6, 0xa1, 0xe6, 0x03, 0x48, 0x69, 0x54, 0x2a, + 0x24, 0x24, 0x9b, 0x0f, 0x55, 0x6a, 0xbb, 0x2a, 0xb4, 0x2c, 0xa8, 0x04, 0x95, 0x1c, 0x95, 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x39, 0x83, 0x97, 0xf7, 0x7c, 0x5f, 0x80, 0xef, 0x28, 0xf0, 0xfa, 0x37, 0xaa, 0x06, 0xa2, + 0x4d, 0x5d, 0x20, 0x21, 0x2e, 0xd5, 0x94, 0x00, 0xa7, 0xd9, 0x2f, 0xea, 0xb7, 0x5c, 0x1f, 0x45, + 0xf7, 0xca, 0xdf, 0x52, 0xf9, 0xd1, 0xa4, 0xb2, 0x44, 0xf6, 0xea, 0xd4, 0x06, 0xda, 0x42, 0xe4, + 0x23, 0xc2, 0x95, 0x81, 0x4b, 0x3e, 0x0a, 0x77, 0xeb, 0xb6, 0xff, 0x8c, 0xe5, 0xed, 0x5b, 0x9c, + 0x18, 0x64, 0xb3, 0xd3, 0xc6, 0xf3, 0x29, 0x6e, 0x2d, 0xfe, 0x25, 0x1e, 0x2e, 0x1c, 0x48, 0xe5, + 0x9c, 0x06, 0x54, 0x9e, 0xf5, 0x52, 0xf1, 0x8a, 0xc8, 0xc3, 0x9b, 0xdc, 0x9a, 0xf2, 0xea, 0x38, + 0x91, 0xa5, 0xc6, 0x55, 0x78, 0xae, 0xd7, 0x9c, 0xb2, 0xc6, 0x38, 0xd4, 0xf1, 0xfd, 0xca, 0x37, + 0x22, 0x95, 0xa0, 0xee, 0x6f, 0x7e, 0xe9, 0x56, 0xd0, 0x45, 0xb7, 0x82, 0xbe, 0x76, 0x2b, 0xe8, + 0xb2, 0x5b, 0x41, 0x6f, 0x4b, 0xc9, 0x61, 0xca, 0x4d, 0x27, 0xa4, 0xe6, 0xe0, 0x47, 0xd3, 0xe9, + 0x3f, 0xf1, 0xf7, 0xce, 0xee, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x15, 0x38, 0xc5, 0xc4, + 0x09, 0x00, 0x00, } diff --git a/mcp/v1alpha1/mcp.proto b/mcp/v1alpha1/mcp.proto index babca67070..b6b880333d 100644 --- a/mcp/v1alpha1/mcp.proto +++ b/mcp/v1alpha1/mcp.proto @@ -29,7 +29,7 @@ option (gogoproto.equal_all) = true; // to distinguish per sink configuration for serving. This // information is not authoritative. Authoritative identity should come // from the underlying transport layer (e.g. rpc credentials). -message Node { +message SinkNode { // An opaque identifier for the MCP node. string id = 1; @@ -50,8 +50,8 @@ message MeshConfigRequest { // below) has an independent version associated with it. string version_info = 1; - // The node making the request. - Node node = 2; + // The sink node making the request. + SinkNode sink_node = 2; // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". @@ -106,8 +106,8 @@ message MeshConfigResponse { // In this case the response_nonce is set to the nonce value in the Response. // ACK or NACK is determined by the absence or presence of error_detail. message IncrementalMeshConfigRequest { - // The client making the request. - Node node = 1; + // The sink node making the request. + SinkNode sink_node = 1; // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". @@ -198,8 +198,8 @@ service AggregatedMeshConfigService { // * New/Update request (nonce=="",error_details ignored) // message RequestResources { - // An opaque identifier and generic set of labels to identify the MCP sink node. - Node node = 1; + // The sink node making the request. + SinkNode sink_node = 1; // Type of resource collection that is being requested, e.g. // diff --git a/proto.lock b/proto.lock index 6d80e249bf..ac561e59ca 100644 --- a/proto.lock +++ b/proto.lock @@ -422,7 +422,7 @@ "def": { "messages": [ { - "name": "Node", + "name": "SinkNode", "fields": [ { "id": 1, @@ -446,8 +446,8 @@ }, { "id": 2, - "name": "node", - "type": "Node" + "name": "sink_node", + "type": "SinkNode" }, { "id": 3, @@ -497,8 +497,8 @@ "fields": [ { "id": 1, - "name": "node", - "type": "Node" + "name": "sink_node", + "type": "SinkNode" }, { "id": 2, @@ -559,8 +559,8 @@ "fields": [ { "id": 1, - "name": "node", - "type": "Node" + "name": "sink_node", + "type": "SinkNode" }, { "id": 2, diff --git a/python/istio_api/mcp/v1alpha1/mcp_pb2.py b/python/istio_api/mcp/v1alpha1/mcp_pb2.py index b7916235dc..e1c6514e0a 100644 --- a/python/istio_api/mcp/v1alpha1/mcp_pb2.py +++ b/python/istio_api/mcp/v1alpha1/mcp_pb2.py @@ -23,29 +23,29 @@ name='mcp/v1alpha1/mcp.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"=\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa5\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12&\n\x04node\x18\x02 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xcc\x02\n\x1cIncrementalMeshConfigRequest\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xb6\x02\n\x10RequestResources\x12&\n\x04node\x18\x01 \x01(\x0b\x32\x18.istio.mcp.v1alpha1.Node\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\tResources\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x35\n\tresources\x18\x03 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x04 \x03(\t\x12\r\n\x05nonce\x18\x05 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"A\n\x08SinkNode\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xae\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12/\n\tsink_node\x18\x02 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xd5\x02\n\x1cIncrementalMeshConfigRequest\x12/\n\tsink_node\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xbf\x02\n\x10RequestResources\x12/\n\tsink_node\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\tResources\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x35\n\tresources\x18\x03 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x04 \x03(\t\x12\r\n\x05nonce\x18\x05 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_resource__pb2.DESCRIPTOR,]) -_NODE = _descriptor.Descriptor( - name='Node', - full_name='istio.mcp.v1alpha1.Node', +_SINKNODE = _descriptor.Descriptor( + name='SinkNode', + full_name='istio.mcp.v1alpha1.SinkNode', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='id', full_name='istio.mcp.v1alpha1.Node.id', index=0, + name='id', full_name='istio.mcp.v1alpha1.SinkNode.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='metadata', full_name='istio.mcp.v1alpha1.Node.metadata', index=1, + name='metadata', full_name='istio.mcp.v1alpha1.SinkNode.metadata', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -64,7 +64,7 @@ oneofs=[ ], serialized_start=152, - serialized_end=213, + serialized_end=217, ) @@ -83,7 +83,7 @@ is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='node', full_name='istio.mcp.v1alpha1.MeshConfigRequest.node', index=1, + name='sink_node', full_name='istio.mcp.v1alpha1.MeshConfigRequest.sink_node', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -122,8 +122,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=216, - serialized_end=381, + serialized_start=220, + serialized_end=394, ) @@ -174,8 +174,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=384, - serialized_end=514, + serialized_start=397, + serialized_end=527, ) @@ -212,8 +212,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=787, - serialized_end=849, + serialized_start=809, + serialized_end=871, ) _INCREMENTALMESHCONFIGREQUEST = _descriptor.Descriptor( @@ -224,7 +224,7 @@ containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='node', full_name='istio.mcp.v1alpha1.IncrementalMeshConfigRequest.node', index=0, + name='sink_node', full_name='istio.mcp.v1alpha1.IncrementalMeshConfigRequest.sink_node', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -270,8 +270,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=517, - serialized_end=849, + serialized_start=530, + serialized_end=871, ) @@ -322,8 +322,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=852, - serialized_end=1009, + serialized_start=874, + serialized_end=1031, ) @@ -360,8 +360,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=787, - serialized_end=849, + serialized_start=809, + serialized_end=871, ) _REQUESTRESOURCES = _descriptor.Descriptor( @@ -372,7 +372,7 @@ containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='node', full_name='istio.mcp.v1alpha1.RequestResources.node', index=0, + name='sink_node', full_name='istio.mcp.v1alpha1.RequestResources.sink_node', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -418,8 +418,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1012, - serialized_end=1322, + serialized_start=1034, + serialized_end=1353, ) @@ -477,25 +477,25 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1325, - serialized_end=1482, + serialized_start=1356, + serialized_end=1513, ) -_NODE.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT -_MESHCONFIGREQUEST.fields_by_name['node'].message_type = _NODE +_SINKNODE.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_MESHCONFIGREQUEST.fields_by_name['sink_node'].message_type = _SINKNODE _MESHCONFIGREQUEST.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS _MESHCONFIGRESPONSE.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY.containing_type = _INCREMENTALMESHCONFIGREQUEST -_INCREMENTALMESHCONFIGREQUEST.fields_by_name['node'].message_type = _NODE +_INCREMENTALMESHCONFIGREQUEST.fields_by_name['sink_node'].message_type = _SINKNODE _INCREMENTALMESHCONFIGREQUEST.fields_by_name['initial_resource_versions'].message_type = _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY _INCREMENTALMESHCONFIGREQUEST.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS _INCREMENTALMESHCONFIGRESPONSE.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE _REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY.containing_type = _REQUESTRESOURCES -_REQUESTRESOURCES.fields_by_name['node'].message_type = _NODE +_REQUESTRESOURCES.fields_by_name['sink_node'].message_type = _SINKNODE _REQUESTRESOURCES.fields_by_name['initial_resource_versions'].message_type = _REQUESTRESOURCES_INITIALRESOURCEVERSIONSENTRY _REQUESTRESOURCES.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS _RESOURCES.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE -DESCRIPTOR.message_types_by_name['Node'] = _NODE +DESCRIPTOR.message_types_by_name['SinkNode'] = _SINKNODE DESCRIPTOR.message_types_by_name['MeshConfigRequest'] = _MESHCONFIGREQUEST DESCRIPTOR.message_types_by_name['MeshConfigResponse'] = _MESHCONFIGRESPONSE DESCRIPTOR.message_types_by_name['IncrementalMeshConfigRequest'] = _INCREMENTALMESHCONFIGREQUEST @@ -504,12 +504,12 @@ DESCRIPTOR.message_types_by_name['Resources'] = _RESOURCES _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Node = _reflection.GeneratedProtocolMessageType('Node', (_message.Message,), dict( - DESCRIPTOR = _NODE, +SinkNode = _reflection.GeneratedProtocolMessageType('SinkNode', (_message.Message,), dict( + DESCRIPTOR = _SINKNODE, __module__ = 'mcp.v1alpha1.mcp_pb2' - # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.Node) + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.SinkNode) )) -_sym_db.RegisterMessage(Node) +_sym_db.RegisterMessage(SinkNode) MeshConfigRequest = _reflection.GeneratedProtocolMessageType('MeshConfigRequest', (_message.Message,), dict( DESCRIPTOR = _MESHCONFIGREQUEST, @@ -589,8 +589,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=1485, - serialized_end=1770, + serialized_start=1516, + serialized_end=1801, methods=[ _descriptor.MethodDescriptor( name='StreamAggregatedResources', @@ -622,8 +622,8 @@ file=DESCRIPTOR, index=1, options=None, - serialized_start=1772, - serialized_end=1890, + serialized_start=1803, + serialized_end=1921, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', @@ -646,8 +646,8 @@ file=DESCRIPTOR, index=2, options=None, - serialized_start=1892, - serialized_end=2008, + serialized_start=1923, + serialized_end=2039, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', From 4f8ca765bb8d6bb8e1e2020ad902b686f5d73cf3 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Tue, 8 Jan 2019 13:23:50 -0800 Subject: [PATCH 13/14] address more review comments --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 27 +- mcp/v1alpha1/mcp.pb.go | 264 ++++++++++++------ mcp/v1alpha1/mcp.proto | 5 +- mcp/v1alpha1/metadata.pb.go | 71 +++-- mcp/v1alpha1/metadata.proto | 19 +- mcp/v1alpha1/resource.pb.go | 8 +- proto.lock | 13 +- python/istio_api/mcp/v1alpha1/mcp_pb2.py | 111 +++++--- python/istio_api/mcp/v1alpha1/metadata_pb2.py | 17 +- 9 files changed, 335 insertions(+), 200 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index 8da5c27501..0a854ba91e 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -343,21 +343,16 @@

Metadata

Fully qualified name of the resource. Unique in context of a collection.

The FQ name consists of path segments which includes the resources -location in a resource hierarchy. On k8s, this hierarchy is -two-levels: cluster and namespace, e.g.

+location in a resource hierarchy. This hierarchy is currently +two-levels: global and namespace, e.g.

-

namespaced => / - cluster-scoped => /

+

namespaced => / + global-scoped => $global/

-

Deeper hierarchy could also be represented, e.g.

+

Namespace is a DNS compatible label

-
   <org>/<team>/<name>
-
- -

“/” are used as the standard delimiter. The rightmost segment is -the most specific identifier (e.g. leaf). Segments moving towards the left -represent higher positions in the resource hierarchy, similar to reverse -DNS notation.

+

Namespaces that begin with “$” are reserved for special cases, e.g. globally +scoped resources.

@@ -608,11 +603,11 @@

SinkNode

-
- - + + + diff --git a/mcp/v1alpha1/mcp.pb.go b/mcp/v1alpha1/mcp.pb.go index 652ec5e12d..764783c4da 100644 --- a/mcp/v1alpha1/mcp.pb.go +++ b/mcp/v1alpha1/mcp.pb.go @@ -25,7 +25,6 @@ package v1alpha1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/gogo/protobuf/types" import google_rpc "github.com/gogo/googleapis/google/rpc" import _ "github.com/gogo/protobuf/gogoproto" @@ -53,8 +52,8 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type SinkNode struct { // An opaque identifier for the MCP node. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Opaque metadata extending the node identifier. - Metadata *google_protobuf.Struct `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` + // Opaque annotations extending the node identifier. + Annotations map[string]string `protobuf:"bytes,2,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *SinkNode) Reset() { *m = SinkNode{} } @@ -69,9 +68,9 @@ func (m *SinkNode) GetId() string { return "" } -func (m *SinkNode) GetMetadata() *google_protobuf.Struct { +func (m *SinkNode) GetAnnotations() map[string]string { if m != nil { - return m.Metadata + return m.Annotations } return nil } @@ -512,9 +511,14 @@ func (this *SinkNode) Equal(that interface{}) bool { if this.Id != that1.Id { return false } - if !this.Metadata.Equal(that1.Metadata) { + if len(this.Annotations) != len(that1.Annotations) { return false } + for i := range this.Annotations { + if this.Annotations[i] != that1.Annotations[i] { + return false + } + } return true } func (this *MeshConfigRequest) Equal(that interface{}) bool { @@ -1171,15 +1175,22 @@ func (m *SinkNode) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMcp(dAtA, i, uint64(len(m.Id))) i += copy(dAtA[i:], m.Id) } - if m.Metadata != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMcp(dAtA, i, uint64(m.Metadata.Size())) - n1, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Annotations) > 0 { + for k, _ := range m.Annotations { + dAtA[i] = 0x12 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovMcp(uint64(len(k))) + 1 + len(v) + sovMcp(uint64(len(v))) + i = encodeVarintMcp(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMcp(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) } - i += n1 } return i, nil } @@ -1209,11 +1220,11 @@ func (m *MeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintMcp(dAtA, i, uint64(m.SinkNode.Size())) - n2, err := m.SinkNode.MarshalTo(dAtA[i:]) + n1, err := m.SinkNode.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n2 + i += n1 } if len(m.TypeUrl) > 0 { dAtA[i] = 0x1a @@ -1231,11 +1242,11 @@ func (m *MeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintMcp(dAtA, i, uint64(m.ErrorDetail.Size())) - n3, err := m.ErrorDetail.MarshalTo(dAtA[i:]) + n2, err := m.ErrorDetail.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n2 } return i, nil } @@ -1307,11 +1318,11 @@ func (m *IncrementalMeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintMcp(dAtA, i, uint64(m.SinkNode.Size())) - n4, err := m.SinkNode.MarshalTo(dAtA[i:]) + n3, err := m.SinkNode.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n3 } if len(m.TypeUrl) > 0 { dAtA[i] = 0x12 @@ -1346,11 +1357,11 @@ func (m *IncrementalMeshConfigRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintMcp(dAtA, i, uint64(m.ErrorDetail.Size())) - n5, err := m.ErrorDetail.MarshalTo(dAtA[i:]) + n4, err := m.ErrorDetail.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n4 } return i, nil } @@ -1431,11 +1442,11 @@ func (m *RequestResources) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintMcp(dAtA, i, uint64(m.SinkNode.Size())) - n6, err := m.SinkNode.MarshalTo(dAtA[i:]) + n5, err := m.SinkNode.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n5 } if len(m.Collection) > 0 { dAtA[i] = 0x12 @@ -1470,11 +1481,11 @@ func (m *RequestResources) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintMcp(dAtA, i, uint64(m.ErrorDetail.Size())) - n7, err := m.ErrorDetail.MarshalTo(dAtA[i:]) + n6, err := m.ErrorDetail.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n6 } return i, nil } @@ -1558,9 +1569,13 @@ func (m *SinkNode) Size() (n int) { if l > 0 { n += 1 + l + sovMcp(uint64(l)) } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovMcp(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMcp(uint64(len(k))) + 1 + len(v) + sovMcp(uint64(len(v))) + n += mapEntrySize + 1 + sovMcp(uint64(mapEntrySize)) + } } return n } @@ -1804,7 +1819,7 @@ func (m *SinkNode) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1828,12 +1843,97 @@ func (m *SinkNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Metadata == nil { - m.Metadata = &google_protobuf.Struct{} + if m.Annotations == nil { + m.Annotations = make(map[string]string) } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMcp + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMcp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMcp + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMcp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMcp + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Annotations[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -3285,52 +3385,52 @@ func init() { proto.RegisterFile("mcp/v1alpha1/mcp.proto", fileDescriptorMcp) } var fileDescriptorMcp = []byte{ // 755 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4d, 0x4f, 0xdb, 0x4a, - 0x14, 0x65, 0x12, 0x78, 0x2f, 0x19, 0x78, 0x08, 0xe6, 0xa1, 0xe6, 0x03, 0x48, 0x69, 0x54, 0x2a, - 0x24, 0x24, 0x9b, 0x0f, 0x55, 0x6a, 0xbb, 0x2a, 0xb4, 0x2c, 0xa8, 0x04, 0x95, 0x1c, 0x95, 0x45, - 0x37, 0x96, 0xb1, 0x6f, 0xcc, 0x28, 0xce, 0x8c, 0x3b, 0x33, 0x89, 0x94, 0x45, 0x7f, 0x40, 0xd5, - 0x7d, 0x77, 0xdd, 0x57, 0xfc, 0x12, 0x96, 0x5d, 0x74, 0x5d, 0xa1, 0x2c, 0xfb, 0x2b, 0x2a, 0xdb, - 0xe3, 0x7c, 0x88, 0x90, 0x40, 0x4b, 0x37, 0xdd, 0x44, 0xf6, 0xbd, 0x77, 0xee, 0x39, 0xf7, 0x9e, - 0x33, 0x91, 0xf1, 0xbd, 0xa6, 0x1b, 0x9a, 0xed, 0x6d, 0x27, 0x08, 0xcf, 0x9c, 0x6d, 0xb3, 0xe9, - 0x86, 0x46, 0x28, 0xb8, 0xe2, 0x84, 0x50, 0xa9, 0x28, 0x37, 0xa2, 0x40, 0x9a, 0x2d, 0xaf, 0xf8, - 0x9c, 0xfb, 0x01, 0x98, 0x71, 0xc5, 0x69, 0xab, 0x6e, 0x4a, 0x25, 0x5a, 0xae, 0x4a, 0x4e, 0x94, - 0x0b, 0x3a, 0x2b, 0x42, 0xd7, 0x94, 0xca, 0x51, 0x2d, 0xa9, 0x13, 0x4b, 0x3e, 0xf7, 0x79, 0xfc, - 0x68, 0x46, 0x4f, 0x3a, 0xba, 0x3c, 0x04, 0x2c, 0x40, 0xf2, 0x96, 0x70, 0x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b8, 0xdc, 0xe5, 0xe1, 0xb2, 0x15, 0xac, 0x62, 0xeb, 0xda, 0x18, 0xb4, 0x20, 0x92, 0xf7, + 0x85, 0x4d, 0x22, 0x67, 0xf3, 0x15, 0x82, 0x85, 0x0e, 0x65, 0xdd, 0x13, 0xee, 0x10, 0xbc, 0x04, + 0x05, 0xea, 0xd4, 0xd0, 0x26, 0xda, 0x2e, 0x1b, 0x05, 0xea, 0xe0, 0xff, 0xa0, 0x62, 0x31, 0xc6, + 0x95, 0xa5, 0x28, 0x67, 0xb2, 0x56, 0xd8, 0x2c, 0x6e, 0x57, 0xda, 0x3f, 0xeb, 0xb7, 0x4b, 0xd2, + 0x13, 0x08, 0x7d, 0x3f, 0x8d, 0x3f, 0x64, 0x4a, 0x0c, 0x8d, 0x2c, 0x82, 0xf6, 0x27, 0x54, 0x3f, + 0x0c, 0xc0, 0x55, 0x28, 0x76, 0xc9, 0x30, 0xce, 0x1a, 0x2c, 0xf1, 0x0a, 0x94, 0x06, 0x96, 0xd7, + 0x27, 0xb5, 0x42, 0x68, 0x8b, 0x36, 0x7f, 0x14, 0x7e, 0x43, 0xcd, 0x77, 0x08, 0x96, 0x8f, 0x89, + 0xbc, 0xf8, 0x9b, 0xb3, 0x73, 0xea, 0x1a, 0xe4, 0x71, 0x9f, 0x48, 0x85, 0x7f, 0x80, 0xc5, 0x01, + 0x11, 0x92, 0x72, 0x66, 0x52, 0x76, 0xce, 0x63, 0xa8, 0x4a, 0x6c, 0x3b, 0x62, 0xe7, 0x1c, 0xff, + 0x0e, 0x65, 0x49, 0x59, 0xd7, 0x64, 0xdc, 0x89, 0x60, 0x2b, 0xed, 0xf5, 0x49, 0x7d, 0x18, 0x0b, + 0x32, 0x19, 0x4a, 0x1d, 0x16, 0xd4, 0xd0, 0x27, 0x66, 0x5f, 0x78, 0xb5, 0x62, 0x88, 0xfc, 0x75, + 0xb0, 0xff, 0x5f, 0x78, 0x78, 0x0b, 0x96, 0x04, 0x91, 0x3e, 0x67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 0x53, 0xd6, 0x9d, 0x94, 0x75, 0x32, 0x9e, 0x76, 0xaf, + 0xa2, 0xa2, 0xac, 0x07, 0x3b, 0x2f, 0x47, 0x0d, 0x74, 0x35, 0x6a, 0xa0, 0xd7, 0xa3, 0x06, 0xba, + 0x1e, 0x35, 0xd0, 0xa3, 0x7a, 0x74, 0x98, 0xf2, 0x96, 0xe5, 0xd3, 0x56, 0xf6, 0x8f, 0xec, 0xec, + 0xab, 0xf0, 0x4f, 0xec, 0x97, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xf2, 0x04, 0xf7, 0x03, + 0x0a, 0x00, 0x00, } diff --git a/mcp/v1alpha1/mcp.proto b/mcp/v1alpha1/mcp.proto index b6b880333d..777f6ae0c6 100644 --- a/mcp/v1alpha1/mcp.proto +++ b/mcp/v1alpha1/mcp.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package istio.mcp.v1alpha1; -import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "gogoproto/gogo.proto"; import "mcp/v1alpha1/resource.proto"; @@ -33,8 +32,8 @@ message SinkNode { // An opaque identifier for the MCP node. string id = 1; - // Opaque metadata extending the node identifier. - google.protobuf.Struct metadata = 2; + // Opaque annotations extending the node identifier. + map annotations = 2; } // A MeshConfigRequest requests a set of versioned resources of the diff --git a/mcp/v1alpha1/metadata.pb.go b/mcp/v1alpha1/metadata.pb.go index 6a9c98c363..03443477a9 100644 --- a/mcp/v1alpha1/metadata.pb.go +++ b/mcp/v1alpha1/metadata.pb.go @@ -7,8 +7,7 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import google_protobuf3 "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" +import google_protobuf2 "github.com/gogo/protobuf/types" import io "io" @@ -22,23 +21,19 @@ type Metadata struct { // Fully qualified name of the resource. Unique in context of a collection. // // The FQ name consists of path segments which includes the resources - // location in a resource hierarchy. On k8s, this hierarchy is - // two-levels: cluster and namespace, e.g. + // location in a resource hierarchy. This hierarchy is currently + // two-levels: global and namespace, e.g. // - // namespaced => / - // cluster-scoped => / + // namespaced => / + // global-scoped => $global/ // - // Deeper hierarchy could also be represented, e.g. + // Namespace is a [DNS compatible label](https://tools.ietf.org/html/rfc1123) // - // // - // - // “/” are used as the standard delimiter. The rightmost segment is - // the most specific identifier (e.g. leaf). Segments moving towards the left - // represent higher positions in the resource hierarchy, similar to reverse - // DNS notation. + // Namespaces that begin with "$" are reserved for special cases, e.g. globally + // scoped resources. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The creation timestamp of the resource. - CreateTime *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime" json:"create_time,omitempty"` + CreateTime *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime" json:"create_time,omitempty"` // Resource version. This is used to determine when resources change across // resource updates. It should be treated as opaque by consumers/sinks. Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` @@ -62,7 +57,7 @@ func (m *Metadata) GetName() string { return "" } -func (m *Metadata) GetCreateTime() *google_protobuf3.Timestamp { +func (m *Metadata) GetCreateTime() *google_protobuf2.Timestamp { if m != nil { return m.CreateTime } @@ -354,7 +349,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.CreateTime == nil { - m.CreateTime = &google_protobuf3.Timestamp{} + m.CreateTime = &google_protobuf2.Timestamp{} } if err := m.CreateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -754,26 +749,26 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/metadata.proto", fileDescriptorMetadata) } var fileDescriptorMetadata = []byte{ - // 335 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x4a, 0xf3, 0x40, - 0x10, 0xc0, 0x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c, 0xb3, 0x4d, 0xc9, 0x39, 0x1e, 0xa6, - 0xb0, 0xe0, 0xa9, 0xf2, 0xfa, 0x53, 0x27, 0x74, 0xe7, 0x21, 0xfd, 0xb9, 0x31, 0x6d, 0x7f, 0x8c, - 0x5e, 0x1b, 0xf4, 0x2a, 0xd7, 0xe5, 0x3a, 0x6a, 0xfa, 0xc8, 0x2d, 0x76, 0x21, 0xcf, 0xa5, 0x06, - 0x2d, 0x64, 0xae, 0xbc, 0x81, 0xd1, 0x1c, 0xfc, 0xaa, 0xb9, 0xf8, 0xe6, 0xad, 0xab, 0x6b, 0xf0, - 0x8f, 0xb1, 0xdb, 0x99, 0x43, 0xc6, 0xd8, 0x79, 0xe1, 0xeb, 0xe6, 0x16, 0x75, 0x48, 0x26, 0x78, - 0xb0, 0x82, 0x74, 0x69, 0x8f, 0x30, 0x8a, 0x6c, 0x72, 0xd2, 0x3b, 0x42, 0xfe, 0x19, 0x1e, 0x6f, - 0xba, 0xff, 0xd2, 0x7f, 0xb9, 0xff, 0x56, 0x05, 0xe8, 0xbd, 0x0a, 0xd0, 0x47, 0x15, 0xa0, 0xcf, - 0x2a, 0x40, 0xf7, 0x5b, 0x76, 0x0f, 0x21, 0x19, 0x14, 0x82, 0x75, 0x9f, 0xca, 0x62, 0x68, 0x8e, - 0x7e, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x5a, 0x3a, 0xeb, 0x41, 0x02, 0x00, 0x00, + // 326 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x4a, 0xfb, 0x40, + 0x10, 0xc7, 0xd9, 0xa6, 0xed, 0xef, 0xd7, 0xc9, 0xa5, 0x2c, 0x3d, 0xc4, 0x08, 0xb1, 0x78, 0x0a, + 0x88, 0xbb, 0xb4, 0x5e, 0xfc, 0x03, 0xa2, 0x82, 0x37, 0x45, 0x08, 0x9e, 0x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a3, 0x37, 0xe0, 0x63, 0x51, 0x28, 0x83, 0x46, 0xaa, 0xa2, 0x0a, 0x7a, 0x56, 0xb3, 0xff, 0xab, + 0xe6, 0xfc, 0x8b, 0x77, 0xae, 0x4d, 0x43, 0x78, 0x04, 0xfe, 0xc6, 0x39, 0x74, 0x08, 0xde, 0xb3, + 0x58, 0xad, 0xb3, 0x68, 0x4a, 0x3a, 0x82, 0xde, 0x12, 0xb3, 0x85, 0x0b, 0x61, 0x90, 0xb8, 0xe6, + 0xb8, 0x73, 0x48, 0xc2, 0x53, 0x18, 0x7e, 0x77, 0xff, 0x65, 0xfe, 0x62, 0xef, 0xb5, 0x8e, 0xc8, + 0x5b, 0x1d, 0x91, 0xf7, 0x3a, 0x22, 0x1f, 0x75, 0x44, 0xee, 0xb6, 0xdc, 0x1e, 0x52, 0x71, 0xd4, + 0x92, 0x6f, 0x3e, 0x86, 0x59, 0xdf, 0x86, 0x7e, 0xf0, 0x19, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xc7, + 0x51, 0x07, 0x23, 0x02, 0x00, 0x00, } diff --git a/mcp/v1alpha1/metadata.proto b/mcp/v1alpha1/metadata.proto index 715b4db143..92c9856fc5 100644 --- a/mcp/v1alpha1/metadata.proto +++ b/mcp/v1alpha1/metadata.proto @@ -18,7 +18,6 @@ package istio.mcp.v1alpha1; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -import "google/protobuf/struct.proto"; option go_package="istio.io/api/mcp/v1alpha1"; option (gogoproto.equal_all) = true; @@ -28,20 +27,16 @@ message Metadata { // Fully qualified name of the resource. Unique in context of a collection. // // The FQ name consists of path segments which includes the resources - // location in a resource hierarchy. On k8s, this hierarchy is - // two-levels: cluster and namespace, e.g. + // location in a resource hierarchy. This hierarchy is currently + // two-levels: global and namespace, e.g. // - // namespaced => / - // cluster-scoped => / + // namespaced => / + // global-scoped => $global/ // - // Deeper hierarchy could also be represented, e.g. + // Namespace is a [DNS compatible label](https://tools.ietf.org/html/rfc1123) // - // // - // - // “/” are used as the standard delimiter. The rightmost segment is - // the most specific identifier (e.g. leaf). Segments moving towards the left - // represent higher positions in the resource hierarchy, similar to reverse - // DNS notation. + // Namespaces that begin with "$" are reserved for special cases, e.g. globally + // scoped resources. string name = 1; // The creation timestamp of the resource. diff --git a/mcp/v1alpha1/resource.pb.go b/mcp/v1alpha1/resource.pb.go index 564415b99c..9ea11cf6d3 100644 --- a/mcp/v1alpha1/resource.pb.go +++ b/mcp/v1alpha1/resource.pb.go @@ -6,7 +6,7 @@ package v1alpha1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf1 "github.com/gogo/protobuf/types" +import google_protobuf "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/gogoproto" import io "io" @@ -22,7 +22,7 @@ type Resource struct { // Common metadata describing the resource. Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` // The primary payload for the resource. - Body *google_protobuf1.Any `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"` + Body *google_protobuf.Any `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"` } func (m *Resource) Reset() { *m = Resource{} } @@ -37,7 +37,7 @@ func (m *Resource) GetMetadata() *Metadata { return nil } -func (m *Resource) GetBody() *google_protobuf1.Any { +func (m *Resource) GetBody() *google_protobuf.Any { if m != nil { return m.Body } @@ -237,7 +237,7 @@ func (m *Resource) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Body == nil { - m.Body = &google_protobuf1.Any{} + m.Body = &google_protobuf.Any{} } if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/proto.lock b/proto.lock index ac561e59ca..a291a3f16b 100644 --- a/proto.lock +++ b/proto.lock @@ -428,11 +428,16 @@ "id": 1, "name": "id", "type": "string" - }, + } + ], + "maps": [ { - "id": 2, - "name": "metadata", - "type": "google.protobuf.Struct" + "key_type": "string", + "field": { + "id": 2, + "name": "annotations", + "type": "string" + } } ] }, diff --git a/python/istio_api/mcp/v1alpha1/mcp_pb2.py b/python/istio_api/mcp/v1alpha1/mcp_pb2.py index e1c6514e0a..c380d4d828 100644 --- a/python/istio_api/mcp/v1alpha1/mcp_pb2.py +++ b/python/istio_api/mcp/v1alpha1/mcp_pb2.py @@ -13,7 +13,6 @@ _sym_db = _symbol_database.Default() -from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 from mcp.v1alpha1 import resource_pb2 as mcp_dot_v1alpha1_dot_resource__pb2 @@ -23,13 +22,50 @@ name='mcp/v1alpha1/mcp.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"A\n\x08SinkNode\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xae\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12/\n\tsink_node\x18\x02 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xd5\x02\n\x1cIncrementalMeshConfigRequest\x12/\n\tsink_node\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xbf\x02\n\x10RequestResources\x12/\n\tsink_node\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\tResources\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x35\n\tresources\x18\x03 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x04 \x03(\t\x12\r\n\x05nonce\x18\x05 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x16mcp/v1alpha1/mcp.proto\x12\x12istio.mcp.v1alpha1\x1a\x17google/rpc/status.proto\x1a\x14gogoproto/gogo.proto\x1a\x1bmcp/v1alpha1/resource.proto\"\x8e\x01\n\x08SinkNode\x12\n\n\x02id\x18\x01 \x01(\t\x12\x42\n\x0b\x61nnotations\x18\x02 \x03(\x0b\x32-.istio.mcp.v1alpha1.SinkNode.AnnotationsEntry\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xae\x01\n\x11MeshConfigRequest\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12/\n\tsink_node\x18\x02 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\"\x82\x01\n\x12MeshConfigResponse\x12\x14\n\x0cversion_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x10\n\x08type_url\x18\x03 \x01(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xd5\x02\n\x1cIncrementalMeshConfigRequest\x12/\n\tsink_node\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x10\n\x08type_url\x18\x02 \x01(\t\x12p\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32M.istio.mcp.v1alpha1.IncrementalMeshConfigRequest.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\x1dIncrementalMeshConfigResponse\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x35\n\tresources\x18\x02 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x03 \x03(\t\x12\r\n\x05nonce\x18\x04 \x01(\t\"\xbf\x02\n\x10RequestResources\x12/\n\tsink_node\x18\x01 \x01(\x0b\x32\x1c.istio.mcp.v1alpha1.SinkNode\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x64\n\x19initial_resource_versions\x18\x03 \x03(\x0b\x32\x41.istio.mcp.v1alpha1.RequestResources.InitialResourceVersionsEntry\x12\x16\n\x0eresponse_nonce\x18\x04 \x01(\t\x12(\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x12.google.rpc.Status\x1a>\n\x1cInitialResourceVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9d\x01\n\tResources\x12\x1b\n\x13system_version_info\x18\x01 \x01(\t\x12\x12\n\ncollection\x18\x02 \x01(\t\x12\x35\n\tresources\x18\x03 \x03(\x0b\x32\x1c.istio.mcp.v1alpha1.ResourceB\x04\xc8\xde\x1f\x00\x12\x19\n\x11removed_resources\x18\x04 \x03(\t\x12\r\n\x05nonce\x18\x05 \x01(\t2\x9d\x02\n\x1b\x41ggregatedMeshConfigService\x12p\n\x19StreamAggregatedResources\x12%.istio.mcp.v1alpha1.MeshConfigRequest\x1a&.istio.mcp.v1alpha1.MeshConfigResponse\"\x00(\x01\x30\x01\x12\x8b\x01\n\x1eIncrementalAggregatedResources\x12\x30.istio.mcp.v1alpha1.IncrementalMeshConfigRequest\x1a\x31.istio.mcp.v1alpha1.IncrementalMeshConfigResponse\"\x00(\x01\x30\x01\x32v\n\x0eResourceSource\x12\x64\n\x17\x45stablishResourceStream\x12$.istio.mcp.v1alpha1.RequestResources\x1a\x1d.istio.mcp.v1alpha1.Resources\"\x00(\x01\x30\x01\x32t\n\x0cResourceSink\x12\x64\n\x17\x45stablishResourceStream\x12\x1d.istio.mcp.v1alpha1.Resources\x1a$.istio.mcp.v1alpha1.RequestResources\"\x00(\x01\x30\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , - dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_resource__pb2.DESCRIPTOR,]) + dependencies=[google_dot_rpc_dot_status__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,mcp_dot_v1alpha1_dot_resource__pb2.DESCRIPTOR,]) +_SINKNODE_ANNOTATIONSENTRY = _descriptor.Descriptor( + name='AnnotationsEntry', + full_name='istio.mcp.v1alpha1.SinkNode.AnnotationsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='istio.mcp.v1alpha1.SinkNode.AnnotationsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='istio.mcp.v1alpha1.SinkNode.AnnotationsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=215, + serialized_end=265, +) + _SINKNODE = _descriptor.Descriptor( name='SinkNode', full_name='istio.mcp.v1alpha1.SinkNode', @@ -45,16 +81,16 @@ is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='metadata', full_name='istio.mcp.v1alpha1.SinkNode.metadata', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='annotations', full_name='istio.mcp.v1alpha1.SinkNode.annotations', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], - nested_types=[], + nested_types=[_SINKNODE_ANNOTATIONSENTRY, ], enum_types=[ ], options=None, @@ -63,8 +99,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=152, - serialized_end=217, + serialized_start=123, + serialized_end=265, ) @@ -122,8 +158,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=220, - serialized_end=394, + serialized_start=268, + serialized_end=442, ) @@ -174,8 +210,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=397, - serialized_end=527, + serialized_start=445, + serialized_end=575, ) @@ -212,8 +248,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=809, - serialized_end=871, + serialized_start=857, + serialized_end=919, ) _INCREMENTALMESHCONFIGREQUEST = _descriptor.Descriptor( @@ -270,8 +306,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=530, - serialized_end=871, + serialized_start=578, + serialized_end=919, ) @@ -322,8 +358,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=874, - serialized_end=1031, + serialized_start=922, + serialized_end=1079, ) @@ -360,8 +396,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=809, - serialized_end=871, + serialized_start=857, + serialized_end=919, ) _REQUESTRESOURCES = _descriptor.Descriptor( @@ -418,8 +454,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1034, - serialized_end=1353, + serialized_start=1082, + serialized_end=1401, ) @@ -477,11 +513,12 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1356, - serialized_end=1513, + serialized_start=1404, + serialized_end=1561, ) -_SINKNODE.fields_by_name['metadata'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_SINKNODE_ANNOTATIONSENTRY.containing_type = _SINKNODE +_SINKNODE.fields_by_name['annotations'].message_type = _SINKNODE_ANNOTATIONSENTRY _MESHCONFIGREQUEST.fields_by_name['sink_node'].message_type = _SINKNODE _MESHCONFIGREQUEST.fields_by_name['error_detail'].message_type = google_dot_rpc_dot_status__pb2._STATUS _MESHCONFIGRESPONSE.fields_by_name['resources'].message_type = mcp_dot_v1alpha1_dot_resource__pb2._RESOURCE @@ -505,11 +542,19 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) SinkNode = _reflection.GeneratedProtocolMessageType('SinkNode', (_message.Message,), dict( + + AnnotationsEntry = _reflection.GeneratedProtocolMessageType('AnnotationsEntry', (_message.Message,), dict( + DESCRIPTOR = _SINKNODE_ANNOTATIONSENTRY, + __module__ = 'mcp.v1alpha1.mcp_pb2' + # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.SinkNode.AnnotationsEntry) + )) + , DESCRIPTOR = _SINKNODE, __module__ = 'mcp.v1alpha1.mcp_pb2' # @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.SinkNode) )) _sym_db.RegisterMessage(SinkNode) +_sym_db.RegisterMessage(SinkNode.AnnotationsEntry) MeshConfigRequest = _reflection.GeneratedProtocolMessageType('MeshConfigRequest', (_message.Message,), dict( DESCRIPTOR = _MESHCONFIGREQUEST, @@ -572,6 +617,8 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\031istio.io/api/mcp/v1alpha1\250\342\036\001')) +_SINKNODE_ANNOTATIONSENTRY.has_options = True +_SINKNODE_ANNOTATIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _MESHCONFIGRESPONSE.fields_by_name['resources'].has_options = True _MESHCONFIGRESPONSE.fields_by_name['resources']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) _INCREMENTALMESHCONFIGREQUEST_INITIALRESOURCEVERSIONSENTRY.has_options = True @@ -589,8 +636,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=1516, - serialized_end=1801, + serialized_start=1564, + serialized_end=1849, methods=[ _descriptor.MethodDescriptor( name='StreamAggregatedResources', @@ -622,8 +669,8 @@ file=DESCRIPTOR, index=1, options=None, - serialized_start=1803, - serialized_end=1921, + serialized_start=1851, + serialized_end=1969, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', @@ -646,8 +693,8 @@ file=DESCRIPTOR, index=2, options=None, - serialized_start=1923, - serialized_end=2039, + serialized_start=1971, + serialized_end=2087, methods=[ _descriptor.MethodDescriptor( name='EstablishResourceStream', diff --git a/python/istio_api/mcp/v1alpha1/metadata_pb2.py b/python/istio_api/mcp/v1alpha1/metadata_pb2.py index 3be0202f3c..61a718660d 100644 --- a/python/istio_api/mcp/v1alpha1/metadata_pb2.py +++ b/python/istio_api/mcp/v1alpha1/metadata_pb2.py @@ -15,16 +15,15 @@ from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='mcp/v1alpha1/metadata.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xbb\x02\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.istio.mcp.v1alpha1.Metadata.LabelsEntry\x12\x42\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.istio.mcp.v1alpha1.Metadata.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x02\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.istio.mcp.v1alpha1.Metadata.LabelsEntry\x12\x42\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.istio.mcp.v1alpha1.Metadata.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , - dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) + dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -62,8 +61,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=355, - serialized_end=400, + serialized_start=325, + serialized_end=370, ) _METADATA_ANNOTATIONSENTRY = _descriptor.Descriptor( @@ -99,8 +98,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=402, - serialized_end=452, + serialized_start=372, + serialized_end=422, ) _METADATA = _descriptor.Descriptor( @@ -157,8 +156,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=137, - serialized_end=452, + serialized_start=107, + serialized_end=422, ) _METADATA_LABELSENTRY.containing_type = _METADATA From 36dcb68b0a6a303bfbf0f104681208b8f559831a Mon Sep 17 00:00:00 2001 From: Jason Young Date: Tue, 8 Jan 2019 15:11:20 -0800 Subject: [PATCH 14/14] update resource name documentation --- mcp/v1alpha1/istio.mcp.v1alpha1.pb.html | 35 ++++++-- mcp/v1alpha1/metadata.pb.go | 80 ++++++++++++------- mcp/v1alpha1/metadata.proto | 36 +++++++-- python/istio_api/mcp/v1alpha1/metadata_pb2.py | 17 ++-- 4 files changed, 114 insertions(+), 54 deletions(-) diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index 0a854ba91e..bcee77a76a 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -342,17 +342,36 @@

Metadata

diff --git a/mcp/v1alpha1/metadata.pb.go b/mcp/v1alpha1/metadata.pb.go index 03443477a9..bdd4632a26 100644 --- a/mcp/v1alpha1/metadata.pb.go +++ b/mcp/v1alpha1/metadata.pb.go @@ -8,6 +8,7 @@ import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" import google_protobuf2 "github.com/gogo/protobuf/types" +import _ "github.com/gogo/protobuf/types" import io "io" @@ -20,17 +21,36 @@ var _ = math.Inf type Metadata struct { // Fully qualified name of the resource. Unique in context of a collection. // - // The FQ name consists of path segments which includes the resources - // location in a resource hierarchy. This hierarchy is currently - // two-levels: global and namespace, e.g. + // The fully qualified name consists of a directory and basename. The directory identifies + // the resources location in a resource hierarchy. The basename identifies the specific + // resource name within the context of that directory. // - // namespaced => / - // global-scoped => $global/ + // The directory and basename are composed of one or more segments. Segments must be + // valid [DNS labels](https://tools.ietf.org/html/rfc1123). “/” is the delimiter between + // segments // - // Namespace is a [DNS compatible label](https://tools.ietf.org/html/rfc1123) + // The rightmost segment is the basename. All segments to the + // left of the basename form the directory. Segments moving towards the left + // represent higher positions in the resource hierarchy, similar to reverse + // DNS notation. e.g. // - // Namespaces that begin with "$" are reserved for special cases, e.g. globally - // scoped resources. + // //// + // + // An empty directory indicates a resource that is located at the root of the + // hierarchy, e.g. + // + // / + // + // On Kubernetes the resource hierarchy is two-levels: namespaces and + // cluster-scoped (i.e. global). + // + // Namespace resources fully qualified name is of the form: + // + // "//" + // + // Cluster scoped resources are located at the root of the hierarchy and are of the form: + // + // "/" Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The creation timestamp of the resource. CreateTime *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime" json:"create_time,omitempty"` @@ -749,26 +769,26 @@ var ( func init() { proto.RegisterFile("mcp/v1alpha1/metadata.proto", fileDescriptorMetadata) } var fileDescriptorMetadata = []byte{ - // 326 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x4a, 0xfb, 0x40, - 0x10, 0xc7, 0xd9, 0xa6, 0xed, 0xef, 0xd7, 0xc9, 0xa5, 0x2c, 0x3d, 0xc4, 0x08, 0xb1, 0x78, 0x0a, - 0x88, 0xbb, 0xb4, 0x5e, 0xfc, 0x03, 0xa2, 0x82, 0x37, 0x45, 0x08, 0x9e, 0xbc, 0xc8, 0xb4, 0xae, - 0x71, 0x31, 0xc9, 0x2e, 0xc9, 0xb6, 0xd0, 0xb3, 0x2f, 0xe3, 0xa3, 0x78, 0xf4, 0x11, 0x24, 0x4f, - 0x22, 0xd9, 0x6d, 0xb0, 0x28, 0x08, 0xde, 0x66, 0x92, 0xcf, 0x7c, 0x76, 0xe7, 0xcb, 0xc2, 0x76, - 0x3e, 0xd7, 0x7c, 0x39, 0xc1, 0x4c, 0x3f, 0xe1, 0x84, 0xe7, 0xc2, 0xe0, 0x03, 0x1a, 0x64, 0xba, - 0x54, 0x46, 0x51, 0x2a, 0x2b, 0x23, 0x15, 0xcb, 0xe7, 0x9a, 0xb5, 0x48, 0x38, 0x4a, 0x55, 0xaa, - 0xec, 0x6f, 0xde, 0x54, 0x8e, 0x0c, 0x77, 0x52, 0xa5, 0xd2, 0x4c, 0x70, 0xdb, 0xcd, 0x16, 0x8f, - 0xdc, 0xc8, 0x5c, 0x54, 0x06, 0x73, 0xed, 0x80, 0xdd, 0x17, 0x0f, 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x07, 0x23, 0x02, 0x00, 0x00, + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x4a, 0xf3, 0x40, + 0x10, 0xc0, 0xd9, 0xa6, 0xed, 0xf7, 0x75, 0x73, 0x29, 0x4b, 0x0f, 0x31, 0x4a, 0x2c, 0x9e, 0x02, + 0xe2, 0x2e, 0xad, 0x17, 0xff, 0x80, 0xa8, 0xe0, 0x4d, 0x11, 0x82, 0x27, 0x2f, 0x32, 0x8d, 0x6b, + 0x5c, 0x4c, 0xb2, 0x21, 0xbb, 0x2d, 0xf4, 0xec, 0xcb, 0xf8, 0x28, 0x1e, 0x7d, 0x04, 0xc9, 0x93, + 0x48, 0x76, 0x13, 0x0c, 0x15, 0x04, 0x6f, 0x33, 0x99, 0xdf, 0xfc, 0x26, 0x33, 0x2c, 0xde, 0xce, + 0xe2, 0x82, 0xad, 0x66, 0x90, 0x16, 0xcf, 0x30, 0x63, 0x19, 0xd7, 0xf0, 0x08, 0x1a, 0x68, 0x51, + 0x4a, 0x2d, 0x09, 0x11, 0x4a, 0x0b, 0x49, 0xb3, 0xb8, 0xa0, 0x2d, 0xe2, 0x4f, 0x12, 0x99, 0x48, + 0x53, 0x66, 0x75, 0x64, 0x49, 0x7f, 0x37, 0x91, 0x32, 0x49, 0x39, 0x33, 0xd9, 0x62, 0xf9, 0xc4, + 0xb4, 0xc8, 0xb8, 0xd2, 0x90, 0x15, 0x0d, 0xb0, 0xb3, 0x09, 0x28, 0x5d, 0x2e, 0x63, 0x6d, 0xab, + 0x7b, 0xaf, 0x0e, 0xfe, 0x7f, 0xd3, 0xcc, 0x26, 0x04, 0xf7, 0x73, 0xc8, 0xb8, 0x87, 0xa6, 0x28, + 0x1c, 0x45, 0x26, 0x26, 0xa7, 0xd8, 0x8d, 0x4b, 0x0e, 0x9a, 0x3f, 0xd4, 0x62, 0xaf, 0x37, 0x45, + 0xa1, 0x3b, 0xf7, 0xa9, 0x95, 0xd2, 0x56, 0x4a, 0xef, 0xda, 0xa9, 0x11, 0xb6, 0x78, 0xfd, 0x81, + 0x78, 0xf8, 0xdf, 0x8a, 0x97, 0x4a, 0xc8, 0xdc, 0x73, 0x8c, 0xb3, 0x4d, 0xc9, 0x39, 0x1e, 0xa6, + 0xb0, 0xe0, 0xa9, 0xf2, 0xfa, 0x53, 0x27, 0x74, 0xe7, 0x21, 0xfd, 0xb9, 0x31, 0x6d, 0x7f, 0x8c, + 0x5e, 0x1b, 0xf4, 0x2a, 0xd7, 0xe5, 0x3a, 0x6a, 0xfa, 0xc8, 0x2d, 0x76, 0x21, 0xcf, 0xa5, 0x06, + 0x2d, 0x64, 0xae, 0xbc, 0x81, 0xd1, 0x1c, 0xfc, 0xaa, 0xb9, 0xf8, 0xe6, 0xad, 0xab, 0x6b, 0xf0, + 0x8f, 0xb1, 0xdb, 0x99, 0x43, 0xc6, 0xd8, 0x79, 0xe1, 0xeb, 0xe6, 0x16, 0x75, 0x48, 0x26, 0x78, + 0xb0, 0x82, 0x74, 0x69, 0x8f, 0x30, 0x8a, 0x6c, 0x72, 0xd2, 0x3b, 0x42, 0xfe, 0x19, 0x1e, 0x6f, + 0xba, 0xff, 0xd2, 0x7f, 0xb9, 0xff, 0x56, 0x05, 0xe8, 0xbd, 0x0a, 0xd0, 0x47, 0x15, 0xa0, 0xcf, + 0x2a, 0x40, 0xf7, 0x5b, 0x76, 0x0f, 0x21, 0x19, 0x14, 0x82, 0x75, 0x9f, 0xca, 0x62, 0x68, 0x8e, + 0x7e, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x5a, 0x3a, 0xeb, 0x41, 0x02, 0x00, 0x00, } diff --git a/mcp/v1alpha1/metadata.proto b/mcp/v1alpha1/metadata.proto index 92c9856fc5..e02c5da3bc 100644 --- a/mcp/v1alpha1/metadata.proto +++ b/mcp/v1alpha1/metadata.proto @@ -18,6 +18,7 @@ package istio.mcp.v1alpha1; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/struct.proto"; option go_package="istio.io/api/mcp/v1alpha1"; option (gogoproto.equal_all) = true; @@ -26,17 +27,36 @@ option (gogoproto.equal_all) = true; message Metadata { // Fully qualified name of the resource. Unique in context of a collection. // - // The FQ name consists of path segments which includes the resources - // location in a resource hierarchy. This hierarchy is currently - // two-levels: global and namespace, e.g. + // The fully qualified name consists of a directory and basename. The directory identifies + // the resources location in a resource hierarchy. The basename identifies the specific + // resource name within the context of that directory. // - // namespaced => / - // global-scoped => $global/ + // The directory and basename are composed of one or more segments. Segments must be + // valid [DNS labels](https://tools.ietf.org/html/rfc1123). “/” is the delimiter between + // segments // - // Namespace is a [DNS compatible label](https://tools.ietf.org/html/rfc1123) + // The rightmost segment is the basename. All segments to the + // left of the basename form the directory. Segments moving towards the left + // represent higher positions in the resource hierarchy, similar to reverse + // DNS notation. e.g. // - // Namespaces that begin with "$" are reserved for special cases, e.g. globally - // scoped resources. + // //// + // + // An empty directory indicates a resource that is located at the root of the + // hierarchy, e.g. + // + // / + // + // On Kubernetes the resource hierarchy is two-levels: namespaces and + // cluster-scoped (i.e. global). + // + // Namespace resources fully qualified name is of the form: + // + // "//" + // + // Cluster scoped resources are located at the root of the hierarchy and are of the form: + // + // "/" string name = 1; // The creation timestamp of the resource. diff --git a/python/istio_api/mcp/v1alpha1/metadata_pb2.py b/python/istio_api/mcp/v1alpha1/metadata_pb2.py index 61a718660d..3be0202f3c 100644 --- a/python/istio_api/mcp/v1alpha1/metadata_pb2.py +++ b/python/istio_api/mcp/v1alpha1/metadata_pb2.py @@ -15,15 +15,16 @@ from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='mcp/v1alpha1/metadata.proto', package='istio.mcp.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x02\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.istio.mcp.v1alpha1.Metadata.LabelsEntry\x12\x42\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.istio.mcp.v1alpha1.Metadata.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') + serialized_pb=_b('\n\x1bmcp/v1alpha1/metadata.proto\x12\x12istio.mcp.v1alpha1\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xbb\x02\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x38\n\x06labels\x18\x04 \x03(\x0b\x32(.istio.mcp.v1alpha1.Metadata.LabelsEntry\x12\x42\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32-.istio.mcp.v1alpha1.Metadata.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x1fZ\x19istio.io/api/mcp/v1alpha1\xa8\xe2\x1e\x01\x62\x06proto3') , - dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -61,8 +62,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=325, - serialized_end=370, + serialized_start=355, + serialized_end=400, ) _METADATA_ANNOTATIONSENTRY = _descriptor.Descriptor( @@ -98,8 +99,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=372, - serialized_end=422, + serialized_start=402, + serialized_end=452, ) _METADATA = _descriptor.Descriptor( @@ -156,8 +157,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=107, - serialized_end=422, + serialized_start=137, + serialized_end=452, ) _METADATA_LABELSENTRY.containing_type = _METADATA
FieldTypeDescription
idstring +

An opaque identifier for the MCP node.

+ +
metadatagoogle.protobuf.Struct +

Opaque metadata extending the node identifier.

+
metadatagoogle.protobuf.Struct
annotationsmap<string, string> -

Opaque metadata extending the node identifier.

+

Opaque annotations extending the node identifier.

Fully qualified name of the resource. Unique in context of a collection.

-

The FQ name consists of path segments which includes the resources -location in a resource hierarchy. This hierarchy is currently -two-levels: global and namespace, e.g.

+

The fully qualified name consists of a directory and basename. The directory identifies +the resources location in a resource hierarchy. The basename identifies the specific +resource name within the context of that directory.

-

namespaced => / - global-scoped => $global/

+

The directory and basename are composed of one or more segments. Segments must be +valid DNS labels. “/” is the delimiter between +segments

-

Namespace is a DNS compatible label

+

The rightmost segment is the basename. All segments to the +left of the basename form the directory. Segments moving towards the left +represent higher positions in the resource hierarchy, similar to reverse +DNS notation. e.g.

-

Namespaces that begin with “$” are reserved for special cases, e.g. globally -scoped resources.

+

////

+ +

An empty directory indicates a resource that is located at the root of the +hierarchy, e.g.

+ +

/

+ +

On Kubernetes the resource hierarchy is two-levels: namespaces and +cluster-scoped (i.e. global).

+ +

Namespace resources fully qualified name is of the form:

+ +

”//

+ +

Cluster scoped resources are located at the root of the hierarchy and are of the form:

+ +

”/