From e9e00202c9e4b42e5062564a58038f3c64fcef30 Mon Sep 17 00:00:00 2001 From: fumingwei Date: Mon, 12 Jun 2023 21:05:13 +0800 Subject: [PATCH] =?UTF-8?q?feature:TSG-15520:=E5=B0=86host=E4=B8=8A?= =?UTF-8?q?=E7=9A=84/dev/bus/usb=E7=9B=AE=E5=BD=95=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E5=88=B0=E5=AE=B9=E5=99=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../traffic-engine/files/helm/templates/_config.tpl | 12 ++++++++++++ .../files/helm/templates/deployment-firewall.yaml | 2 ++ .../files/helm/templates/deployment-proxy.yaml | 2 ++ 3 files changed, 16 insertions(+) diff --git a/ansible/roles/traffic-engine/files/helm/templates/_config.tpl b/ansible/roles/traffic-engine/files/helm/templates/_config.tpl index 063fd539..b7564984 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/_config.tpl +++ b/ansible/roles/traffic-engine/files/helm/templates/_config.tpl @@ -470,4 +470,16 @@ enable_breakpad_upload=0 - name: localtime-node mountPath: /etc/localtime readOnly: true +{{- end -}} + +{{- define "traffic-engine.volume.dev-bus-usb" -}} + - name: dev-bus-usb-node + hostPath: + path: /dev/bus/usb +{{- end -}} + +{{- define "traffic-engine.mount.dev-bus-usb" -}} + - name: dev-bus-usb-node + mountPath: /dev/bus/usb + readOnly: true {{- end -}} \ No newline at end of file diff --git a/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml b/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml index 801bdb7b..fce42980 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml @@ -89,6 +89,7 @@ spec: {{ template "traffic-engine.mount.localtime" . }} {{ template "traffic-engine.firewall.mount.prestart" . }} {{ template "traffic-engine.firewall.mount.hostpath" . }} + {{ template "traffic-engine.mount.dev-bus-usb" . }} - name: telegraf image: "registry.gdnt-cloud.website/tsg-telegraf:{{ .Chart.AppVersion }}" @@ -172,3 +173,4 @@ spec: {{ template "traffic-engine.volume.localtime" . }} {{ template "traffic-engine.firewall.volume.prestart" . }} {{ template "traffic-engine.volume.hostpath" . }} + {{ template "traffic-engine.volume.dev-bus-usb" . }} diff --git a/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml b/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml index f2222f1a..11c1f46c 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml @@ -86,6 +86,7 @@ spec: {{ template "traffic-engine.mount.localtime" . }} {{ template "traffic-engine.proxy.mount.prestart" . }} {{ template "traffic-engine.proxy.mount.hostpath" . }} + {{ template "traffic-engine.mount.dev-bus-usb" . }} - name: certstore image: "registry.gdnt-cloud.website/tsg-certstore:{{ .Chart.AppVersion }}" @@ -263,5 +264,6 @@ spec: {{ template "traffic-engine.volume.localtime" . }} {{ template "traffic-engine.proxy.volume.prestart" . }} {{ template "traffic-engine.volume.hostpath" . }} + {{ template "traffic-engine.volume.dev-bus-usb" . }} {{- end }} \ No newline at end of file