🐞 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 -%} {% if datapath_trace.rule -%}
{% for rule in datapath_trace.rule -%} {% for rule in datapath_trace.rule -%}
[dp_trace_rule:{{ rule.id }}] [dp_trace_rule:{{ rule.id }}]
{%- if rule.enable == "yes" -%} {% if rule.enable -%}
enable=1 enable=1
{% endif -%} {% else -%}
{%- if rule.enable == "no" -%}
enable=0 enable=0
{% endif -%} {% endif -%}
{%- if rule.bpf_expr is defined -%} {%- if rule.bpf_expr is defined -%}

View File

@@ -43,18 +43,17 @@ spec:
- "bash" - "bash"
- "-ec" - "-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 /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/values.yaml" WATCH_DIR="/templates/configmap"
while inotifywait -r -e modify,create "$WATCH_DIR"; do while inotifywait -r -e modify,create "$WATCH_DIR"; do
echo "send HUB signal to dp_trace" 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 pkill -1 dp-trace-telemetry
echo "signal send" echo "signal send"
done done
volumeMounts: volumeMounts:
- name: dp-trace-dy - name: dp-trace-dy
mountPath: "/templates/values.yaml" mountPath: "/templates/configmap"
subPath: "values.yaml"
- name: share-config - name: share-config
mountPath: /opt/tsg/dp_trace_telemetry/share_conf/ mountPath: /opt/tsg/dp_trace_telemetry/share_conf/
lifecycle: lifecycle:

View File

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