summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinxin <[email protected]>2024-11-04 18:51:53 +0800
committerlinxin <[email protected]>2024-11-05 17:18:22 +0800
commit7d117fd810ee39747b979c67f377727fe82a2028 (patch)
treed02a29695c497d32947add39a4134fae80eb6364
parent058005169e914282a4b612b2dc3f76cacef47e6a (diff)
🐞 fix:TSG-23355:Change the mount type of dp-trace and packet-io configmaps from file to directory.
-rw-r--r--containers/dp-trace-telemetry/templates/dp_trace_dy.conf.j25
-rw-r--r--helmcharts/dp-trace-telemetry/helm/templates/deployment.yaml9
-rw-r--r--helmcharts/packet-io-engine/helm/templates/deployment.yaml9
3 files changed, 10 insertions, 13 deletions
diff --git a/containers/dp-trace-telemetry/templates/dp_trace_dy.conf.j2 b/containers/dp-trace-telemetry/templates/dp_trace_dy.conf.j2
index 9a8146e6..252ad84c 100644
--- a/containers/dp-trace-telemetry/templates/dp_trace_dy.conf.j2
+++ b/containers/dp-trace-telemetry/templates/dp_trace_dy.conf.j2
@@ -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 -%}
diff --git a/helmcharts/dp-trace-telemetry/helm/templates/deployment.yaml b/helmcharts/dp-trace-telemetry/helm/templates/deployment.yaml
index 502392af..4bb237be 100644
--- a/helmcharts/dp-trace-telemetry/helm/templates/deployment.yaml
+++ b/helmcharts/dp-trace-telemetry/helm/templates/deployment.yaml
@@ -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:
diff --git a/helmcharts/packet-io-engine/helm/templates/deployment.yaml b/helmcharts/packet-io-engine/helm/templates/deployment.yaml
index 9d5249ac..36c82b15 100644
--- a/helmcharts/packet-io-engine/helm/templates/deployment.yaml
+++ b/helmcharts/packet-io-engine/helm/templates/deployment.yaml
@@ -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: