diff --git a/README.md b/README.md index 8d75762..4993b46 100644 --- a/README.md +++ b/README.md @@ -147,3 +147,6 @@ The following command should show the node resources in a similar form as shown kubectl describe node pike5 ``` +## k3s + +K3s < 1.18 stores the plugin interface in a different directory than k8s and so it needs a different yaml file to enable smarter-device-manager to communicate correctly with k3s agent. So use the smart-device-manager-k3s yaml files on this reposistor for k3s < 1.18. diff --git a/smarter-device-management-pod-k8s.yaml b/smarter-device-management-pod.yaml similarity index 100% rename from smarter-device-management-pod-k8s.yaml rename to smarter-device-management-pod.yaml diff --git a/smarter-device-manager-configmap-rpi.yaml b/smarter-device-manager-configmap-rpi.yaml index 304ad93..1bcbdf7 100644 --- a/smarter-device-manager-configmap-rpi.yaml +++ b/smarter-device-manager-configmap-rpi.yaml @@ -22,3 +22,11 @@ data: nummaxdevices: 20 - devicematch: ^vcsm.*$ nummaxdevices: 20 + - devicematch: ^ttyUSB[0-9]*$ + nummaxdevices: 1 + - devicematch: ^ttyACM[0-9]*$ + nummaxdevices: 1 + - devicematch: ^ttyTHS[0-9]*$ + nummaxdevices: 1 + - devicematch: ^ttyS[0-9]*$ + nummaxdevices: 1 diff --git a/smarter-device-manager-configmap-xavier.yaml b/smarter-device-manager-configmap-xavier.yaml index d1c38a9..e132943 100644 --- a/smarter-device-manager-configmap-xavier.yaml +++ b/smarter-device-manager-configmap-xavier.yaml @@ -22,5 +22,13 @@ data: nummaxdevices: 20 - devicematch: ^vcsm.*$ nummaxdevices: 20 + - devicematch: ^ttyUSB[0-9]*$ + nummaxdevices: 1 + - devicematch: ^ttyACM[0-9]*$ + nummaxdevices: 1 + - devicematch: ^ttyTHS[0-9]*$ + nummaxdevices: 1 + - devicematch: ^ttyS[0-9]*$ + nummaxdevices: 1 - devicematch: nvidia-gpu nummaxdevices: 20 diff --git a/smarter-device-manager-k3s.yaml b/smarter-device-manager-ds-k3s.yaml similarity index 100% rename from smarter-device-manager-k3s.yaml rename to smarter-device-manager-ds-k3s.yaml diff --git a/smarter-device-manager-k3s-with-configmap-rpi.yaml b/smarter-device-manager-ds-with-configmap-rpi-k3s.yaml similarity index 100% rename from smarter-device-manager-k3s-with-configmap-rpi.yaml rename to smarter-device-manager-ds-with-configmap-rpi-k3s.yaml diff --git a/smarter-device-manager-k8s-with-configmap-rpi.yaml b/smarter-device-manager-ds-with-configmap-rpi.yaml similarity index 97% rename from smarter-device-manager-k8s-with-configmap-rpi.yaml rename to smarter-device-manager-ds-with-configmap-rpi.yaml index 37c5dd8..aa90538 100644 --- a/smarter-device-manager-k8s-with-configmap-rpi.yaml +++ b/smarter-device-manager-ds-with-configmap-rpi.yaml @@ -32,8 +32,6 @@ spec: hostname: smarter-device-management hostNetwork: true dnsPolicy: ClusterFirstWithHostNet - imagePullSecrets: - - name: k8sedgeregcred containers: - name: smarter-device-manager image: registry.gitlab.com/arm-research/smarter/smarter-device-manager/smarter-device-manager:IMAGE_ID diff --git a/smarter-device-manager-k3s-with-configmap-xavier.yaml b/smarter-device-manager-ds-with-configmap-xavier-k3s.yaml similarity index 97% rename from smarter-device-manager-k3s-with-configmap-xavier.yaml rename to smarter-device-manager-ds-with-configmap-xavier-k3s.yaml index afb1aa8..747d901 100644 --- a/smarter-device-manager-k3s-with-configmap-xavier.yaml +++ b/smarter-device-manager-ds-with-configmap-xavier-k3s.yaml @@ -32,8 +32,6 @@ spec: hostname: smarter-device-management hostNetwork: true dnsPolicy: ClusterFirstWithHostNet - imagePullSecrets: - - name: k8sedgeregcred containers: - name: smarter-device-manager image: registry.gitlab.com/arm-research/smarter/smarter-device-manager/smarter-device-manager:IMAGE_ID diff --git a/smarter-device-manager-k8s-with-configmap-xavier.yaml b/smarter-device-manager-ds-with-configmap-xavier.yaml similarity index 97% rename from smarter-device-manager-k8s-with-configmap-xavier.yaml rename to smarter-device-manager-ds-with-configmap-xavier.yaml index ae861b5..ef557f9 100644 --- a/smarter-device-manager-k8s-with-configmap-xavier.yaml +++ b/smarter-device-manager-ds-with-configmap-xavier.yaml @@ -32,8 +32,6 @@ spec: hostname: smarter-device-management hostNetwork: true dnsPolicy: ClusterFirstWithHostNet - imagePullSecrets: - - name: k8sedgeregcred containers: - name: smarter-device-manager image: registry.gitlab.com/arm-research/smarter/smarter-device-manager/smarter-device-manager:IMAGE_ID diff --git a/smarter-device-manager-k8s.yaml b/smarter-device-manager-ds.yaml similarity index 97% rename from smarter-device-manager-k8s.yaml rename to smarter-device-manager-ds.yaml index 12c67be..5aa841f 100644 --- a/smarter-device-manager-k8s.yaml +++ b/smarter-device-manager-ds.yaml @@ -32,8 +32,6 @@ spec: hostname: smarter-device-management hostNetwork: true dnsPolicy: ClusterFirstWithHostNet - imagePullSecrets: - - name: k8sedgeregcred containers: - name: smarter-device-manager image: registry.gitlab.com/arm-research/smarter/smarter-device-manager/smarter-device-manager:IMAGE_ID diff --git a/smarter-device-manager-k3s-no-configmap.yaml b/smarter-device-manager-k3s-no-configmap.yaml deleted file mode 100644 index 3c73069..0000000 --- a/smarter-device-manager-k3s-no-configmap.yaml +++ /dev/null @@ -1,48 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: smarter-device-management - namespace: default -spec: - # Mark this pod as a critical add-on; when enabled, the critical add-on - # scheduler reserves resources for critical add-on pods so that they can - # be rescheduled after a failure. - # See https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ - priorityClassName: "system-node-critical" - hostNetwork: true - dnsPolicy: ClusterFirstWithHostNet - hostname: smarter-device-management - nodeName: smarter-jetson-xavier-4bcc2584 - containers: - - name: smarter-device-manager - image: registry.gitlab.com/arm-research/smarter/smarter-device-manager/smarter-device-manager:IMAGE_ID - imagePullPolicy: IfNotPresent - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - resources: - limits: - cpu: 100m - memory: 10Mi - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - name: device-plugin - mountPath: /var/lib/kubelet/device-plugins - - name: dev-dir - mountPath: /dev - - name: sys-dir - mountPath: /sys - volumes: - - name: device-plugin - hostPath: - path: /var/lib/rancher/k3s/agent/kubelet/device-plugins - - name: dev-dir - hostPath: - path: /dev - - name: sys-dir - hostPath: - path: /sys - terminationGracePeriodSeconds: 30