Skip to content

Commit

Permalink
Add arm64 build instructions and daemon set (k8snetworkplumbingwg#227)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Perevalov <[email protected]>
  • Loading branch information
AlexeyPerevalov authored Jun 12, 2020
1 parent ea14ce0 commit 037226b
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
61 changes: 61 additions & 0 deletions deployments/k8s-v1.16/sriovdp-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,64 @@ spec:
items:
- key: config.json
path: config.json
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kube-sriov-device-plugin-arm64
namespace: kube-system
labels:
tier: node
app: sriovdp
spec:
selector:
matchLabels:
name: sriov-device-plugin
template:
metadata:
labels:
name: sriov-device-plugin
tier: node
app: sriovdp
spec:
hostNetwork: true
hostPID: true
nodeSelector:
beta.kubernetes.io/arch: arm64
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
serviceAccountName: sriov-device-plugin
containers:
- name: kube-sriovdp
# this is a temporary image repository for arm64 architecture, util CI/CD of the
# sriov-device-plugin will not allow to recreate multiple images
image: alexeyperevalov/arm64-sriov-device-plugin
imagePullPolicy: Never
args:
- --log-dir=sriovdp
- --log-level=10
securityContext:
privileged: true
volumeMounts:
- name: devicesock
mountPath: /var/lib/kubelet/
readOnly: false
- name: log
mountPath: /var/log
- name: config-volume
mountPath: /etc/pcidp
volumes:
- name: devicesock
hostPath:
path: /var/lib/kubelet/
- name: log
hostPath:
path: /var/log
- name: config-volume
configMap:
name: sriovdp-config
items:
- key: config.json
path: config.json
21 changes: 21 additions & 0 deletions images/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM arm64v8/golang:alpine as builder

ADD . /usr/src/sriov-network-device-plugin

ENV HTTP_PROXY $http_proxy
ENV HTTPS_PROXY $https_proxy
RUN apk add --update --virtual build-dependencies build-base linux-headers make && \
cd /usr/src/sriov-network-device-plugin && \
make clean && \
make build

FROM arm64v8/alpine
RUN apk add hwdata-pci
COPY --from=builder /usr/src/sriov-network-device-plugin/build/sriovdp /usr/bin/
WORKDIR /

LABEL io.k8s.display-name="SRIOV Network Device Plugin PPC64LE"

ADD ./images/entrypoint.sh /

ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit 037226b

Please sign in to comment.