diff --git a/mesh/v1alpha1/config.pb.go b/mesh/v1alpha1/config.pb.go
index f3a0c3eb12..df48c35359 100644
--- a/mesh/v1alpha1/config.pb.go
+++ b/mesh/v1alpha1/config.pb.go
@@ -6,12 +6,13 @@
It is generated from these files:
mesh/v1alpha1/config.proto
- mesh/v1alpha1/mesh.proto
+ mesh/v1alpha1/network.proto
mesh/v1alpha1/proxy.proto
It has these top-level messages:
MeshConfig
Network
+ MeshNetworks
Tracing
ProxyConfig
*/
diff --git a/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html b/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html
index 392830e414..b91f5001c0 100644
--- a/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html
+++ b/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html
@@ -4,7 +4,7 @@
generator: protoc-gen-docs
aliases:
- /docs/reference/config/service-mesh.html
-number_of_entries: 10
+number_of_entries: 12
---
AuthenticationPolicy
@@ -255,6 +255,44 @@ MeshConfig.IngressControllerMode
a secondary ingress controller (e.g., in addition to a
cloud-provided ingress controller).
+
+
+
+
+
+MeshNetworks
+
+MeshNetworks (config map) provides information about the set of networks
+inside a mesh and how to route to endpoints in each network. For example
+
+MeshNetworks(file/config map):
+networks:
+- network1:
+ - endpoints:
+ - fromRegistry: registry1 #must match secret name in kubernetes
+ - fromCidr: 192.168.100.0/22 #a VM network for example
+ gateways:
+ - registryServiceName: istio-ingressgateway.istio-system.svc.cluster.local
+ port: 15443
+ locality: us-east-1a
+
+
+
+
+| Field |
+Type |
+Description |
+
+
+
+
+networks |
+map<string, Network> |
+
+ REQUIRED: The set of networks inside this mesh. Each network should
+have a unique name and information about how to infer the endpoints in
+the network as well as the gateways associated with the network.
+
|
@@ -277,21 +315,13 @@ Network
-
-name |
-string |
+
+endpoints |
+Network.NetworkEndpoints[] |
- A unique name assigned to the network.
-
- |
-
-
-registries |
-string[] |
-
- One or more service registries that are in this network. Endpoints
-from these registries will be directly reachable to one another.
-The names of the registries should correspond to the data sources.
+REQUIRED: The list of endpoints in the network (obtained through the
+constituent service registries or from CIDR ranges). All endpoints in
+the network are directly accessible to one another.
|
@@ -299,6 +329,8 @@ Network
gateways |
Network.IstioNetworkGateway[] |
+ REQUIRED: Set of gateways associated with the network.
+
|
@@ -345,7 +377,7 @@ Network.IstioNetworkGateway
port |
uint32 |
- The port associated with the gateway.
+REQUIRED: The port associated with the gateway.
|
@@ -355,6 +387,63 @@ Network.IstioNetworkGateway
The locality associated with an explicitly specified gateway (i.e. ip)
+ |
+
+
+
+
+Network.NetworkEndpoints
+
+NetworkEndpoints describes how the network associated with an endpoint
+should be inferred. An endpoint will be assigned to a network based on
+the following rules:
+
+
+Implicitly: If the registry explicitly provides information about
+the network to which the endpoint belongs to. In some cases, its
+possible to indicate the network associated with the endpoint by
+adding ISTIOMETANETWORK environment variable to the sidecar.
+
+Explicitly:
+
+
+a. By matching the registry name with one of the “fromregistries”
+ in the mesh config. A “fromregistry” can only be assinged to a
+ single network.
+
+b. By matching the IP against one of the CIDR ranges in a mesh
+ config network. The CIDR ranges must not overlap and be assigned to
+ a single network.
+
+(2) will override (1) if both are present.
+
+
+
+
+| Field |
+Type |
+Description |
+
+
+
+
+fromCidr |
+string (oneof) |
+
+ A CIDR range for the set of endpoints in this network. The CIDR
+ranges for endpoints from different networks must not overlap.
+
+ |
+
+
+fromRegistry |
+string (oneof) |
+
+ Add all endpoints from the specified registry into this network.
+The names of the registries should correspond to the secret name
+that was used to configure the registry (kubernetes multicluster) or
+supplied by MCP server.
+
|
diff --git a/mesh/v1alpha1/mesh.pb.go b/mesh/v1alpha1/mesh.pb.go
deleted file mode 100644
index 8bc20cf406..0000000000
--- a/mesh/v1alpha1/mesh.pb.go
+++ /dev/null
@@ -1,800 +0,0 @@
-// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: mesh/v1alpha1/mesh.proto
-
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import io "io"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// Network provides information about the endpoints in a routable L3
-// network. A single routable L3 network can have one or more service
-// registries. Note that the network has no relation to the locality of the
-// endpoint. The endpoint locality will be obtained from the service
-// registry.
-type Network struct {
- // A unique name assigned to the network.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // One or more service registries that are in this network. Endpoints
- // from these registries will be directly reachable to one another.
- // The names of the registries should correspond to the data sources.
- Registries []string `protobuf:"bytes,2,rep,name=registries" json:"registries,omitempty"`
- Gateways []*Network_IstioNetworkGateway `protobuf:"bytes,3,rep,name=gateways" json:"gateways,omitempty"`
-}
-
-func (m *Network) Reset() { *m = Network{} }
-func (m *Network) String() string { return proto.CompactTextString(m) }
-func (*Network) ProtoMessage() {}
-func (*Network) Descriptor() ([]byte, []int) { return fileDescriptorMesh, []int{0} }
-
-func (m *Network) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *Network) GetRegistries() []string {
- if m != nil {
- return m.Registries
- }
- return nil
-}
-
-func (m *Network) GetGateways() []*Network_IstioNetworkGateway {
- if m != nil {
- return m.Gateways
- }
- return nil
-}
-
-// The gateway associated with this network. Traffic from remote networks
-// will arrive at the specified gateway:port. All incoming traffic must
-// use mTLS.
-type Network_IstioNetworkGateway struct {
- // Types that are valid to be assigned to Gw:
- // *Network_IstioNetworkGateway_RegistryServiceName
- // *Network_IstioNetworkGateway_Address
- Gw isNetwork_IstioNetworkGateway_Gw `protobuf_oneof:"gw"`
- // The port associated with the gateway.
- Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
- // The locality associated with an explicitly specified gateway (i.e. ip)
- Locality string `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"`
-}
-
-func (m *Network_IstioNetworkGateway) Reset() { *m = Network_IstioNetworkGateway{} }
-func (m *Network_IstioNetworkGateway) String() string { return proto.CompactTextString(m) }
-func (*Network_IstioNetworkGateway) ProtoMessage() {}
-func (*Network_IstioNetworkGateway) Descriptor() ([]byte, []int) {
- return fileDescriptorMesh, []int{0, 0}
-}
-
-type isNetwork_IstioNetworkGateway_Gw interface {
- isNetwork_IstioNetworkGateway_Gw()
- MarshalTo([]byte) (int, error)
- Size() int
-}
-
-type Network_IstioNetworkGateway_RegistryServiceName struct {
- RegistryServiceName string `protobuf:"bytes,1,opt,name=registry_service_name,json=registryServiceName,proto3,oneof"`
-}
-type Network_IstioNetworkGateway_Address struct {
- Address string `protobuf:"bytes,2,opt,name=address,proto3,oneof"`
-}
-
-func (*Network_IstioNetworkGateway_RegistryServiceName) isNetwork_IstioNetworkGateway_Gw() {}
-func (*Network_IstioNetworkGateway_Address) isNetwork_IstioNetworkGateway_Gw() {}
-
-func (m *Network_IstioNetworkGateway) GetGw() isNetwork_IstioNetworkGateway_Gw {
- if m != nil {
- return m.Gw
- }
- return nil
-}
-
-func (m *Network_IstioNetworkGateway) GetRegistryServiceName() string {
- if x, ok := m.GetGw().(*Network_IstioNetworkGateway_RegistryServiceName); ok {
- return x.RegistryServiceName
- }
- return ""
-}
-
-func (m *Network_IstioNetworkGateway) GetAddress() string {
- if x, ok := m.GetGw().(*Network_IstioNetworkGateway_Address); ok {
- return x.Address
- }
- return ""
-}
-
-func (m *Network_IstioNetworkGateway) GetPort() uint32 {
- if m != nil {
- return m.Port
- }
- return 0
-}
-
-func (m *Network_IstioNetworkGateway) GetLocality() string {
- if m != nil {
- return m.Locality
- }
- return ""
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Network_IstioNetworkGateway) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Network_IstioNetworkGateway_OneofMarshaler, _Network_IstioNetworkGateway_OneofUnmarshaler, _Network_IstioNetworkGateway_OneofSizer, []interface{}{
- (*Network_IstioNetworkGateway_RegistryServiceName)(nil),
- (*Network_IstioNetworkGateway_Address)(nil),
- }
-}
-
-func _Network_IstioNetworkGateway_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Network_IstioNetworkGateway)
- // gw
- switch x := m.Gw.(type) {
- case *Network_IstioNetworkGateway_RegistryServiceName:
- _ = b.EncodeVarint(1<<3 | proto.WireBytes)
- _ = b.EncodeStringBytes(x.RegistryServiceName)
- case *Network_IstioNetworkGateway_Address:
- _ = b.EncodeVarint(2<<3 | proto.WireBytes)
- _ = b.EncodeStringBytes(x.Address)
- case nil:
- default:
- return fmt.Errorf("Network_IstioNetworkGateway.Gw has unexpected type %T", x)
- }
- return nil
-}
-
-func _Network_IstioNetworkGateway_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Network_IstioNetworkGateway)
- switch tag {
- case 1: // gw.registry_service_name
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Gw = &Network_IstioNetworkGateway_RegistryServiceName{x}
- return true, err
- case 2: // gw.address
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Gw = &Network_IstioNetworkGateway_Address{x}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Network_IstioNetworkGateway_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Network_IstioNetworkGateway)
- // gw
- switch x := m.Gw.(type) {
- case *Network_IstioNetworkGateway_RegistryServiceName:
- n += proto.SizeVarint(1<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.RegistryServiceName)))
- n += len(x.RegistryServiceName)
- case *Network_IstioNetworkGateway_Address:
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(len(x.Address)))
- n += len(x.Address)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-func init() {
- proto.RegisterType((*Network)(nil), "istio.mesh.v1alpha1.Network")
- proto.RegisterType((*Network_IstioNetworkGateway)(nil), "istio.mesh.v1alpha1.Network.IstioNetworkGateway")
-}
-func (m *Network) 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 *Network) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Name) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintMesh(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- }
- if len(m.Registries) > 0 {
- for _, s := range m.Registries {
- dAtA[i] = 0x12
- 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.Gateways) > 0 {
- for _, msg := range m.Gateways {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintMesh(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
-}
-
-func (m *Network_IstioNetworkGateway) 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 *Network_IstioNetworkGateway) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Gw != nil {
- nn1, err := m.Gw.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += nn1
- }
- if m.Port != 0 {
- dAtA[i] = 0x18
- i++
- i = encodeVarintMesh(dAtA, i, uint64(m.Port))
- }
- if len(m.Locality) > 0 {
- dAtA[i] = 0x22
- i++
- i = encodeVarintMesh(dAtA, i, uint64(len(m.Locality)))
- i += copy(dAtA[i:], m.Locality)
- }
- return i, nil
-}
-
-func (m *Network_IstioNetworkGateway_RegistryServiceName) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- dAtA[i] = 0xa
- i++
- i = encodeVarintMesh(dAtA, i, uint64(len(m.RegistryServiceName)))
- i += copy(dAtA[i:], m.RegistryServiceName)
- return i, nil
-}
-func (m *Network_IstioNetworkGateway_Address) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- dAtA[i] = 0x12
- i++
- i = encodeVarintMesh(dAtA, i, uint64(len(m.Address)))
- i += copy(dAtA[i:], m.Address)
- return i, nil
-}
-func encodeVarintMesh(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
-}
-func (m *Network) Size() (n int) {
- var l int
- _ = l
- l = len(m.Name)
- if l > 0 {
- n += 1 + l + sovMesh(uint64(l))
- }
- if len(m.Registries) > 0 {
- for _, s := range m.Registries {
- l = len(s)
- n += 1 + l + sovMesh(uint64(l))
- }
- }
- if len(m.Gateways) > 0 {
- for _, e := range m.Gateways {
- l = e.Size()
- n += 1 + l + sovMesh(uint64(l))
- }
- }
- return n
-}
-
-func (m *Network_IstioNetworkGateway) Size() (n int) {
- var l int
- _ = l
- if m.Gw != nil {
- n += m.Gw.Size()
- }
- if m.Port != 0 {
- n += 1 + sovMesh(uint64(m.Port))
- }
- l = len(m.Locality)
- if l > 0 {
- n += 1 + l + sovMesh(uint64(l))
- }
- return n
-}
-
-func (m *Network_IstioNetworkGateway_RegistryServiceName) Size() (n int) {
- var l int
- _ = l
- l = len(m.RegistryServiceName)
- n += 1 + l + sovMesh(uint64(l))
- return n
-}
-func (m *Network_IstioNetworkGateway_Address) Size() (n int) {
- var l int
- _ = l
- l = len(m.Address)
- n += 1 + l + sovMesh(uint64(l))
- return n
-}
-
-func sovMesh(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
-}
-func sozMesh(x uint64) (n int) {
- return sovMesh(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (m *Network) 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 ErrIntOverflowMesh
- }
- 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: Network: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Network: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowMesh
- }
- 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 ErrInvalidLengthMesh
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Registries", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowMesh
- }
- 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 ErrInvalidLengthMesh
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Registries = append(m.Registries, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowMesh
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthMesh
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Gateways = append(m.Gateways, &Network_IstioNetworkGateway{})
- if err := m.Gateways[len(m.Gateways)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipMesh(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthMesh
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *Network_IstioNetworkGateway) 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 ErrIntOverflowMesh
- }
- 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: IstioNetworkGateway: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: IstioNetworkGateway: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RegistryServiceName", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowMesh
- }
- 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 ErrInvalidLengthMesh
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Gw = &Network_IstioNetworkGateway_RegistryServiceName{string(dAtA[iNdEx:postIndex])}
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowMesh
- }
- 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 ErrInvalidLengthMesh
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Gw = &Network_IstioNetworkGateway_Address{string(dAtA[iNdEx:postIndex])}
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
- }
- m.Port = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowMesh
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Port |= (uint32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowMesh
- }
- 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 ErrInvalidLengthMesh
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Locality = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipMesh(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthMesh
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipMesh(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, ErrIntOverflowMesh
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowMesh
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowMesh
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthMesh
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowMesh
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipMesh(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
-}
-
-var (
- ErrInvalidLengthMesh = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowMesh = fmt.Errorf("proto: integer overflow")
-)
-
-func init() { proto.RegisterFile("mesh/v1alpha1/mesh.proto", fileDescriptorMesh) }
-
-var fileDescriptorMesh = []byte{
- // 275 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x50, 0x31, 0x4e, 0xc3, 0x30,
- 0x14, 0xc5, 0x49, 0x44, 0xdb, 0x8f, 0x58, 0x1c, 0x21, 0x59, 0x19, 0xa2, 0x88, 0x29, 0x93, 0x43,
- 0x81, 0x13, 0x74, 0x01, 0x24, 0xd4, 0xc1, 0x6c, 0x2c, 0x95, 0x69, 0xad, 0xd4, 0x22, 0xc5, 0x91,
- 0x6d, 0x35, 0xca, 0x61, 0x38, 0x01, 0x17, 0x61, 0xe4, 0x08, 0x28, 0x27, 0x41, 0x76, 0x92, 0x02,
- 0x52, 0xb7, 0xff, 0xde, 0xfb, 0xf6, 0x7b, 0xff, 0x01, 0xd9, 0x09, 0xb3, 0x2d, 0xf6, 0x73, 0x5e,
- 0xd5, 0x5b, 0x3e, 0x2f, 0x1c, 0xa2, 0xb5, 0x56, 0x56, 0xe1, 0x58, 0x1a, 0x2b, 0x15, 0xf5, 0xcc,
- 0xa8, 0x5f, 0x7e, 0x04, 0x30, 0x59, 0x0a, 0xdb, 0x28, 0xfd, 0x8a, 0x31, 0x44, 0x6f, 0x7c, 0x27,
- 0x08, 0xca, 0x50, 0x3e, 0x63, 0x7e, 0xc6, 0x29, 0x80, 0x16, 0xa5, 0x34, 0x56, 0x4b, 0x61, 0x48,
- 0x90, 0x85, 0xf9, 0x8c, 0xfd, 0x61, 0xf0, 0x23, 0x4c, 0x4b, 0x6e, 0x45, 0xc3, 0x5b, 0x43, 0xc2,
- 0x2c, 0xcc, 0xcf, 0xae, 0xaf, 0xe8, 0x11, 0x1f, 0x3a, 0x78, 0xd0, 0x07, 0xa7, 0x0d, 0xe0, 0xae,
- 0x7f, 0xc8, 0x0e, 0x3f, 0x24, 0xef, 0x08, 0xe2, 0x23, 0x1b, 0xf8, 0x16, 0x2e, 0x06, 0xcf, 0x76,
- 0x65, 0x84, 0xde, 0xcb, 0xb5, 0x58, 0xfd, 0x46, 0xbd, 0x3f, 0x61, 0xf1, 0x28, 0x3f, 0xf5, 0xea,
- 0xd2, 0x65, 0x4f, 0x60, 0xc2, 0x37, 0x1b, 0x2d, 0x8c, 0x0b, 0xde, 0xef, 0x8d, 0x84, 0xbb, 0xb5,
- 0x56, 0xda, 0x92, 0x30, 0x43, 0xf9, 0x39, 0xf3, 0x33, 0x4e, 0x60, 0x5a, 0xa9, 0x35, 0xaf, 0xa4,
- 0x6d, 0x49, 0xe4, 0x3b, 0x38, 0xe0, 0x45, 0x04, 0x41, 0xd9, 0x2c, 0xf2, 0xcf, 0x2e, 0x45, 0x5f,
- 0x5d, 0x8a, 0xbe, 0xbb, 0x14, 0x3d, 0x27, 0xfd, 0xa1, 0x52, 0x15, 0xbc, 0x96, 0xc5, 0xbf, 0xde,
- 0x5f, 0x4e, 0x7d, 0xe7, 0x37, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x49, 0xb6, 0xd4, 0x8f,
- 0x01, 0x00, 0x00,
-}
diff --git a/mesh/v1alpha1/mesh.proto b/mesh/v1alpha1/mesh.proto
deleted file mode 100644
index 48e6730808..0000000000
--- a/mesh/v1alpha1/mesh.proto
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2018 Istio Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-syntax = "proto3";
-
-package istio.mesh.v1alpha1;
-
-option go_package="istio.io/api/mesh/v1alpha1";
-
-// Network provides information about the endpoints in a routable L3
-// network. A single routable L3 network can have one or more service
-// registries. Note that the network has no relation to the locality of the
-// endpoint. The endpoint locality will be obtained from the service
-// registry.
-message Network {
- // A unique name assigned to the network.
- string name = 1;
-
- // One or more service registries that are in this network. Endpoints
- // from these registries will be directly reachable to one another.
- // The names of the registries should correspond to the data sources.
- repeated string registries = 2;
-
- // The gateway associated with this network. Traffic from remote networks
- // will arrive at the specified gateway:port. All incoming traffic must
- // use mTLS.
- message IstioNetworkGateway {
- oneof gw {
- // A fully qualified domain name of the gateway service. Pilot will
- // lookup the service from the service registries in the network and
- // obtain the endpoint IPs of the gateway from the service
- // registry. Note that while the service name is a fully qualified
- // domain name, it need not be resolvable outside the orchestration
- // platform for the registry. e.g., this could be
- // istio-ingressgateway.istio-system.svc.cluster.local.
- string registry_service_name = 1;
-
- // IP address or externally resolvable DNS address associated with the gateway.
- string address = 2;
- }
-
- // The port associated with the gateway.
- uint32 port = 3;
-
- // The locality associated with an explicitly specified gateway (i.e. ip)
- string locality = 4;
- }
-
- repeated IstioNetworkGateway gateways = 3;
-}
diff --git a/mesh/v1alpha1/network.pb.go b/mesh/v1alpha1/network.pb.go
new file mode 100644
index 0000000000..05bafac843
--- /dev/null
+++ b/mesh/v1alpha1/network.pb.go
@@ -0,0 +1,1340 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: mesh/v1alpha1/network.proto
+
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// Network provides information about the endpoints in a routable L3
+// network. A single routable L3 network can have one or more service
+// registries. Note that the network has no relation to the locality of the
+// endpoint. The endpoint locality will be obtained from the service
+// registry.
+type Network struct {
+ // REQUIRED: The list of endpoints in the network (obtained through the
+ // constituent service registries or from CIDR ranges). All endpoints in
+ // the network are directly accessible to one another.
+ Endpoints []*Network_NetworkEndpoints `protobuf:"bytes,2,rep,name=endpoints" json:"endpoints,omitempty"`
+ // REQUIRED: Set of gateways associated with the network.
+ Gateways []*Network_IstioNetworkGateway `protobuf:"bytes,3,rep,name=gateways" json:"gateways,omitempty"`
+}
+
+func (m *Network) Reset() { *m = Network{} }
+func (m *Network) String() string { return proto.CompactTextString(m) }
+func (*Network) ProtoMessage() {}
+func (*Network) Descriptor() ([]byte, []int) { return fileDescriptorNetwork, []int{0} }
+
+func (m *Network) GetEndpoints() []*Network_NetworkEndpoints {
+ if m != nil {
+ return m.Endpoints
+ }
+ return nil
+}
+
+func (m *Network) GetGateways() []*Network_IstioNetworkGateway {
+ if m != nil {
+ return m.Gateways
+ }
+ return nil
+}
+
+// NetworkEndpoints describes how the network associated with an endpoint
+// should be inferred. An endpoint will be assigned to a network based on
+// the following rules:
+//
+// 1. Implicitly: If the registry explicitly provides information about
+// the network to which the endpoint belongs to. In some cases, its
+// possible to indicate the network associated with the endpoint by
+// adding ISTIO_META_NETWORK environment variable to the sidecar.
+//
+// 2. Explicitly:
+//
+// a. By matching the registry name with one of the "from_registries"
+// in the mesh config. A "from_registry" can only be assinged to a
+// single network.
+//
+// b. By matching the IP against one of the CIDR ranges in a mesh
+// config network. The CIDR ranges must not overlap and be assigned to
+// a single network.
+//
+// (2) will override (1) if both are present.
+type Network_NetworkEndpoints struct {
+ // Types that are valid to be assigned to Ne:
+ // *Network_NetworkEndpoints_FromCidr
+ // *Network_NetworkEndpoints_FromRegistry
+ Ne isNetwork_NetworkEndpoints_Ne `protobuf_oneof:"ne"`
+}
+
+func (m *Network_NetworkEndpoints) Reset() { *m = Network_NetworkEndpoints{} }
+func (m *Network_NetworkEndpoints) String() string { return proto.CompactTextString(m) }
+func (*Network_NetworkEndpoints) ProtoMessage() {}
+func (*Network_NetworkEndpoints) Descriptor() ([]byte, []int) {
+ return fileDescriptorNetwork, []int{0, 0}
+}
+
+type isNetwork_NetworkEndpoints_Ne interface {
+ isNetwork_NetworkEndpoints_Ne()
+ MarshalTo([]byte) (int, error)
+ Size() int
+}
+
+type Network_NetworkEndpoints_FromCidr struct {
+ FromCidr string `protobuf:"bytes,1,opt,name=from_cidr,json=fromCidr,proto3,oneof"`
+}
+type Network_NetworkEndpoints_FromRegistry struct {
+ FromRegistry string `protobuf:"bytes,2,opt,name=from_registry,json=fromRegistry,proto3,oneof"`
+}
+
+func (*Network_NetworkEndpoints_FromCidr) isNetwork_NetworkEndpoints_Ne() {}
+func (*Network_NetworkEndpoints_FromRegistry) isNetwork_NetworkEndpoints_Ne() {}
+
+func (m *Network_NetworkEndpoints) GetNe() isNetwork_NetworkEndpoints_Ne {
+ if m != nil {
+ return m.Ne
+ }
+ return nil
+}
+
+func (m *Network_NetworkEndpoints) GetFromCidr() string {
+ if x, ok := m.GetNe().(*Network_NetworkEndpoints_FromCidr); ok {
+ return x.FromCidr
+ }
+ return ""
+}
+
+func (m *Network_NetworkEndpoints) GetFromRegistry() string {
+ if x, ok := m.GetNe().(*Network_NetworkEndpoints_FromRegistry); ok {
+ return x.FromRegistry
+ }
+ return ""
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*Network_NetworkEndpoints) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+ return _Network_NetworkEndpoints_OneofMarshaler, _Network_NetworkEndpoints_OneofUnmarshaler, _Network_NetworkEndpoints_OneofSizer, []interface{}{
+ (*Network_NetworkEndpoints_FromCidr)(nil),
+ (*Network_NetworkEndpoints_FromRegistry)(nil),
+ }
+}
+
+func _Network_NetworkEndpoints_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+ m := msg.(*Network_NetworkEndpoints)
+ // ne
+ switch x := m.Ne.(type) {
+ case *Network_NetworkEndpoints_FromCidr:
+ _ = b.EncodeVarint(1<<3 | proto.WireBytes)
+ _ = b.EncodeStringBytes(x.FromCidr)
+ case *Network_NetworkEndpoints_FromRegistry:
+ _ = b.EncodeVarint(2<<3 | proto.WireBytes)
+ _ = b.EncodeStringBytes(x.FromRegistry)
+ case nil:
+ default:
+ return fmt.Errorf("Network_NetworkEndpoints.Ne has unexpected type %T", x)
+ }
+ return nil
+}
+
+func _Network_NetworkEndpoints_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+ m := msg.(*Network_NetworkEndpoints)
+ switch tag {
+ case 1: // ne.from_cidr
+ if wire != proto.WireBytes {
+ return true, proto.ErrInternalBadWireType
+ }
+ x, err := b.DecodeStringBytes()
+ m.Ne = &Network_NetworkEndpoints_FromCidr{x}
+ return true, err
+ case 2: // ne.from_registry
+ if wire != proto.WireBytes {
+ return true, proto.ErrInternalBadWireType
+ }
+ x, err := b.DecodeStringBytes()
+ m.Ne = &Network_NetworkEndpoints_FromRegistry{x}
+ return true, err
+ default:
+ return false, nil
+ }
+}
+
+func _Network_NetworkEndpoints_OneofSizer(msg proto.Message) (n int) {
+ m := msg.(*Network_NetworkEndpoints)
+ // ne
+ switch x := m.Ne.(type) {
+ case *Network_NetworkEndpoints_FromCidr:
+ n += proto.SizeVarint(1<<3 | proto.WireBytes)
+ n += proto.SizeVarint(uint64(len(x.FromCidr)))
+ n += len(x.FromCidr)
+ case *Network_NetworkEndpoints_FromRegistry:
+ n += proto.SizeVarint(2<<3 | proto.WireBytes)
+ n += proto.SizeVarint(uint64(len(x.FromRegistry)))
+ n += len(x.FromRegistry)
+ case nil:
+ default:
+ panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+ }
+ return n
+}
+
+// The gateway associated with this network. Traffic from remote networks
+// will arrive at the specified gateway:port. All incoming traffic must
+// use mTLS.
+type Network_IstioNetworkGateway struct {
+ // Types that are valid to be assigned to Gw:
+ // *Network_IstioNetworkGateway_RegistryServiceName
+ // *Network_IstioNetworkGateway_Address
+ Gw isNetwork_IstioNetworkGateway_Gw `protobuf_oneof:"gw"`
+ // REQUIRED: The port associated with the gateway.
+ Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
+ // The locality associated with an explicitly specified gateway (i.e. ip)
+ Locality string `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"`
+}
+
+func (m *Network_IstioNetworkGateway) Reset() { *m = Network_IstioNetworkGateway{} }
+func (m *Network_IstioNetworkGateway) String() string { return proto.CompactTextString(m) }
+func (*Network_IstioNetworkGateway) ProtoMessage() {}
+func (*Network_IstioNetworkGateway) Descriptor() ([]byte, []int) {
+ return fileDescriptorNetwork, []int{0, 1}
+}
+
+type isNetwork_IstioNetworkGateway_Gw interface {
+ isNetwork_IstioNetworkGateway_Gw()
+ MarshalTo([]byte) (int, error)
+ Size() int
+}
+
+type Network_IstioNetworkGateway_RegistryServiceName struct {
+ RegistryServiceName string `protobuf:"bytes,1,opt,name=registry_service_name,json=registryServiceName,proto3,oneof"`
+}
+type Network_IstioNetworkGateway_Address struct {
+ Address string `protobuf:"bytes,2,opt,name=address,proto3,oneof"`
+}
+
+func (*Network_IstioNetworkGateway_RegistryServiceName) isNetwork_IstioNetworkGateway_Gw() {}
+func (*Network_IstioNetworkGateway_Address) isNetwork_IstioNetworkGateway_Gw() {}
+
+func (m *Network_IstioNetworkGateway) GetGw() isNetwork_IstioNetworkGateway_Gw {
+ if m != nil {
+ return m.Gw
+ }
+ return nil
+}
+
+func (m *Network_IstioNetworkGateway) GetRegistryServiceName() string {
+ if x, ok := m.GetGw().(*Network_IstioNetworkGateway_RegistryServiceName); ok {
+ return x.RegistryServiceName
+ }
+ return ""
+}
+
+func (m *Network_IstioNetworkGateway) GetAddress() string {
+ if x, ok := m.GetGw().(*Network_IstioNetworkGateway_Address); ok {
+ return x.Address
+ }
+ return ""
+}
+
+func (m *Network_IstioNetworkGateway) GetPort() uint32 {
+ if m != nil {
+ return m.Port
+ }
+ return 0
+}
+
+func (m *Network_IstioNetworkGateway) GetLocality() string {
+ if m != nil {
+ return m.Locality
+ }
+ return ""
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*Network_IstioNetworkGateway) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+ return _Network_IstioNetworkGateway_OneofMarshaler, _Network_IstioNetworkGateway_OneofUnmarshaler, _Network_IstioNetworkGateway_OneofSizer, []interface{}{
+ (*Network_IstioNetworkGateway_RegistryServiceName)(nil),
+ (*Network_IstioNetworkGateway_Address)(nil),
+ }
+}
+
+func _Network_IstioNetworkGateway_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+ m := msg.(*Network_IstioNetworkGateway)
+ // gw
+ switch x := m.Gw.(type) {
+ case *Network_IstioNetworkGateway_RegistryServiceName:
+ _ = b.EncodeVarint(1<<3 | proto.WireBytes)
+ _ = b.EncodeStringBytes(x.RegistryServiceName)
+ case *Network_IstioNetworkGateway_Address:
+ _ = b.EncodeVarint(2<<3 | proto.WireBytes)
+ _ = b.EncodeStringBytes(x.Address)
+ case nil:
+ default:
+ return fmt.Errorf("Network_IstioNetworkGateway.Gw has unexpected type %T", x)
+ }
+ return nil
+}
+
+func _Network_IstioNetworkGateway_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+ m := msg.(*Network_IstioNetworkGateway)
+ switch tag {
+ case 1: // gw.registry_service_name
+ if wire != proto.WireBytes {
+ return true, proto.ErrInternalBadWireType
+ }
+ x, err := b.DecodeStringBytes()
+ m.Gw = &Network_IstioNetworkGateway_RegistryServiceName{x}
+ return true, err
+ case 2: // gw.address
+ if wire != proto.WireBytes {
+ return true, proto.ErrInternalBadWireType
+ }
+ x, err := b.DecodeStringBytes()
+ m.Gw = &Network_IstioNetworkGateway_Address{x}
+ return true, err
+ default:
+ return false, nil
+ }
+}
+
+func _Network_IstioNetworkGateway_OneofSizer(msg proto.Message) (n int) {
+ m := msg.(*Network_IstioNetworkGateway)
+ // gw
+ switch x := m.Gw.(type) {
+ case *Network_IstioNetworkGateway_RegistryServiceName:
+ n += proto.SizeVarint(1<<3 | proto.WireBytes)
+ n += proto.SizeVarint(uint64(len(x.RegistryServiceName)))
+ n += len(x.RegistryServiceName)
+ case *Network_IstioNetworkGateway_Address:
+ n += proto.SizeVarint(2<<3 | proto.WireBytes)
+ n += proto.SizeVarint(uint64(len(x.Address)))
+ n += len(x.Address)
+ case nil:
+ default:
+ panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+ }
+ return n
+}
+
+// MeshNetworks (config map) provides information about the set of networks
+// inside a mesh and how to route to endpoints in each network. For example
+//
+// MeshNetworks(file/config map):
+// networks:
+// - network1:
+// - endpoints:
+// - fromRegistry: registry1 #must match secret name in kubernetes
+// - fromCidr: 192.168.100.0/22 #a VM network for example
+// gateways:
+// - registryServiceName: istio-ingressgateway.istio-system.svc.cluster.local
+// port: 15443
+// locality: us-east-1a
+type MeshNetworks struct {
+ // REQUIRED: The set of networks inside this mesh. Each network should
+ // have a unique name and information about how to infer the endpoints in
+ // the network as well as the gateways associated with the network.
+ Networks map[string]*Network `protobuf:"bytes,1,rep,name=networks" json:"networks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
+}
+
+func (m *MeshNetworks) Reset() { *m = MeshNetworks{} }
+func (m *MeshNetworks) String() string { return proto.CompactTextString(m) }
+func (*MeshNetworks) ProtoMessage() {}
+func (*MeshNetworks) Descriptor() ([]byte, []int) { return fileDescriptorNetwork, []int{1} }
+
+func (m *MeshNetworks) GetNetworks() map[string]*Network {
+ if m != nil {
+ return m.Networks
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*Network)(nil), "istio.mesh.v1alpha1.Network")
+ proto.RegisterType((*Network_NetworkEndpoints)(nil), "istio.mesh.v1alpha1.Network.NetworkEndpoints")
+ proto.RegisterType((*Network_IstioNetworkGateway)(nil), "istio.mesh.v1alpha1.Network.IstioNetworkGateway")
+ proto.RegisterType((*MeshNetworks)(nil), "istio.mesh.v1alpha1.MeshNetworks")
+}
+func (m *Network) 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 *Network) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Endpoints) > 0 {
+ for _, msg := range m.Endpoints {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Gateways) > 0 {
+ for _, msg := range m.Gateways {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Network_NetworkEndpoints) 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 *Network_NetworkEndpoints) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Ne != nil {
+ nn1, err := m.Ne.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += nn1
+ }
+ return i, nil
+}
+
+func (m *Network_NetworkEndpoints_FromCidr) MarshalTo(dAtA []byte) (int, error) {
+ i := 0
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(len(m.FromCidr)))
+ i += copy(dAtA[i:], m.FromCidr)
+ return i, nil
+}
+func (m *Network_NetworkEndpoints_FromRegistry) MarshalTo(dAtA []byte) (int, error) {
+ i := 0
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(len(m.FromRegistry)))
+ i += copy(dAtA[i:], m.FromRegistry)
+ return i, nil
+}
+func (m *Network_IstioNetworkGateway) 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 *Network_IstioNetworkGateway) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Gw != nil {
+ nn2, err := m.Gw.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += nn2
+ }
+ if m.Port != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(m.Port))
+ }
+ if len(m.Locality) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(len(m.Locality)))
+ i += copy(dAtA[i:], m.Locality)
+ }
+ return i, nil
+}
+
+func (m *Network_IstioNetworkGateway_RegistryServiceName) MarshalTo(dAtA []byte) (int, error) {
+ i := 0
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(len(m.RegistryServiceName)))
+ i += copy(dAtA[i:], m.RegistryServiceName)
+ return i, nil
+}
+func (m *Network_IstioNetworkGateway_Address) MarshalTo(dAtA []byte) (int, error) {
+ i := 0
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(len(m.Address)))
+ i += copy(dAtA[i:], m.Address)
+ return i, nil
+}
+func (m *MeshNetworks) 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 *MeshNetworks) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Networks) > 0 {
+ for k, _ := range m.Networks {
+ dAtA[i] = 0xa
+ i++
+ v := m.Networks[k]
+ msgSize := 0
+ if v != nil {
+ msgSize = v.Size()
+ msgSize += 1 + sovNetwork(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovNetwork(uint64(len(k))) + msgSize
+ i = encodeVarintNetwork(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ if v != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintNetwork(dAtA, i, uint64(v.Size()))
+ n3, err := v.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ }
+ }
+ }
+ return i, nil
+}
+
+func encodeVarintNetwork(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *Network) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Endpoints) > 0 {
+ for _, e := range m.Endpoints {
+ l = e.Size()
+ n += 1 + l + sovNetwork(uint64(l))
+ }
+ }
+ if len(m.Gateways) > 0 {
+ for _, e := range m.Gateways {
+ l = e.Size()
+ n += 1 + l + sovNetwork(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Network_NetworkEndpoints) Size() (n int) {
+ var l int
+ _ = l
+ if m.Ne != nil {
+ n += m.Ne.Size()
+ }
+ return n
+}
+
+func (m *Network_NetworkEndpoints_FromCidr) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.FromCidr)
+ n += 1 + l + sovNetwork(uint64(l))
+ return n
+}
+func (m *Network_NetworkEndpoints_FromRegistry) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.FromRegistry)
+ n += 1 + l + sovNetwork(uint64(l))
+ return n
+}
+func (m *Network_IstioNetworkGateway) Size() (n int) {
+ var l int
+ _ = l
+ if m.Gw != nil {
+ n += m.Gw.Size()
+ }
+ if m.Port != 0 {
+ n += 1 + sovNetwork(uint64(m.Port))
+ }
+ l = len(m.Locality)
+ if l > 0 {
+ n += 1 + l + sovNetwork(uint64(l))
+ }
+ return n
+}
+
+func (m *Network_IstioNetworkGateway_RegistryServiceName) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.RegistryServiceName)
+ n += 1 + l + sovNetwork(uint64(l))
+ return n
+}
+func (m *Network_IstioNetworkGateway_Address) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Address)
+ n += 1 + l + sovNetwork(uint64(l))
+ return n
+}
+func (m *MeshNetworks) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Networks) > 0 {
+ for k, v := range m.Networks {
+ _ = k
+ _ = v
+ l = 0
+ if v != nil {
+ l = v.Size()
+ l += 1 + sovNetwork(uint64(l))
+ }
+ mapEntrySize := 1 + len(k) + sovNetwork(uint64(len(k))) + l
+ n += mapEntrySize + 1 + sovNetwork(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func sovNetwork(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozNetwork(x uint64) (n int) {
+ return sovNetwork(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *Network) 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 ErrIntOverflowNetwork
+ }
+ 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: Network: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Network: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Endpoints = append(m.Endpoints, &Network_NetworkEndpoints{})
+ if err := m.Endpoints[len(m.Endpoints)-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 Gateways", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Gateways = append(m.Gateways, &Network_IstioNetworkGateway{})
+ if err := m.Gateways[len(m.Gateways)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipNetwork(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Network_NetworkEndpoints) 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 ErrIntOverflowNetwork
+ }
+ 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: NetworkEndpoints: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkEndpoints: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FromCidr", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ 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 ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ne = &Network_NetworkEndpoints_FromCidr{string(dAtA[iNdEx:postIndex])}
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FromRegistry", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ 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 ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ne = &Network_NetworkEndpoints_FromRegistry{string(dAtA[iNdEx:postIndex])}
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipNetwork(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Network_IstioNetworkGateway) 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 ErrIntOverflowNetwork
+ }
+ 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: IstioNetworkGateway: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IstioNetworkGateway: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RegistryServiceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ 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 ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Gw = &Network_IstioNetworkGateway_RegistryServiceName{string(dAtA[iNdEx:postIndex])}
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ 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 ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Gw = &Network_IstioNetworkGateway_Address{string(dAtA[iNdEx:postIndex])}
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ m.Port = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Port |= (uint32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ 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 ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Locality = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipNetwork(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MeshNetworks) 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 ErrIntOverflowNetwork
+ }
+ 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: MeshNetworks: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MeshNetworks: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Networks == nil {
+ m.Networks = make(map[string]*Network)
+ }
+ var mapkey string
+ var mapvalue *Network
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ 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 ErrIntOverflowNetwork
+ }
+ 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 ErrInvalidLengthNetwork
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue = &Network{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipNetwork(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.Networks[mapkey] = mapvalue
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipNetwork(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthNetwork
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipNetwork(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, ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthNetwork
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowNetwork
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipNetwork(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthNetwork = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowNetwork = fmt.Errorf("proto: integer overflow")
+)
+
+func init() { proto.RegisterFile("mesh/v1alpha1/network.proto", fileDescriptorNetwork) }
+
+var fileDescriptorNetwork = []byte{
+ // 403 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcf, 0x8e, 0xda, 0x30,
+ 0x10, 0xc6, 0xeb, 0x84, 0x96, 0x30, 0x80, 0x84, 0x8c, 0x2a, 0x45, 0x69, 0x8b, 0x10, 0x52, 0xa5,
+ 0x5c, 0x9a, 0x14, 0xda, 0x43, 0xd5, 0x23, 0x15, 0x6a, 0x2b, 0x5a, 0x0e, 0xee, 0xa9, 0x3d, 0x14,
+ 0xb9, 0xc4, 0x05, 0x8b, 0x24, 0x8e, 0x6c, 0x2f, 0x28, 0x0f, 0xb3, 0xb7, 0x7d, 0x86, 0x7d, 0x86,
+ 0x3d, 0xee, 0x23, 0xac, 0x78, 0x92, 0x55, 0xfe, 0xee, 0xb2, 0x42, 0x9c, 0x6c, 0xcf, 0xf7, 0xfd,
+ 0x66, 0xc6, 0x63, 0xc3, 0xab, 0x88, 0xa9, 0x8d, 0xbf, 0x1b, 0xd3, 0x30, 0xd9, 0xd0, 0xb1, 0x1f,
+ 0x33, 0xbd, 0x17, 0x72, 0xeb, 0x25, 0x52, 0x68, 0x81, 0xfb, 0x5c, 0x69, 0x2e, 0xbc, 0xcc, 0xe2,
+ 0x55, 0x96, 0xd1, 0x95, 0x09, 0xcd, 0x45, 0x61, 0xc3, 0x73, 0x68, 0xb1, 0x38, 0x48, 0x04, 0x8f,
+ 0xb5, 0xb2, 0x8d, 0xa1, 0xe9, 0xb6, 0x27, 0xef, 0xbc, 0x13, 0x90, 0x57, 0x02, 0xd5, 0x3a, 0xab,
+ 0x20, 0xf2, 0xc0, 0xe3, 0x1f, 0x60, 0xad, 0xa9, 0x66, 0x7b, 0x9a, 0x2a, 0xdb, 0xcc, 0x73, 0xbd,
+ 0x3f, 0x9b, 0xeb, 0x7b, 0xa6, 0x95, 0x87, 0xaf, 0x05, 0x48, 0xea, 0x0c, 0xce, 0x5f, 0xe8, 0x3d,
+ 0x2d, 0x86, 0xdf, 0x40, 0xeb, 0xbf, 0x14, 0xd1, 0x72, 0xc5, 0x03, 0x69, 0xa3, 0x21, 0x72, 0x5b,
+ 0xdf, 0x9e, 0x11, 0x2b, 0x0b, 0x7d, 0xe1, 0x81, 0xc4, 0x6f, 0xa1, 0x9b, 0xcb, 0x92, 0xad, 0xb9,
+ 0xd2, 0x32, 0xb5, 0x8d, 0xd2, 0xd2, 0xc9, 0xc2, 0xa4, 0x8c, 0x4e, 0x1b, 0x60, 0xc4, 0xcc, 0xb9,
+ 0x44, 0xd0, 0x3f, 0xd1, 0x01, 0xfe, 0x08, 0x2f, 0x2b, 0x7e, 0xa9, 0x98, 0xdc, 0xf1, 0x15, 0x5b,
+ 0xc6, 0x34, 0x62, 0x75, 0xbd, 0x7e, 0x25, 0xff, 0x2a, 0xd4, 0x05, 0x8d, 0x18, 0x76, 0xa0, 0x49,
+ 0x83, 0x40, 0x32, 0xa5, 0xea, 0xa2, 0x55, 0x00, 0x63, 0x68, 0x24, 0x42, 0x6a, 0xdb, 0x1c, 0x22,
+ 0xb7, 0x4b, 0xf2, 0x3d, 0x76, 0xc0, 0x0a, 0xc5, 0x8a, 0x86, 0x5c, 0xa7, 0x76, 0x23, 0x03, 0x48,
+ 0x7d, 0xce, 0xfa, 0x5b, 0xef, 0x47, 0xd7, 0x08, 0x3a, 0x3f, 0x99, 0xda, 0x94, 0xed, 0x29, 0x3c,
+ 0x07, 0xab, 0x7c, 0x5d, 0x65, 0xa3, 0x7c, 0xbc, 0xfe, 0xc9, 0xf1, 0x3e, 0x86, 0xaa, 0x59, 0xab,
+ 0x59, 0xac, 0x65, 0x4a, 0xea, 0x04, 0xce, 0x6f, 0xe8, 0x1e, 0x49, 0xb8, 0x07, 0xe6, 0x96, 0xa5,
+ 0xc5, 0x25, 0x49, 0xb6, 0xc5, 0x13, 0x78, 0xbe, 0xa3, 0xe1, 0x05, 0xcb, 0x2f, 0xd4, 0x9e, 0xbc,
+ 0x3e, 0xf7, 0x96, 0xa4, 0xb0, 0x7e, 0x36, 0x3e, 0xa1, 0xa9, 0x7b, 0x73, 0x18, 0xa0, 0xdb, 0xc3,
+ 0x00, 0xdd, 0x1d, 0x06, 0xe8, 0x8f, 0x53, 0x50, 0x5c, 0xf8, 0x34, 0xe1, 0xfe, 0xd1, 0x67, 0xfd,
+ 0xf7, 0x22, 0xff, 0xa5, 0x1f, 0xee, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x70, 0x44, 0x24, 0xc4,
+ 0x02, 0x00, 0x00,
+}
diff --git a/mesh/v1alpha1/network.proto b/mesh/v1alpha1/network.proto
new file mode 100644
index 0000000000..278fd033df
--- /dev/null
+++ b/mesh/v1alpha1/network.proto
@@ -0,0 +1,113 @@
+// Copyright 2018 Istio Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package istio.mesh.v1alpha1;
+
+option go_package="istio.io/api/mesh/v1alpha1";
+
+// Network provides information about the endpoints in a routable L3
+// network. A single routable L3 network can have one or more service
+// registries. Note that the network has no relation to the locality of the
+// endpoint. The endpoint locality will be obtained from the service
+// registry.
+message Network {
+ // NetworkEndpoints describes how the network associated with an endpoint
+ // should be inferred. An endpoint will be assigned to a network based on
+ // the following rules:
+ //
+ // 1. Implicitly: If the registry explicitly provides information about
+ // the network to which the endpoint belongs to. In some cases, its
+ // possible to indicate the network associated with the endpoint by
+ // adding ISTIO_META_NETWORK environment variable to the sidecar.
+ //
+ // 2. Explicitly:
+ //
+ // a. By matching the registry name with one of the "from_registries"
+ // in the mesh config. A "from_registry" can only be assinged to a
+ // single network.
+ //
+ // b. By matching the IP against one of the CIDR ranges in a mesh
+ // config network. The CIDR ranges must not overlap and be assigned to
+ // a single network.
+ //
+ // (2) will override (1) if both are present.
+ message NetworkEndpoints {
+ oneof ne {
+ // A CIDR range for the set of endpoints in this network. The CIDR
+ // ranges for endpoints from different networks must not overlap.
+ string from_cidr = 1;
+
+ // Add all endpoints from the specified registry into this network.
+ // The names of the registries should correspond to the secret name
+ // that was used to configure the registry (kubernetes multicluster) or
+ // supplied by MCP server.
+ string from_registry = 2;
+ }
+ }
+
+ // REQUIRED: The list of endpoints in the network (obtained through the
+ // constituent service registries or from CIDR ranges). All endpoints in
+ // the network are directly accessible to one another.
+ repeated NetworkEndpoints endpoints = 2;
+
+ // The gateway associated with this network. Traffic from remote networks
+ // will arrive at the specified gateway:port. All incoming traffic must
+ // use mTLS.
+ message IstioNetworkGateway {
+ oneof gw {
+ // A fully qualified domain name of the gateway service. Pilot will
+ // lookup the service from the service registries in the network and
+ // obtain the endpoint IPs of the gateway from the service
+ // registry. Note that while the service name is a fully qualified
+ // domain name, it need not be resolvable outside the orchestration
+ // platform for the registry. e.g., this could be
+ // istio-ingressgateway.istio-system.svc.cluster.local.
+ string registry_service_name = 1;
+
+ // IP address or externally resolvable DNS address associated with the gateway.
+ string address = 2;
+ }
+
+ // REQUIRED: The port associated with the gateway.
+ uint32 port = 3;
+
+ // The locality associated with an explicitly specified gateway (i.e. ip)
+ string locality = 4;
+ }
+
+ // REQUIRED: Set of gateways associated with the network.
+ repeated IstioNetworkGateway gateways = 3;
+}
+
+// MeshNetworks (config map) provides information about the set of networks
+// inside a mesh and how to route to endpoints in each network. For example
+//
+// MeshNetworks(file/config map):
+// networks:
+// - network1:
+// - endpoints:
+// - fromRegistry: registry1 #must match secret name in kubernetes
+// - fromCidr: 192.168.100.0/22 #a VM network for example
+// gateways:
+// - registryServiceName: istio-ingressgateway.istio-system.svc.cluster.local
+// port: 15443
+// locality: us-east-1a
+message MeshNetworks {
+ // REQUIRED: The set of networks inside this mesh. Each network should
+ // have a unique name and information about how to infer the endpoints in
+ // the network as well as the gateways associated with the network.
+ map networks = 1;
+}
\ No newline at end of file
diff --git a/python/istio_api/mesh/v1alpha1/mesh_pb2.py b/python/istio_api/mesh/v1alpha1/mesh_pb2.py
deleted file mode 100644
index ab1d238ba7..0000000000
--- a/python/istio_api/mesh/v1alpha1/mesh_pb2.py
+++ /dev/null
@@ -1,155 +0,0 @@
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: mesh/v1alpha1/mesh.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()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='mesh/v1alpha1/mesh.proto',
- package='istio.mesh.v1alpha1',
- syntax='proto3',
- serialized_pb=_b('\n\x18mesh/v1alpha1/mesh.proto\x12\x13istio.mesh.v1alpha1\"\xe0\x01\n\x07Network\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nregistries\x18\x02 \x03(\t\x12\x42\n\x08gateways\x18\x03 \x03(\x0b\x32\x30.istio.mesh.v1alpha1.Network.IstioNetworkGateway\x1ao\n\x13IstioNetworkGateway\x12\x1f\n\x15registry_service_name\x18\x01 \x01(\tH\x00\x12\x11\n\x07\x61\x64\x64ress\x18\x02 \x01(\tH\x00\x12\x0c\n\x04port\x18\x03 \x01(\r\x12\x10\n\x08locality\x18\x04 \x01(\tB\x04\n\x02gwB\x1cZ\x1aistio.io/api/mesh/v1alpha1b\x06proto3')
-)
-
-
-
-
-_NETWORK_ISTIONETWORKGATEWAY = _descriptor.Descriptor(
- name='IstioNetworkGateway',
- full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='registry_service_name', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.registry_service_name', 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='address', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.address', 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='port', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.port', index=2,
- number=3, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='locality', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.locality', 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=[
- _descriptor.OneofDescriptor(
- name='gw', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.gw',
- index=0, containing_type=None, fields=[]),
- ],
- serialized_start=163,
- serialized_end=274,
-)
-
-_NETWORK = _descriptor.Descriptor(
- name='Network',
- full_name='istio.mesh.v1alpha1.Network',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='name', full_name='istio.mesh.v1alpha1.Network.name', 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='registries', full_name='istio.mesh.v1alpha1.Network.registries', index=1,
- number=2, 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='gateways', full_name='istio.mesh.v1alpha1.Network.gateways', 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),
- ],
- extensions=[
- ],
- nested_types=[_NETWORK_ISTIONETWORKGATEWAY, ],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=50,
- serialized_end=274,
-)
-
-_NETWORK_ISTIONETWORKGATEWAY.containing_type = _NETWORK
-_NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw'].fields.append(
- _NETWORK_ISTIONETWORKGATEWAY.fields_by_name['registry_service_name'])
-_NETWORK_ISTIONETWORKGATEWAY.fields_by_name['registry_service_name'].containing_oneof = _NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw']
-_NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw'].fields.append(
- _NETWORK_ISTIONETWORKGATEWAY.fields_by_name['address'])
-_NETWORK_ISTIONETWORKGATEWAY.fields_by_name['address'].containing_oneof = _NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw']
-_NETWORK.fields_by_name['gateways'].message_type = _NETWORK_ISTIONETWORKGATEWAY
-DESCRIPTOR.message_types_by_name['Network'] = _NETWORK
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Network = _reflection.GeneratedProtocolMessageType('Network', (_message.Message,), dict(
-
- IstioNetworkGateway = _reflection.GeneratedProtocolMessageType('IstioNetworkGateway', (_message.Message,), dict(
- DESCRIPTOR = _NETWORK_ISTIONETWORKGATEWAY,
- __module__ = 'mesh.v1alpha1.mesh_pb2'
- # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.Network.IstioNetworkGateway)
- ))
- ,
- DESCRIPTOR = _NETWORK,
- __module__ = 'mesh.v1alpha1.mesh_pb2'
- # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.Network)
- ))
-_sym_db.RegisterMessage(Network)
-_sym_db.RegisterMessage(Network.IstioNetworkGateway)
-
-
-DESCRIPTOR.has_options = True
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\032istio.io/api/mesh/v1alpha1'))
-# @@protoc_insertion_point(module_scope)
diff --git a/python/istio_api/mesh/v1alpha1/network_pb2.py b/python/istio_api/mesh/v1alpha1/network_pb2.py
new file mode 100644
index 0000000000..b41c6bd91b
--- /dev/null
+++ b/python/istio_api/mesh/v1alpha1/network_pb2.py
@@ -0,0 +1,293 @@
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: mesh/v1alpha1/network.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()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='mesh/v1alpha1/network.proto',
+ package='istio.mesh.v1alpha1',
+ syntax='proto3',
+ serialized_pb=_b('\n\x1bmesh/v1alpha1/network.proto\x12\x13istio.mesh.v1alpha1\"\xc8\x02\n\x07Network\x12@\n\tendpoints\x18\x02 \x03(\x0b\x32-.istio.mesh.v1alpha1.Network.NetworkEndpoints\x12\x42\n\x08gateways\x18\x03 \x03(\x0b\x32\x30.istio.mesh.v1alpha1.Network.IstioNetworkGateway\x1a\x46\n\x10NetworkEndpoints\x12\x13\n\tfrom_cidr\x18\x01 \x01(\tH\x00\x12\x17\n\rfrom_registry\x18\x02 \x01(\tH\x00\x42\x04\n\x02ne\x1ao\n\x13IstioNetworkGateway\x12\x1f\n\x15registry_service_name\x18\x01 \x01(\tH\x00\x12\x11\n\x07\x61\x64\x64ress\x18\x02 \x01(\tH\x00\x12\x0c\n\x04port\x18\x03 \x01(\r\x12\x10\n\x08locality\x18\x04 \x01(\tB\x04\n\x02gw\"\xa0\x01\n\x0cMeshNetworks\x12\x41\n\x08networks\x18\x01 \x03(\x0b\x32/.istio.mesh.v1alpha1.MeshNetworks.NetworksEntry\x1aM\n\rNetworksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.istio.mesh.v1alpha1.Network:\x02\x38\x01\x42\x1cZ\x1aistio.io/api/mesh/v1alpha1b\x06proto3')
+)
+
+
+
+
+_NETWORK_NETWORKENDPOINTS = _descriptor.Descriptor(
+ name='NetworkEndpoints',
+ full_name='istio.mesh.v1alpha1.Network.NetworkEndpoints',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='from_cidr', full_name='istio.mesh.v1alpha1.Network.NetworkEndpoints.from_cidr', 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='from_registry', full_name='istio.mesh.v1alpha1.Network.NetworkEndpoints.from_registry', 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=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ _descriptor.OneofDescriptor(
+ name='ne', full_name='istio.mesh.v1alpha1.Network.NetworkEndpoints.ne',
+ index=0, containing_type=None, fields=[]),
+ ],
+ serialized_start=198,
+ serialized_end=268,
+)
+
+_NETWORK_ISTIONETWORKGATEWAY = _descriptor.Descriptor(
+ name='IstioNetworkGateway',
+ full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='registry_service_name', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.registry_service_name', 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='address', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.address', 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='port', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.port', index=2,
+ number=3, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='locality', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.locality', 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=[
+ _descriptor.OneofDescriptor(
+ name='gw', full_name='istio.mesh.v1alpha1.Network.IstioNetworkGateway.gw',
+ index=0, containing_type=None, fields=[]),
+ ],
+ serialized_start=270,
+ serialized_end=381,
+)
+
+_NETWORK = _descriptor.Descriptor(
+ name='Network',
+ full_name='istio.mesh.v1alpha1.Network',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='endpoints', full_name='istio.mesh.v1alpha1.Network.endpoints', index=0,
+ 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),
+ _descriptor.FieldDescriptor(
+ name='gateways', full_name='istio.mesh.v1alpha1.Network.gateways', index=1,
+ 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),
+ ],
+ extensions=[
+ ],
+ nested_types=[_NETWORK_NETWORKENDPOINTS, _NETWORK_ISTIONETWORKGATEWAY, ],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=53,
+ serialized_end=381,
+)
+
+
+_MESHNETWORKS_NETWORKSENTRY = _descriptor.Descriptor(
+ name='NetworksEntry',
+ full_name='istio.mesh.v1alpha1.MeshNetworks.NetworksEntry',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='key', full_name='istio.mesh.v1alpha1.MeshNetworks.NetworksEntry.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.mesh.v1alpha1.MeshNetworks.NetworksEntry.value', 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=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=467,
+ serialized_end=544,
+)
+
+_MESHNETWORKS = _descriptor.Descriptor(
+ name='MeshNetworks',
+ full_name='istio.mesh.v1alpha1.MeshNetworks',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='networks', full_name='istio.mesh.v1alpha1.MeshNetworks.networks', index=0,
+ number=1, 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=[_MESHNETWORKS_NETWORKSENTRY, ],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=384,
+ serialized_end=544,
+)
+
+_NETWORK_NETWORKENDPOINTS.containing_type = _NETWORK
+_NETWORK_NETWORKENDPOINTS.oneofs_by_name['ne'].fields.append(
+ _NETWORK_NETWORKENDPOINTS.fields_by_name['from_cidr'])
+_NETWORK_NETWORKENDPOINTS.fields_by_name['from_cidr'].containing_oneof = _NETWORK_NETWORKENDPOINTS.oneofs_by_name['ne']
+_NETWORK_NETWORKENDPOINTS.oneofs_by_name['ne'].fields.append(
+ _NETWORK_NETWORKENDPOINTS.fields_by_name['from_registry'])
+_NETWORK_NETWORKENDPOINTS.fields_by_name['from_registry'].containing_oneof = _NETWORK_NETWORKENDPOINTS.oneofs_by_name['ne']
+_NETWORK_ISTIONETWORKGATEWAY.containing_type = _NETWORK
+_NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw'].fields.append(
+ _NETWORK_ISTIONETWORKGATEWAY.fields_by_name['registry_service_name'])
+_NETWORK_ISTIONETWORKGATEWAY.fields_by_name['registry_service_name'].containing_oneof = _NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw']
+_NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw'].fields.append(
+ _NETWORK_ISTIONETWORKGATEWAY.fields_by_name['address'])
+_NETWORK_ISTIONETWORKGATEWAY.fields_by_name['address'].containing_oneof = _NETWORK_ISTIONETWORKGATEWAY.oneofs_by_name['gw']
+_NETWORK.fields_by_name['endpoints'].message_type = _NETWORK_NETWORKENDPOINTS
+_NETWORK.fields_by_name['gateways'].message_type = _NETWORK_ISTIONETWORKGATEWAY
+_MESHNETWORKS_NETWORKSENTRY.fields_by_name['value'].message_type = _NETWORK
+_MESHNETWORKS_NETWORKSENTRY.containing_type = _MESHNETWORKS
+_MESHNETWORKS.fields_by_name['networks'].message_type = _MESHNETWORKS_NETWORKSENTRY
+DESCRIPTOR.message_types_by_name['Network'] = _NETWORK
+DESCRIPTOR.message_types_by_name['MeshNetworks'] = _MESHNETWORKS
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Network = _reflection.GeneratedProtocolMessageType('Network', (_message.Message,), dict(
+
+ NetworkEndpoints = _reflection.GeneratedProtocolMessageType('NetworkEndpoints', (_message.Message,), dict(
+ DESCRIPTOR = _NETWORK_NETWORKENDPOINTS,
+ __module__ = 'mesh.v1alpha1.network_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.Network.NetworkEndpoints)
+ ))
+ ,
+
+ IstioNetworkGateway = _reflection.GeneratedProtocolMessageType('IstioNetworkGateway', (_message.Message,), dict(
+ DESCRIPTOR = _NETWORK_ISTIONETWORKGATEWAY,
+ __module__ = 'mesh.v1alpha1.network_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.Network.IstioNetworkGateway)
+ ))
+ ,
+ DESCRIPTOR = _NETWORK,
+ __module__ = 'mesh.v1alpha1.network_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.Network)
+ ))
+_sym_db.RegisterMessage(Network)
+_sym_db.RegisterMessage(Network.NetworkEndpoints)
+_sym_db.RegisterMessage(Network.IstioNetworkGateway)
+
+MeshNetworks = _reflection.GeneratedProtocolMessageType('MeshNetworks', (_message.Message,), dict(
+
+ NetworksEntry = _reflection.GeneratedProtocolMessageType('NetworksEntry', (_message.Message,), dict(
+ DESCRIPTOR = _MESHNETWORKS_NETWORKSENTRY,
+ __module__ = 'mesh.v1alpha1.network_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.MeshNetworks.NetworksEntry)
+ ))
+ ,
+ DESCRIPTOR = _MESHNETWORKS,
+ __module__ = 'mesh.v1alpha1.network_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.MeshNetworks)
+ ))
+_sym_db.RegisterMessage(MeshNetworks)
+_sym_db.RegisterMessage(MeshNetworks.NetworksEntry)
+
+
+DESCRIPTOR.has_options = True
+DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\032istio.io/api/mesh/v1alpha1'))
+_MESHNETWORKS_NETWORKSENTRY.has_options = True
+_MESHNETWORKS_NETWORKSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
+# @@protoc_insertion_point(module_scope)