From 182dca3e623c752e761459b9d38f80b8f71fd2f4 Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:45:06 +0000 Subject: [PATCH] [Bugfix] [Platform] Reload Config on Inventory Change --- CHANGELOG.md | 1 + .../inventory/v1/definition/inventory.pb.go | 298 +++++++++++------- .../inventory/v1/definition/inventory.proto | 6 + .../resources/config_map_gateway.go | 31 +- pkg/util/constants/envoy.go | 9 +- 5 files changed, 223 insertions(+), 122 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c63544737..43195e4a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - (Feature) (License) Activation API Integration - (Feature) (Platform) Chart & Service Kubernetes Events - (Feature) (Platform) Registry Secret +- (Bugfix) (Platform) Reload Config on Inventory Change ## [1.3.1](https://github.com/arangodb/kube-arangodb/tree/1.3.1) (2025-10-07) - (Documentation) Add ArangoPlatformStorage Docs & Examples diff --git a/integrations/inventory/v1/definition/inventory.pb.go b/integrations/inventory/v1/definition/inventory.pb.go index 916af8233..8fb5f9be5 100644 --- a/integrations/inventory/v1/definition/inventory.pb.go +++ b/integrations/inventory/v1/definition/inventory.pb.go @@ -267,6 +267,55 @@ func (x *Inventory) GetPlatform() *InventoryPlatform { return nil } +// Platform Inventory Hash +type InventoryHash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current Envoy Configuration hash + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (x *InventoryHash) Reset() { + *x = InventoryHash{} + if protoimpl.UnsafeEnabled { + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InventoryHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InventoryHash) ProtoMessage() {} + +func (x *InventoryHash) ProtoReflect() protoreflect.Message { + mi := &file_integrations_inventory_v1_definition_inventory_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 InventoryHash.ProtoReflect.Descriptor instead. +func (*InventoryHash) Descriptor() ([]byte, []int) { + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{1} +} + +func (x *InventoryHash) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + // Envoy Configuration details type InventoryConfiguration struct { state protoimpl.MessageState @@ -280,7 +329,7 @@ type InventoryConfiguration struct { func (x *InventoryConfiguration) Reset() { *x = InventoryConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[1] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -293,7 +342,7 @@ func (x *InventoryConfiguration) String() string { func (*InventoryConfiguration) ProtoMessage() {} func (x *InventoryConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[1] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -306,7 +355,7 @@ func (x *InventoryConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use InventoryConfiguration.ProtoReflect.Descriptor instead. func (*InventoryConfiguration) Descriptor() ([]byte, []int) { - return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{1} + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{2} } func (x *InventoryConfiguration) GetHash() string { @@ -329,7 +378,7 @@ type InventoryPlatform struct { func (x *InventoryPlatform) Reset() { *x = InventoryPlatform{} if protoimpl.UnsafeEnabled { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[2] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +391,7 @@ func (x *InventoryPlatform) String() string { func (*InventoryPlatform) ProtoMessage() {} func (x *InventoryPlatform) ProtoReflect() protoreflect.Message { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[2] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +404,7 @@ func (x *InventoryPlatform) ProtoReflect() protoreflect.Message { // Deprecated: Use InventoryPlatform.ProtoReflect.Descriptor instead. func (*InventoryPlatform) Descriptor() ([]byte, []int) { - return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{2} + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{3} } func (x *InventoryPlatform) GetServices() map[string]*InventoryPlatformService { @@ -380,7 +429,7 @@ type InventoryPlatformService struct { func (x *InventoryPlatformService) Reset() { *x = InventoryPlatformService{} if protoimpl.UnsafeEnabled { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[3] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -393,7 +442,7 @@ func (x *InventoryPlatformService) String() string { func (*InventoryPlatformService) ProtoMessage() {} func (x *InventoryPlatformService) ProtoReflect() protoreflect.Message { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[3] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -406,7 +455,7 @@ func (x *InventoryPlatformService) ProtoReflect() protoreflect.Message { // Deprecated: Use InventoryPlatformService.ProtoReflect.Descriptor instead. func (*InventoryPlatformService) Descriptor() ([]byte, []int) { - return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{3} + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{4} } func (x *InventoryPlatformService) GetVersion() string { @@ -436,7 +485,7 @@ type InventoryNetworking struct { func (x *InventoryNetworking) Reset() { *x = InventoryNetworking{} if protoimpl.UnsafeEnabled { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[4] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -449,7 +498,7 @@ func (x *InventoryNetworking) String() string { func (*InventoryNetworking) ProtoMessage() {} func (x *InventoryNetworking) ProtoReflect() protoreflect.Message { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[4] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -462,7 +511,7 @@ func (x *InventoryNetworking) ProtoReflect() protoreflect.Message { // Deprecated: Use InventoryNetworking.ProtoReflect.Descriptor instead. func (*InventoryNetworking) Descriptor() ([]byte, []int) { - return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{4} + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{5} } func (x *InventoryNetworking) GetRoutes() map[string]*InventoryNetworkingRoute { @@ -487,7 +536,7 @@ type InventoryNetworkingRoute struct { func (x *InventoryNetworkingRoute) Reset() { *x = InventoryNetworkingRoute{} if protoimpl.UnsafeEnabled { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[5] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +549,7 @@ func (x *InventoryNetworkingRoute) String() string { func (*InventoryNetworkingRoute) ProtoMessage() {} func (x *InventoryNetworkingRoute) ProtoReflect() protoreflect.Message { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[5] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +562,7 @@ func (x *InventoryNetworkingRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use InventoryNetworkingRoute.ProtoReflect.Descriptor instead. func (*InventoryNetworkingRoute) Descriptor() ([]byte, []int) { - return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{5} + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{6} } func (m *InventoryNetworkingRoute) GetRoute() isInventoryNetworkingRoute_Route { @@ -554,7 +603,7 @@ type InventoryNetworkingRoutePath struct { func (x *InventoryNetworkingRoutePath) Reset() { *x = InventoryNetworkingRoutePath{} if protoimpl.UnsafeEnabled { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[6] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -567,7 +616,7 @@ func (x *InventoryNetworkingRoutePath) String() string { func (*InventoryNetworkingRoutePath) ProtoMessage() {} func (x *InventoryNetworkingRoutePath) ProtoReflect() protoreflect.Message { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[6] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -580,7 +629,7 @@ func (x *InventoryNetworkingRoutePath) ProtoReflect() protoreflect.Message { // Deprecated: Use InventoryNetworkingRoutePath.ProtoReflect.Descriptor instead. func (*InventoryNetworkingRoutePath) Descriptor() ([]byte, []int) { - return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{6} + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{7} } func (x *InventoryNetworkingRoutePath) GetPath() string { @@ -609,7 +658,7 @@ type ArangoDBConfiguration struct { func (x *ArangoDBConfiguration) Reset() { *x = ArangoDBConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[7] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -622,7 +671,7 @@ func (x *ArangoDBConfiguration) String() string { func (*ArangoDBConfiguration) ProtoMessage() {} func (x *ArangoDBConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[7] + mi := &file_integrations_inventory_v1_definition_inventory_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -635,7 +684,7 @@ func (x *ArangoDBConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use ArangoDBConfiguration.ProtoReflect.Descriptor instead. func (*ArangoDBConfiguration) Descriptor() ([]byte, []int) { - return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{7} + return file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP(), []int{8} } func (x *ArangoDBConfiguration) GetMode() ArangoDBMode { @@ -695,76 +744,78 @@ var file_integrations_inventory_v1_definition_inventory_proto_rawDesc = []byte{ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, - 0x2c, 0x0a, 0x16, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0xbd, 0x01, - 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x12, 0x46, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x60, 0x0a, 0x0d, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, - 0x6f, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4a, 0x0a, - 0x18, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0xb9, 0x01, 0x0a, 0x13, 0x49, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, - 0x67, 0x12, 0x42, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x49, 0x6e, + 0x23, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x22, 0x2c, 0x0a, 0x16, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x22, 0xbd, 0x01, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x46, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x1a, 0x60, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x49, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x4a, 0x0a, 0x18, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0xb9, + 0x01, 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x5e, 0x0a, 0x0b, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x62, 0x0a, 0x18, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x5e, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x62, 0x0a, 0x18, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x42, 0x07, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x32, 0x0a, 0x1c, 0x49, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xcd, 0x01, - 0x0a, 0x15, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2e, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, - 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2e, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x2e, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x68, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2a, 0x3b, 0x0a, - 0x0c, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, - 0x06, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0b, 0x0a, - 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x10, 0x02, 0x2a, 0x30, 0x0a, 0x0f, 0x41, 0x72, - 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, - 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, - 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x10, - 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x10, 0x00, 0x12, 0x14, 0x0a, - 0x10, 0x4f, 0x6e, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x64, 0x10, 0x01, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x2d, - 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, - 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x32, + 0x0a, 0x1c, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x22, 0xcd, 0x01, 0x0a, 0x15, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, + 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4d, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x45, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x68, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x69, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, + 0x53, 0x68, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x2a, 0x3b, 0x0a, 0x0c, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x12, + 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x10, 0x02, 0x2a, + 0x30, 0x0a, 0x0f, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x10, + 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x10, + 0x01, 0x2a, 0x35, 0x0a, 0x10, 0x41, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x45, 0x6e, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x10, 0x01, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, + 0x6b, 0x75, 0x62, 0x65, 0x2d, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -780,35 +831,36 @@ func file_integrations_inventory_v1_definition_inventory_proto_rawDescGZIP() []b } var file_integrations_inventory_v1_definition_inventory_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_integrations_inventory_v1_definition_inventory_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_integrations_inventory_v1_definition_inventory_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_integrations_inventory_v1_definition_inventory_proto_goTypes = []interface{}{ (ArangoDBMode)(0), // 0: inventory.ArangoDBMode (ArangoDBEdition)(0), // 1: inventory.ArangoDBEdition (ArangoDBSharding)(0), // 2: inventory.ArangoDBSharding (*Inventory)(nil), // 3: inventory.Inventory - (*InventoryConfiguration)(nil), // 4: inventory.InventoryConfiguration - (*InventoryPlatform)(nil), // 5: inventory.InventoryPlatform - (*InventoryPlatformService)(nil), // 6: inventory.InventoryPlatformService - (*InventoryNetworking)(nil), // 7: inventory.InventoryNetworking - (*InventoryNetworkingRoute)(nil), // 8: inventory.InventoryNetworkingRoute - (*InventoryNetworkingRoutePath)(nil), // 9: inventory.InventoryNetworkingRoutePath - (*ArangoDBConfiguration)(nil), // 10: inventory.ArangoDBConfiguration - nil, // 11: inventory.InventoryPlatform.ServicesEntry - nil, // 12: inventory.InventoryNetworking.RoutesEntry + (*InventoryHash)(nil), // 4: inventory.InventoryHash + (*InventoryConfiguration)(nil), // 5: inventory.InventoryConfiguration + (*InventoryPlatform)(nil), // 6: inventory.InventoryPlatform + (*InventoryPlatformService)(nil), // 7: inventory.InventoryPlatformService + (*InventoryNetworking)(nil), // 8: inventory.InventoryNetworking + (*InventoryNetworkingRoute)(nil), // 9: inventory.InventoryNetworkingRoute + (*InventoryNetworkingRoutePath)(nil), // 10: inventory.InventoryNetworkingRoutePath + (*ArangoDBConfiguration)(nil), // 11: inventory.ArangoDBConfiguration + nil, // 12: inventory.InventoryPlatform.ServicesEntry + nil, // 13: inventory.InventoryNetworking.RoutesEntry } var file_integrations_inventory_v1_definition_inventory_proto_depIdxs = []int32{ - 4, // 0: inventory.Inventory.configuration:type_name -> inventory.InventoryConfiguration - 10, // 1: inventory.Inventory.arangodb:type_name -> inventory.ArangoDBConfiguration - 7, // 2: inventory.Inventory.networking:type_name -> inventory.InventoryNetworking - 5, // 3: inventory.Inventory.platform:type_name -> inventory.InventoryPlatform - 11, // 4: inventory.InventoryPlatform.services:type_name -> inventory.InventoryPlatform.ServicesEntry - 12, // 5: inventory.InventoryNetworking.routes:type_name -> inventory.InventoryNetworking.RoutesEntry - 9, // 6: inventory.InventoryNetworkingRoute.path:type_name -> inventory.InventoryNetworkingRoutePath + 5, // 0: inventory.Inventory.configuration:type_name -> inventory.InventoryConfiguration + 11, // 1: inventory.Inventory.arangodb:type_name -> inventory.ArangoDBConfiguration + 8, // 2: inventory.Inventory.networking:type_name -> inventory.InventoryNetworking + 6, // 3: inventory.Inventory.platform:type_name -> inventory.InventoryPlatform + 12, // 4: inventory.InventoryPlatform.services:type_name -> inventory.InventoryPlatform.ServicesEntry + 13, // 5: inventory.InventoryNetworking.routes:type_name -> inventory.InventoryNetworking.RoutesEntry + 10, // 6: inventory.InventoryNetworkingRoute.path:type_name -> inventory.InventoryNetworkingRoutePath 0, // 7: inventory.ArangoDBConfiguration.mode:type_name -> inventory.ArangoDBMode 1, // 8: inventory.ArangoDBConfiguration.edition:type_name -> inventory.ArangoDBEdition 2, // 9: inventory.ArangoDBConfiguration.sharding:type_name -> inventory.ArangoDBSharding - 6, // 10: inventory.InventoryPlatform.ServicesEntry.value:type_name -> inventory.InventoryPlatformService - 8, // 11: inventory.InventoryNetworking.RoutesEntry.value:type_name -> inventory.InventoryNetworkingRoute + 7, // 10: inventory.InventoryPlatform.ServicesEntry.value:type_name -> inventory.InventoryPlatformService + 9, // 11: inventory.InventoryNetworking.RoutesEntry.value:type_name -> inventory.InventoryNetworkingRoute 12, // [12:12] is the sub-list for method output_type 12, // [12:12] is the sub-list for method input_type 12, // [12:12] is the sub-list for extension type_name @@ -835,7 +887,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InventoryConfiguration); i { + switch v := v.(*InventoryHash); i { case 0: return &v.state case 1: @@ -847,7 +899,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InventoryPlatform); i { + switch v := v.(*InventoryConfiguration); i { case 0: return &v.state case 1: @@ -859,7 +911,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InventoryPlatformService); i { + switch v := v.(*InventoryPlatform); i { case 0: return &v.state case 1: @@ -871,7 +923,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InventoryNetworking); i { + switch v := v.(*InventoryPlatformService); i { case 0: return &v.state case 1: @@ -883,7 +935,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InventoryNetworkingRoute); i { + switch v := v.(*InventoryNetworking); i { case 0: return &v.state case 1: @@ -895,7 +947,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InventoryNetworkingRoutePath); i { + switch v := v.(*InventoryNetworkingRoute); i { case 0: return &v.state case 1: @@ -907,6 +959,18 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InventoryNetworkingRoutePath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_integrations_inventory_v1_definition_inventory_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArangoDBConfiguration); i { case 0: return &v.state @@ -920,7 +984,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { } } file_integrations_inventory_v1_definition_inventory_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_integrations_inventory_v1_definition_inventory_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_integrations_inventory_v1_definition_inventory_proto_msgTypes[6].OneofWrappers = []interface{}{ (*InventoryNetworkingRoute_Path)(nil), } type x struct{} @@ -929,7 +993,7 @@ func file_integrations_inventory_v1_definition_inventory_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_integrations_inventory_v1_definition_inventory_proto_rawDesc, NumEnums: 3, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/integrations/inventory/v1/definition/inventory.proto b/integrations/inventory/v1/definition/inventory.proto index 8c1f66acc..472c00432 100644 --- a/integrations/inventory/v1/definition/inventory.proto +++ b/integrations/inventory/v1/definition/inventory.proto @@ -36,6 +36,12 @@ message Inventory { optional InventoryPlatform platform = 4; } +// Platform Inventory Hash +message InventoryHash { + // Current Envoy Configuration hash + string hash = 1; +} + // Envoy Configuration details message InventoryConfiguration { // Configuration hash diff --git a/pkg/deployment/resources/config_map_gateway.go b/pkg/deployment/resources/config_map_gateway.go index 85d2810cc..4b3840d36 100644 --- a/pkg/deployment/resources/config_map_gateway.go +++ b/pkg/deployment/resources/config_map_gateway.go @@ -26,6 +26,7 @@ import ( "path" "path/filepath" + "google.golang.org/protobuf/encoding/protojson" core "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" meta "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -122,6 +123,35 @@ func (r *Resources) ensureGatewayConfig(ctx context.Context, cachedStatus inspec }, } + inventory.Arangodb = pbInventoryV1.NewArangoDBConfiguration(r.context.GetSpec(), r.context.GetStatus()) + + inventoryPreData, err := ugrpc.Marshal(inventory, ugrpc.WithUseProtoNames(true), ugrpc.WithEmitDefaultValues(true)) + if err != nil { + return errors.WithStack(errors.Wrapf(err, "Failed to render gateway inventory")) + } + + cfg.Destinations[utilConstants.EnvoyInventoryHashConfigDestination] = gateway.ConfigDestination{ + Type: util.NewType(gateway.ConfigDestinationTypeStatic), + Match: util.NewType(gateway.ConfigMatchPath), + AuthExtension: &gateway.ConfigAuthZExtension{ + AuthZExtension: map[string]string{ + pbImplEnvoyAuthV3Shared.AuthConfigAuthRequiredKey: pbImplEnvoyAuthV3Shared.AuthConfigKeywordTrue, + pbImplEnvoyAuthV3Shared.AuthConfigAuthPassModeKey: string(networkingApi.ArangoRouteSpecAuthenticationPassModeRemove), + }, + }, + Static: &gateway.ConfigDestinationStatic[*pbInventoryV1.InventoryHash]{ + Code: util.NewType[uint32](200), + Response: &pbInventoryV1.InventoryHash{ + Hash: util.SHA256(inventoryPreData), + }, + Marshaller: ugrpc.Marshal[*pbInventoryV1.InventoryHash], + Options: []util.Mod[protojson.MarshalOptions]{ + ugrpc.WithUseProtoNames(true), + ugrpc.WithEmitDefaultValues(true), + }, + }, + } + gatewayCfgYaml, gatewayCfgYamlChecksum, _, err := cfg.RenderYAML() if err != nil { return errors.WithStack(errors.Wrapf(err, "Failed to render gateway config")) @@ -137,7 +167,6 @@ func (r *Resources) ensureGatewayConfig(ctx context.Context, cachedStatus inspec return errors.WithStack(errors.Wrapf(err, "Failed to render gateway lds config")) } - inventory.Arangodb = pbInventoryV1.NewArangoDBConfiguration(r.context.GetSpec(), r.context.GetStatus()) inventory.Configuration = &pbInventoryV1.InventoryConfiguration{ Hash: gatewayCfgYamlChecksum, } diff --git a/pkg/util/constants/envoy.go b/pkg/util/constants/envoy.go index f554036f6..51239c7f8 100644 --- a/pkg/util/constants/envoy.go +++ b/pkg/util/constants/envoy.go @@ -23,10 +23,11 @@ package constants const ( EnvoyRouteHeader = "arangodb-platform-route" - EnvoyInventoryConfigDestination = "/_inventory" - EnvoyIdentityDestination = "/_identity" - EnvoyLoginDestination = "/_login" - EnvoyLogoutDestination = "/_logout" + EnvoyInventoryConfigDestination = "/_inventory" + EnvoyInventoryHashConfigDestination = "/_inventory.hash" + EnvoyIdentityDestination = "/_identity" + EnvoyLoginDestination = "/_login" + EnvoyLogoutDestination = "/_logout" EnvoyIntegrationSidecarFilterName = "envoy.filters.http.ext_authz"