Skip to content

Instantly share code, notes, and snippets.

@kairen
Last active August 23, 2019 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kairen/db340671b4bdf59723f753fafd99ce4a to your computer and use it in GitHub Desktop.
Save kairen/db340671b4bdf59723f753fafd99ce4a to your computer and use it in GitHub Desktop.
apiVersion: v1
data:
config.json: |
{
"mode" : "sriov",
"pfNetdevices": ["ib0"]
}
kind: ConfigMap
metadata:
name: rdma-devices
namespace: kube-system
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
name: rdma-sriov-dp-ds
name: rdma-sriov-dp-ds
namespace: kube-system
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
name: rdma-sriov-dp-ds
template:
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
creationTimestamp: null
labels:
name: rdma-sriov-dp-ds
spec:
containers:
- image: rdma/k8s-rdma-sriov-dev-plugin
imagePullPolicy: IfNotPresent
name: k8s-rdma-sriov-dp-ds
securityContext:
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/kubelet/device-plugins
name: device-plugin
- mountPath: /k8s-rdma-sriov-dev-plugin
name: config
dnsPolicy: ClusterFirst
hostNetwork: true
restartPolicy: Always
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
volumes:
- hostPath:
path: /var/lib/kubelet/device-plugins
type: ""
name: device-plugin
- configMap:
defaultMode: 420
items:
- key: config.json
path: config.json
name: rdma-devices
name: config
templateGeneration: 2
updateStrategy:
type: OnDelete
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
name: sriov-cni-ds
name: kube-sriov-cni-ds-installer
namespace: kube-system
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
name: sriov-cni-ds
template:
metadata:
creationTimestamp: null
labels:
name: sriov-cni-ds
spec:
containers:
- command:
- /installer/installer_sleep.sh
image: rdma/k8s-sriov-cni-installer
imagePullPolicy: IfNotPresent
name: install-cni-sleep
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
hostNetwork: true
initContainers:
- command:
- /installer/installer.sh
image: rdma/k8s-sriov-cni-installer
imagePullPolicy: IfNotPresent
name: install-cni
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /host-cni-etc
name: host-cni-etc
- mountPath: /host-cni-bin
name: host-cni-bin
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
volumes:
- hostPath:
path: /etc/cni/multus/sriov/net.d
type: ""
name: host-cni-etc
- hostPath:
path: /opt/cni/bin
type: ""
name: host-cni-bin
templateGeneration: 1
updateStrategy:
type: OnDelete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment