🐞 fix:TSG-23355:Change the mount type of dp-trace and packet-io configmaps from file to directory.

This commit is contained in:
linxin
2024-11-04 18:51:53 +08:00
parent 058005169e
commit 7d117fd810
3 changed files with 10 additions and 13 deletions

View File

@@ -4,10 +4,9 @@ dp_trace_merge_timeout=30
{% if datapath_trace.rule -%}
{% for rule in datapath_trace.rule -%}
[dp_trace_rule:{{ rule.id }}]
{%- if rule.enable == "yes" -%}
{% if rule.enable -%}
enable=1
{% endif -%}
{%- if rule.enable == "no" -%}
{% else -%}
enable=0
{% endif -%}
{%- if rule.bpf_expr is defined -%}

View File

@@ -43,18 +43,17 @@ spec:
- "bash"
- "-ec"
- |
/usr/local/bin/j2 -f yaml /templates/dp_trace_dy.conf.j2 /templates/values.yaml -o /opt/tsg/dp_trace_telemetry/share_conf/dp_trace_dy.conf
WATCH_DIR="/templates/values.yaml"
/usr/local/bin/j2 -f yaml /templates/dp_trace_dy.conf.j2 /templates/configmap/values.yaml -o /opt/tsg/dp_trace_telemetry/share_conf/dp_trace_dy.conf
WATCH_DIR="/templates/configmap"
while inotifywait -r -e modify,create "$WATCH_DIR"; do
echo "send HUB signal to dp_trace"
/usr/local/bin/j2 -f yaml /templates/dp_trace_dy.conf.j2 /templates/values.yaml -o /opt/tsg/dp_trace_telemetry/share_conf/dp_trace_dy.conf
/usr/local/bin/j2 -f yaml /templates/dp_trace_dy.conf.j2 /templates/configmap/values.yaml -o /opt/tsg/dp_trace_telemetry/share_conf/dp_trace_dy.conf
pkill -1 dp-trace-telemetry
echo "signal send"
done
volumeMounts:
- name: dp-trace-dy
mountPath: "/templates/values.yaml"
subPath: "values.yaml"
mountPath: "/templates/configmap"
- name: share-config
mountPath: /opt/tsg/dp_trace_telemetry/share_conf/
lifecycle:

View File

@@ -43,11 +43,11 @@ spec:
- "bash"
- "-ec"
- |
/usr/local/bin/j2 -f yaml /templates/mrglobal.dynamic.conf.j2 /templates/values.yaml -o /opt/tsg/config/shared/mrglobal.dynamic.conf
WATCH_DIR="/templates/values.yaml"
/usr/local/bin/j2 -f yaml /templates/mrglobal.dynamic.conf.j2 /templates/configmap/values.yaml -o /opt/tsg/config/shared/mrglobal.dynamic.conf
WATCH_DIR="/templates/configmap"
while inotifywait -r -e modify,create "$WATCH_DIR"; do
echo "send HUB signal to mrzcpd"
/usr/local/bin/j2 -f yaml /templates/mrglobal.dynamic.conf.j2 /templates/values.yaml -o /opt/tsg/config/shared/mrglobal.dynamic.conf
/usr/local/bin/j2 -f yaml /templates/mrglobal.dynamic.conf.j2 /templates/configmap/values.yaml -o /opt/tsg/config/shared/mrglobal.dynamic.conf
pkill -1 mrzcpd
echo "signal send"
done
@@ -55,8 +55,7 @@ spec:
- name: shared-dir
mountPath: /opt/tsg/config/shared
- name: packet-io-engine-reload-conf
mountPath: /templates/values.yaml
subPath: "values.yaml"
mountPath: /templates/configmap
securityContext:
privileged: true
lifecycle: