2019-02-07 09:59:26 +00:00
|
|
|
---
|
2018-01-09 18:59:50 +00:00
|
|
|
kind: DaemonSet
|
2019-06-19 09:05:44 +00:00
|
|
|
apiVersion: apps/v1
|
2018-01-09 18:59:50 +00:00
|
|
|
metadata:
|
2018-03-06 22:33:57 +00:00
|
|
|
name: csi-rbdplugin
|
2018-01-09 18:59:50 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2018-03-06 22:33:57 +00:00
|
|
|
app: csi-rbdplugin
|
2018-01-09 18:59:50 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2018-03-06 22:33:57 +00:00
|
|
|
app: csi-rbdplugin
|
2018-01-09 18:59:50 +00:00
|
|
|
spec:
|
2019-01-23 15:05:15 +00:00
|
|
|
serviceAccount: rbd-csi-nodeplugin
|
2018-01-09 18:59:50 +00:00
|
|
|
hostNetwork: true
|
2019-02-07 09:59:26 +00:00
|
|
|
hostPID: true
|
2018-09-19 14:37:58 +00:00
|
|
|
# to use e.g. Rook orchestrated cluster, and mons' FQDN is
|
|
|
|
# resolved through k8s service, set dns policy to cluster first
|
2019-02-07 09:59:26 +00:00
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2018-01-09 18:59:50 +00:00
|
|
|
containers:
|
|
|
|
- name: driver-registrar
|
2019-01-22 16:31:55 +00:00
|
|
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
|
2018-01-09 18:59:50 +00:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
2019-01-22 16:31:55 +00:00
|
|
|
- "--csi-address=/csi/csi.sock"
|
2019-03-13 05:09:58 +00:00
|
|
|
- "--kubelet-registration-path=/var/lib/kubelet/plugins/rbd.csi.ceph.com/csi.sock"
|
2019-01-22 16:31:55 +00:00
|
|
|
lifecycle:
|
|
|
|
preStop:
|
|
|
|
exec:
|
2019-02-07 09:59:26 +00:00
|
|
|
command: [
|
|
|
|
"/bin/sh", "-c",
|
2019-03-13 05:09:58 +00:00
|
|
|
"rm -rf /registration/rbd.csi.ceph.com \
|
|
|
|
/registration/rbd.csi.ceph.com-reg.sock"
|
2019-02-07 09:59:26 +00:00
|
|
|
]
|
2018-01-09 18:59:50 +00:00
|
|
|
env:
|
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
volumeMounts:
|
2019-01-22 16:31:55 +00:00
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: /csi
|
2018-09-10 19:16:17 +00:00
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
2018-09-17 18:12:22 +00:00
|
|
|
- name: csi-rbdplugin
|
2018-01-09 18:59:50 +00:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
capabilities:
|
|
|
|
add: ["SYS_ADMIN"]
|
|
|
|
allowPrivilegeEscalation: true
|
2019-07-08 12:00:52 +00:00
|
|
|
# for stable functionality replace v1.1.0 with latest release version
|
|
|
|
image: quay.io/cephcsi/cephcsi:v1.1.0
|
2019-02-07 09:59:26 +00:00
|
|
|
args:
|
2018-01-09 18:59:50 +00:00
|
|
|
- "--nodeid=$(NODE_ID)"
|
2019-05-24 11:03:33 +00:00
|
|
|
- "--type=rbd"
|
2018-01-09 18:59:50 +00:00
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
|
|
- "--v=5"
|
2019-03-13 05:09:58 +00:00
|
|
|
- "--drivername=rbd.csi.ceph.com"
|
2018-12-19 14:26:16 +00:00
|
|
|
- "--containerized=true"
|
2018-01-09 18:59:50 +00:00
|
|
|
env:
|
2018-09-17 18:12:22 +00:00
|
|
|
- name: HOST_ROOTFS
|
2019-02-07 09:59:26 +00:00
|
|
|
value: "/rootfs"
|
2018-01-09 18:59:50 +00:00
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: CSI_ENDPOINT
|
2019-03-18 06:50:06 +00:00
|
|
|
value: unix:///csi/csi.sock
|
2018-01-09 18:59:50 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: plugin-dir
|
2019-03-18 06:50:06 +00:00
|
|
|
mountPath: /csi
|
2018-01-09 18:59:50 +00:00
|
|
|
- name: pods-mount-dir
|
|
|
|
mountPath: /var/lib/kubelet/pods
|
|
|
|
mountPropagation: "Bidirectional"
|
2019-01-17 13:57:18 +00:00
|
|
|
- name: plugin-mount-dir
|
|
|
|
mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/
|
|
|
|
mountPropagation: "Bidirectional"
|
2018-01-09 18:59:50 +00:00
|
|
|
- mountPath: /dev
|
|
|
|
name: host-dev
|
2018-10-15 14:59:41 +00:00
|
|
|
- mountPath: /rootfs
|
2019-02-07 09:59:26 +00:00
|
|
|
name: host-rootfs
|
2018-01-09 18:59:50 +00:00
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: lib-modules
|
|
|
|
readOnly: true
|
2019-04-22 21:35:39 +00:00
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
2018-01-09 18:59:50 +00:00
|
|
|
volumes:
|
|
|
|
- name: plugin-dir
|
|
|
|
hostPath:
|
2019-03-13 05:09:58 +00:00
|
|
|
path: /var/lib/kubelet/plugins/rbd.csi.ceph.com
|
2018-01-09 18:59:50 +00:00
|
|
|
type: DirectoryOrCreate
|
2018-11-01 01:03:03 +00:00
|
|
|
- name: plugin-mount-dir
|
2019-02-07 09:59:26 +00:00
|
|
|
hostPath:
|
2018-11-01 01:03:03 +00:00
|
|
|
path: /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/
|
|
|
|
type: DirectoryOrCreate
|
2018-09-10 19:16:17 +00:00
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
2018-12-04 20:08:39 +00:00
|
|
|
path: /var/lib/kubelet/plugins_registry/
|
2018-09-10 19:16:17 +00:00
|
|
|
type: Directory
|
2018-01-09 18:59:50 +00:00
|
|
|
- name: pods-mount-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/kubelet/pods
|
|
|
|
type: Directory
|
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
2018-09-17 18:12:22 +00:00
|
|
|
- name: host-rootfs
|
|
|
|
hostPath:
|
2019-02-07 09:59:26 +00:00
|
|
|
path: /
|
2018-01-09 18:59:50 +00:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
2018-07-18 14:48:43 +00:00
|
|
|
path: /lib/modules
|
2019-04-22 21:35:39 +00:00
|
|
|
- name: ceph-csi-config
|
|
|
|
configMap:
|
|
|
|
name: ceph-csi-config
|