# Explicit single-device allocation for the remote Android qualification worker. # Upstream source: squat/generic-device-plugin f7c3291ebca3c00434ed1e624192f61fd21a59c9. # The plugin only discovers /dev/kvm; workers must request lesavka.dev/kvm: 1. apiVersion: apps/v1 kind: DaemonSet metadata: name: lesavka-kvm-device-plugin namespace: jenkins labels: app.kubernetes.io/name: lesavka-kvm-device-plugin spec: selector: matchLabels: app.kubernetes.io/name: lesavka-kvm-device-plugin template: metadata: labels: app.kubernetes.io/name: lesavka-kvm-device-plugin spec: automountServiceAccountToken: false enableServiceLinks: false terminationGracePeriodSeconds: 15 nodeSelector: kubernetes.io/arch: amd64 kubernetes.io/hostname: titan-22 containers: - name: device-plugin image: docker.io/squat/generic-device-plugin@sha256:5f6c12bcd803ac7c60a0a63b8948bd78c6f42da20ad302573518c8b71d4a02f3 args: - --domain=lesavka.dev - --listen=127.0.0.1:8080 - --device={"name":"kvm","groups":[{"count":1,"paths":[{"path":"/dev/kvm"}]}]} securityContext: # Own only the kubelet plugin socket; no host root filesystem or API token. runAsUser: 0 runAsGroup: 0 allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: [ALL] seccompProfile: type: RuntimeDefault resources: requests: {cpu: 25m, memory: 16Mi} limits: {cpu: 100m, memory: 64Mi} volumeMounts: - name: plugin-sockets mountPath: /var/lib/kubelet/device-plugins - name: kvm mountPath: /dev/kvm readOnly: true volumes: - name: plugin-sockets hostPath: path: /var/lib/kubelet/device-plugins type: Directory - name: kvm hostPath: path: /dev/kvm type: CharDevice