67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
|
|
# that are necessary to run CSI nodeplugin for nfs
|
|
kind: DaemonSet
|
|
apiVersion: apps/v1beta2
|
|
metadata:
|
|
name: csi-nodeplugin-nfsplugin
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-nodeplugin-nfsplugin
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-nodeplugin-nfsplugin
|
|
spec:
|
|
serviceAccount: csi-nodeplugin
|
|
hostNetwork: true
|
|
containers:
|
|
- name: driver-registrar
|
|
image: docker.io/k8scsi/driver-registrar
|
|
args:
|
|
- "--v=5"
|
|
- "--csi-address=$(ADDRESS)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /plugin/csi.sock
|
|
- name: KUBE_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
volumeMounts:
|
|
- name: plugin-dir
|
|
mountPath: /plugin
|
|
- name: nfs
|
|
securityContext:
|
|
privileged: true
|
|
capabilities:
|
|
add: ["SYS_ADMIN"]
|
|
allowPrivilegeEscalation: true
|
|
image: docker.io/k8s/nfsplugin:v0.1
|
|
args :
|
|
- "--nodeid=$(NODE_ID)"
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
env:
|
|
- name: NODE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: CSI_ENDPOINT
|
|
value: unix://plugin/csi.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: plugin-dir
|
|
mountPath: /plugin
|
|
- name: pods-mount-dir
|
|
mountPath: /var/lib/kubelet/pods
|
|
mountPropagation: "Bidirectional"
|
|
volumes:
|
|
- name: plugin-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins/csi-nfsplugin
|
|
type: DirectoryOrCreate
|
|
- name: pods-mount-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/pods
|
|
type: Directory
|