From dabe3ef381960fffa0c2335f35a9bada6682e213 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Sat, 1 Jun 2024 23:34:06 +0200 Subject: [PATCH] install generic device plugin --- .../apps/generic-device-plugin/daemonset.yaml | 60 +++++++++++++++++++ .../argoapps/generic-device-plugin.yaml | 16 +++++ 2 files changed, 76 insertions(+) create mode 100644 deployment/apps/generic-device-plugin/daemonset.yaml create mode 100644 deployment/argoapps/generic-device-plugin.yaml diff --git a/deployment/apps/generic-device-plugin/daemonset.yaml b/deployment/apps/generic-device-plugin/daemonset.yaml new file mode 100644 index 0000000..8af6f4e --- /dev/null +++ b/deployment/apps/generic-device-plugin/daemonset.yaml @@ -0,0 +1,60 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: generic-device-plugin + namespace: kube-system + labels: + app.kubernetes.io/name: generic-device-plugin +spec: + selector: + matchLabels: + app.kubernetes.io/name: generic-device-plugin + template: + metadata: + labels: + app.kubernetes.io/name: generic-device-plugin + spec: + priorityClassName: system-node-critical + tolerations: + - operator: "Exists" + effect: "NoExecute" + - operator: "Exists" + effect: "NoSchedule" + containers: + - image: docker.io/squat/generic-device-plugin + args: + - --device + - | + name: blinkstick + groups: + - count: 10 + usb: + - vendor: "20a0" + product: "41e5" + name: generic-device-plugin + resources: + requests: + cpu: 50m + memory: 10Mi + limits: + cpu: 50m + memory: 20Mi + ports: + - containerPort: 8080 + name: http + securityContext: + privileged: true + volumeMounts: + - name: device-plugin + mountPath: /var/lib/kubelet/device-plugins + - name: dev + mountPath: /dev + volumes: + - name: device-plugin + hostPath: + path: /var/lib/kubelet/device-plugins + - name: dev + hostPath: + path: /dev + updateStrategy: + type: RollingUpdate diff --git a/deployment/argoapps/generic-device-plugin.yaml b/deployment/argoapps/generic-device-plugin.yaml new file mode 100644 index 0000000..11b366f --- /dev/null +++ b/deployment/argoapps/generic-device-plugin.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: generic-device-plugin + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: apps + source: + path: deployment/apps/generic-device-plugin + repoURL: https://github.com/vshn/conferenceli.git + targetRevision: HEAD + destination: + namespace: kube-system + server: https://kubernetes.default.svc