diff --git a/source/extensions/common/workload_discovery/api.cc b/source/extensions/common/workload_discovery/api.cc index ce6d3e8a8..f37f43603 100644 --- a/source/extensions/common/workload_discovery/api.cc +++ b/source/extensions/common/workload_discovery/api.cc @@ -114,11 +114,11 @@ private: } AddressIndex address_index_; }; - class WorkloadSubscription : Config::SubscriptionBase { + class WorkloadSubscription : Config::SubscriptionBase { public: WorkloadSubscription(WorkloadMetadataProviderImpl& parent) - : Config::SubscriptionBase( - parent.factory_context_.messageValidationVisitor(), "address"), + : Config::SubscriptionBase( + parent.factory_context_.messageValidationVisitor(), "uid"), parent_(parent) { subscription_ = parent.factory_context_.clusterManager() .subscriptionFactory() @@ -134,15 +134,12 @@ private: const std::string&) override { AddressIndexSharedPtr index = std::make_shared(); for (const auto& resource : resources) { - const auto& address = - dynamic_cast(resource.get().resource()); - switch (address.type_case()) { - case istio::workload::Address::kWorkload: - index->emplace(address.workload().address(), convert(address.workload())); - break; - default: - // do nothing - break; + const auto& workload = + dynamic_cast(resource.get().resource()); + const auto& metadata = convert(workload); + index->emplace(workload.uid(), metadata); + for (const auto& addr : workload.addresses()) { + index->emplace(addr, metadata); } } parent_.reset(index); @@ -152,15 +149,12 @@ private: const std::string&) override { AddressIndexSharedPtr added = std::make_shared(); for (const auto& resource : added_resources) { - const auto& address = - dynamic_cast(resource.get().resource()); - switch (address.type_case()) { - case istio::workload::Address::kWorkload: - added->emplace(address.workload().address(), convert(address.workload())); - break; - default: - // do nothing - break; + const auto& workload = + dynamic_cast(resource.get().resource()); + const auto& metadata = convert(workload); + added->emplace(workload.uid(), metadata); + for (const auto& addr : workload.addresses()) { + added->emplace(addr, metadata); } } AddressVectorSharedPtr removed = std::make_shared(); diff --git a/source/extensions/common/workload_discovery/discovery.proto b/source/extensions/common/workload_discovery/discovery.proto index 2c25b27cd..ed88136ff 100644 --- a/source/extensions/common/workload_discovery/discovery.proto +++ b/source/extensions/common/workload_discovery/discovery.proto @@ -27,39 +27,8 @@ option go_package = "test/envoye2e/workloadapi"; * 3) append bootstrap extension stub; */ -message Address { - // Workload represents an individual workload. - // This could be a single Pod, a VM instance, etc. - oneof type { - Workload workload = 1; - // Service represents a service - a group of workloads that can be accessed together. - Service service = 2; - } -} - -message Service { - reserved "name"; - reserved 1; - - reserved "namespace"; - reserved 2; - - reserved "hostname"; - reserved 3; - - reserved "addresses"; - reserved 4; - - reserved "ports"; - reserved 5; - - reserved "subject_alt_names"; - reserved 6; -} - message Workload { - reserved "uid"; - reserved 20; + string uid = 20; // Name represents the name for the workload. // For Kubernetes, this is the pod name. @@ -76,7 +45,7 @@ message Workload { // Each workload must have at least either an address or hostname; not both. // TODO: support dual stack by making this repeated // TODO: when this is repeated, update xds primary key from network/IP to network/UID - bytes address = 3; + repeated bytes addresses = 3; reserved "hostname"; reserved 21; diff --git a/test/envoye2e/driver/xds.go b/test/envoye2e/driver/xds.go index bc5f3d605..d6d2c901a 100644 --- a/test/envoye2e/driver/xds.go +++ b/test/envoye2e/driver/xds.go @@ -46,12 +46,12 @@ type XDSServer struct { cache.MuxCache Extensions *ExtensionServer Cache cache.SnapshotCache - Addresses *cache.LinearCache + Workloads *cache.LinearCache } var _ Step = &XDS{} -const AddressTypeURL = "type.googleapis.com/istio.workload.Address" +const WorkloadTypeURL = "type.googleapis.com/istio.workload.Workload" // Run starts up an Envoy XDS server. func (x *XDS) Run(p *Params) error { @@ -62,22 +62,22 @@ func (x *XDS) Run(p *Params) error { // Register caches. p.Config.Cache = cache.NewSnapshotCache(false, cache.IDHash{}, x) - p.Config.Addresses = cache.NewLinearCache(AddressTypeURL, + p.Config.Workloads = cache.NewLinearCache(WorkloadTypeURL, cache.WithLogger(x)) p.Config.Caches = map[string]cache.Cache{ "default": p.Config.Cache, - "addresses": p.Config.Addresses, + "workloads": p.Config.Workloads, } p.Config.Classify = func(r *cache.Request) string { - if r.TypeUrl == AddressTypeURL { - return "addresses" + if r.TypeUrl == WorkloadTypeURL { + return "workloads" } return "default" } p.Config.ClassifyDelta = func(r *cache.DeltaRequest) string { - if r.TypeUrl == AddressTypeURL { - return "addresses" + if r.TypeUrl == WorkloadTypeURL { + return "workloads" } return "default" } @@ -96,23 +96,15 @@ func (x *XDS) Run(p *Params) error { return nil } -type NamedAddress struct { - *workloadapi.Address +type NamedWorkload struct { + *workloadapi.Workload } -func (namedAddr *NamedAddress) GetName() string { - var name string - switch addr := namedAddr.Type.(type) { - case *workloadapi.Address_Service: - // TODO: all fields currently reserved and unused/unimplemented - case *workloadapi.Address_Workload: - ii, _ := netip.AddrFromSlice(addr.Workload.Address) - name = addr.Workload.Network + "/" + ii.String() - } - return name +func (nw *NamedWorkload) GetName() string { + return nw.Uid } -var _ types.ResourceWithName = &NamedAddress{} +var _ types.ResourceWithName = &NamedWorkload{} // Cleanup stops the XDS server. func (x *XDS) Cleanup() { @@ -235,14 +227,9 @@ func (u *UpdateWorkloadMetadata) Run(p *Params) error { return err } log.Printf("updating metadata for %q\n", wl.Address) - out.Address = ip.AsSlice() - addr := &workloadapi.Address{ - Type: &workloadapi.Address_Workload{ - Workload: out, - }, - } - namedAddr := NamedAddress{addr} - err = p.Config.Addresses.UpdateResource(namedAddr.GetName(), addr) + out.Addresses = [][]byte{ip.AsSlice()} + namedWorkload := NamedWorkload{out} + err = p.Config.Workloads.UpdateResource(namedWorkload.GetName(), out) if err != nil { return err } diff --git a/test/envoye2e/stats_plugin/stats_test.go b/test/envoye2e/stats_plugin/stats_test.go index af952db5c..674a3a795 100644 --- a/test/envoye2e/stats_plugin/stats_test.go +++ b/test/envoye2e/stats_plugin/stats_test.go @@ -637,6 +637,7 @@ namespace: default workload_name: ratings-v1 canonical_name: ratings canonical_revision: version-1 +uid: //v1/pod/default/ratings ` func TestStatsServerWaypointProxy(t *testing.T) { diff --git a/test/envoye2e/workloadapi/discovery.pb.go b/test/envoye2e/workloadapi/discovery.pb.go index aabbe8dc2..bbd6a7140 100644 --- a/test/envoye2e/workloadapi/discovery.pb.go +++ b/test/envoye2e/workloadapi/discovery.pb.go @@ -86,134 +86,12 @@ func (WorkloadType) EnumDescriptor() ([]byte, []int) { return file_source_extensions_common_workload_discovery_discovery_proto_rawDescGZIP(), []int{0} } -type Address struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Workload represents an individual workload. - // This could be a single Pod, a VM instance, etc. - // - // Types that are assignable to Type: - // - // *Address_Workload - // *Address_Service - Type isAddress_Type `protobuf_oneof:"type"` -} - -func (x *Address) Reset() { - *x = Address{} - if protoimpl.UnsafeEnabled { - mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Address) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Address) ProtoMessage() {} - -func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Address.ProtoReflect.Descriptor instead. -func (*Address) Descriptor() ([]byte, []int) { - return file_source_extensions_common_workload_discovery_discovery_proto_rawDescGZIP(), []int{0} -} - -func (m *Address) GetType() isAddress_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *Address) GetWorkload() *Workload { - if x, ok := x.GetType().(*Address_Workload); ok { - return x.Workload - } - return nil -} - -func (x *Address) GetService() *Service { - if x, ok := x.GetType().(*Address_Service); ok { - return x.Service - } - return nil -} - -type isAddress_Type interface { - isAddress_Type() -} - -type Address_Workload struct { - Workload *Workload `protobuf:"bytes,1,opt,name=workload,proto3,oneof"` -} - -type Address_Service struct { - // Service represents a service - a group of workloads that can be accessed together. - Service *Service `protobuf:"bytes,2,opt,name=service,proto3,oneof"` -} - -func (*Address_Workload) isAddress_Type() {} - -func (*Address_Service) isAddress_Type() {} - -type Service struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Service) Reset() { - *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Service) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Service) ProtoMessage() {} - -func (x *Service) ProtoReflect() protoreflect.Message { - mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Service.ProtoReflect.Descriptor instead. -func (*Service) Descriptor() ([]byte, []int) { - return file_source_extensions_common_workload_discovery_discovery_proto_rawDescGZIP(), []int{1} -} - type Workload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + Uid string `protobuf:"bytes,20,opt,name=uid,proto3" json:"uid,omitempty"` // Name represents the name for the workload. // For Kubernetes, this is the pod name. // This is just for debugging and may be elided as an optimization. @@ -227,7 +105,7 @@ type Workload struct { // Each workload must have at least either an address or hostname; not both. // TODO: support dual stack by making this repeated // TODO: when this is repeated, update xds primary key from network/IP to network/UID - Address []byte `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Addresses [][]byte `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"` // Network represents the network this workload is on. This may be elided for the default network. // A (network,address) pair makeup a unique key for a workload *at a point in time*. Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` @@ -250,7 +128,7 @@ type Workload struct { func (x *Workload) Reset() { *x = Workload{} if protoimpl.UnsafeEnabled { - mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[2] + mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -263,7 +141,7 @@ func (x *Workload) String() string { func (*Workload) ProtoMessage() {} func (x *Workload) ProtoReflect() protoreflect.Message { - mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[2] + mi := &file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -276,7 +154,14 @@ func (x *Workload) ProtoReflect() protoreflect.Message { // Deprecated: Use Workload.ProtoReflect.Descriptor instead. func (*Workload) Descriptor() ([]byte, []int) { - return file_source_extensions_common_workload_discovery_discovery_proto_rawDescGZIP(), []int{2} + return file_source_extensions_common_workload_discovery_discovery_proto_rawDescGZIP(), []int{0} +} + +func (x *Workload) GetUid() string { + if x != nil { + return x.Uid + } + return "" } func (x *Workload) GetName() string { @@ -293,9 +178,9 @@ func (x *Workload) GetNamespace() string { return "" } -func (x *Workload) GetAddress() []byte { +func (x *Workload) GetAddresses() [][]byte { if x != nil { - return x.Address + return x.Addresses } return nil } @@ -363,66 +248,52 @@ var file_source_extensions_common_workload_discovery_discovery_proto_rawDesc = [ 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x69, - 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x7e, 0x0a, - 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, - 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69, 0x73, 0x74, - 0x69, 0x6f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, - 0x61, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x6d, 0x0a, - 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, - 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, - 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x68, - 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x52, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xd2, 0x04, 0x0a, - 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, - 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, - 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x41, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, - 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, - 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, - 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x4a, 0x04, 0x08, 0x14, 0x10, 0x15, 0x4a, 0x04, - 0x08, 0x15, 0x10, 0x16, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, - 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0e, - 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, 0x04, - 0x08, 0x11, 0x10, 0x12, 0x52, 0x03, 0x75, 0x69, 0x64, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, - 0x61, 0x6d, 0x65, 0x52, 0x0f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x77, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0f, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x0d, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x0b, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x69, 0x70, - 0x73, 0x52, 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2a, 0x3d, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, 0x4f, 0x4e, 0x4a, 0x4f, 0x42, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x50, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x4f, 0x42, 0x10, 0x03, - 0x42, 0x1b, 0x5a, 0x19, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x65, 0x32, - 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xdd, 0x04, + 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, + 0x75, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x6f, + 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x61, 0x6e, + 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, + 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1c, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x77, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x77, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x4a, + 0x04, 0x08, 0x15, 0x10, 0x16, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x08, 0x10, + 0x09, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, + 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, + 0x04, 0x08, 0x11, 0x10, 0x12, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x52, + 0x0f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x52, 0x08, 0x77, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x52, 0x0d, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x0b, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x73, 0x52, 0x16, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x3d, 0x0a, + 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, + 0x0a, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x43, 0x52, 0x4f, 0x4e, 0x4a, 0x4f, 0x42, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4f, + 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x4f, 0x42, 0x10, 0x03, 0x42, 0x1b, 0x5a, 0x19, + 0x74, 0x65, 0x73, 0x74, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x65, 0x32, 0x65, 0x2f, 0x77, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -438,22 +309,18 @@ func file_source_extensions_common_workload_discovery_discovery_proto_rawDescGZI } var file_source_extensions_common_workload_discovery_discovery_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_source_extensions_common_workload_discovery_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_source_extensions_common_workload_discovery_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_source_extensions_common_workload_discovery_discovery_proto_goTypes = []interface{}{ (WorkloadType)(0), // 0: istio.workload.WorkloadType - (*Address)(nil), // 1: istio.workload.Address - (*Service)(nil), // 2: istio.workload.Service - (*Workload)(nil), // 3: istio.workload.Workload + (*Workload)(nil), // 1: istio.workload.Workload } var file_source_extensions_common_workload_discovery_discovery_proto_depIdxs = []int32{ - 3, // 0: istio.workload.Address.workload:type_name -> istio.workload.Workload - 2, // 1: istio.workload.Address.service:type_name -> istio.workload.Service - 0, // 2: istio.workload.Workload.workload_type:type_name -> istio.workload.WorkloadType - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 0: istio.workload.Workload.workload_type:type_name -> istio.workload.WorkloadType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_source_extensions_common_workload_discovery_discovery_proto_init() } @@ -463,30 +330,6 @@ func file_source_extensions_common_workload_discovery_discovery_proto_init() { } if !protoimpl.UnsafeEnabled { file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Workload); i { case 0: return &v.state @@ -499,17 +342,13 @@ func file_source_extensions_common_workload_discovery_discovery_proto_init() { } } } - file_source_extensions_common_workload_discovery_discovery_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Address_Workload)(nil), - (*Address_Service)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_source_extensions_common_workload_discovery_discovery_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 1, NumExtensions: 0, NumServices: 0, },