[ATMOSPHERE-566] [stable/2023.2] chart/ovn: make vector config as customizable (#2091)

This is an automated cherry-pick of #2086
/assign okozachenko1203
diff --git a/charts/ovn/templates/secret-vector.yaml b/charts/ovn/templates/secret-vector.yaml
index 028e8a9..989f3af 100644
--- a/charts/ovn/templates/secret-vector.yaml
+++ b/charts/ovn/templates/secret-vector.yaml
@@ -13,6 +13,7 @@
 */}}
 
 {{- if .Values.pod.sidecars.vector }}
+{{- $envAll := . }}
 
 ---
 apiVersion: v1
@@ -20,37 +21,6 @@
 metadata:
   name: ovn-vector-config
 type: Opaque
-stringData:
-  vector.toml: |
-    [sources.file_logs]
-    type = "file"
-    include = [ "/logs/ovn-controller.log" ]
-
-    [sinks.ovn_log_parser_in]
-    type = "http"
-    inputs = ["file_logs"]
-    uri = "{{ tuple "ovn_logging_parser" "default" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}"
-    encoding.codec = "json"
-    method = "post"
-
-    [sources.ovn_log_parser_out]
-    type = "http_server"
-    address = "0.0.0.0:5001"
-    encoding = "json"
-
-    [transforms.parse_log_message]
-    type = "remap"
-    inputs = ["ovn_log_parser_out"]
-    source = '''
-      del(.source_type)
-      del(.path)
-    '''
-
-    [sinks.loki_sink]
-    type = "loki"
-    labels.event_source = "network_logs"
-    inputs = ["parse_log_message"]
-    endpoint = "http://loki.monitoring:3100"
-    encoding.codec = "json"
-    tenant_id = "{{`{{ project_id }}`}}"
+data:
+{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.vector "key" "vector.toml" "format" "Secret" ) | indent 2 }}
 {{- end }}
diff --git a/charts/ovn/values.yaml b/charts/ovn/values.yaml
index 8c99d50..3ffdece 100644
--- a/charts/ovn/values.yaml
+++ b/charts/ovn/values.yaml
@@ -102,6 +102,38 @@
       thunder-lock: true
       worker-reload-mercy: 80
       wsgi-file: /var/lib/openstack/bin/neutron-ovn-network-logging-parser-wsgi
+  vector: |
+    [sources.file_logs]
+    type = "file"
+    include = [ "/logs/ovn-controller.log" ]
+
+    [sinks.ovn_log_parser_in]
+    type = "http"
+    inputs = ["file_logs"]
+    uri = "{{ tuple "ovn_logging_parser" "default" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}"
+    encoding.codec = "json"
+    method = "post"
+
+    [sources.ovn_log_parser_out]
+    type = "http_server"
+    address = "0.0.0.0:5001"
+    encoding = "json"
+
+    [transforms.parse_log_message]
+    type = "remap"
+    inputs = ["ovn_log_parser_out"]
+    source = '''
+      del(.source_type)
+      del(.path)
+    '''
+
+    [sinks.loki_sink]
+    type = "loki"
+    labels.event_source = "network_logs"
+    inputs = ["parse_log_message"]
+    endpoint = "http://loki.monitoring:3100"
+    encoding.codec = "json"
+    tenant_id = "{{`{{ project_id }}`}}"
 
 pod:
   # NOTE: should be same as nova.pod.use_fqdn.compute