From cabd1806352b1e4c054380e9cf4d9589ef579a7b Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Sat, 1 Jun 2024 22:00:07 +0200 Subject: [PATCH] install libusb and mount usb into pod --- Dockerfile.podstatus | 2 +- deployment/apps/podstatus/deployment.yaml | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile.podstatus b/Dockerfile.podstatus index 773ede9..9ac8ada 100644 --- a/Dockerfile.podstatus +++ b/Dockerfile.podstatus @@ -19,7 +19,7 @@ RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root FROM python:3.12-bookworm as runtime RUN apt-get update && \ - apt-get install -y nginx && \ + apt-get install -y nginx python3-libusb1 && \ rm -rf /var/lib/apt/lists/* ENV VIRTUAL_ENV=/app/.venv \ diff --git a/deployment/apps/podstatus/deployment.yaml b/deployment/apps/podstatus/deployment.yaml index 1a97311..59a8857 100644 --- a/deployment/apps/podstatus/deployment.yaml +++ b/deployment/apps/podstatus/deployment.yaml @@ -25,7 +25,7 @@ spec: protocol: TCP env: - name: LOG_LEVEL - value: DEBUG + value: INFO - name: K8S_NAMESPACE value: http-echo envFrom: @@ -40,3 +40,10 @@ spec: path: / port: http resources: {} + volumeMounts: + - mountPath: /dev/bus/usb + name: dev-bus-usb + volumes: + - name: dev-bus-usb + hostPath: + path: /dev/bus/usb