2019-02-07 15:29:26 +05:30
|
|
|
---
|
2018-01-09 13:59:50 -05:00
|
|
|
kind: DaemonSet
|
2019-06-19 14:35:44 +05:30
|
|
|
apiVersion: apps/v1
|
2018-01-09 13:59:50 -05:00
|
|
|
metadata:
|
2018-03-06 17:33:57 -05:00
|
|
|
name: csi-rbdplugin
|
2021-07-31 00:15:34 +07:00
|
|
|
# replace with non-default namespace name
|
|
|
|
namespace: default
|
2018-01-09 13:59:50 -05:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2018-03-06 17:33:57 -05:00
|
|
|
app: csi-rbdplugin
|
2018-01-09 13:59:50 -05:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2018-03-06 17:33:57 -05:00
|
|
|
app: csi-rbdplugin
|
2018-01-09 13:59:50 -05:00
|
|
|
spec:
|
2021-04-05 17:13:45 +05:30
|
|
|
serviceAccountName: rbd-csi-nodeplugin
|
2018-01-09 13:59:50 -05:00
|
|
|
hostNetwork: true
|
2019-02-07 15:29:26 +05:30
|
|
|
hostPID: true
|
2020-05-05 13:57:38 +05:30
|
|
|
priorityClassName: system-node-critical
|
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 15:29:26 +05:30
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2018-01-09 13:59:50 -05:00
|
|
|
containers:
|
2018-09-17 18:12:22 +00:00
|
|
|
- name: csi-rbdplugin
|
2018-01-09 13:59:50 -05:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
capabilities:
|
|
|
|
add: ["SYS_ADMIN"]
|
|
|
|
allowPrivilegeEscalation: true
|
2019-05-24 16:33:33 +05:30
|
|
|
# for stable functionality replace canary with latest release version
|
|
|
|
image: quay.io/cephcsi/cephcsi:canary
|
2019-02-07 15:29:26 +05:30
|
|
|
args:
|
2018-01-09 13:59:50 -05:00
|
|
|
- "--nodeid=$(NODE_ID)"
|
2021-05-31 16:41:01 +05:30
|
|
|
- "--pluginpath=/var/lib/kubelet/plugins"
|
2022-06-23 11:31:44 +05:30
|
|
|
- "--stagingpath=/var/lib/kubelet/plugins/kubernetes.io/csi/"
|
2019-05-24 16:33:33 +05:30
|
|
|
- "--type=rbd"
|
2019-08-14 12:12:17 +05:30
|
|
|
- "--nodeserver=true"
|
2018-01-09 13:59:50 -05:00
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2021-12-22 08:09:27 +01:00
|
|
|
- "--csi-addons-endpoint=$(CSI_ADDONS_ENDPOINT)"
|
2018-01-09 13:59:50 -05:00
|
|
|
- "--v=5"
|
2019-03-13 10:39:58 +05:30
|
|
|
- "--drivername=rbd.csi.ceph.com"
|
2021-03-25 16:44:46 +05:30
|
|
|
- "--enableprofiling=false"
|
2020-01-24 11:26:56 -05:00
|
|
|
# If topology based provisioning is desired, configure required
|
|
|
|
# node labels representing the nodes topology domain
|
2020-11-24 17:24:29 +05:30
|
|
|
# and pass the label names below, for CSI to consume and advertise
|
2020-01-24 11:26:56 -05:00
|
|
|
# its equivalent topology domain
|
|
|
|
# - "--domainlabels=failure-domain/region,failure-domain/zone"
|
2023-02-02 17:23:08 +05:30
|
|
|
#
|
|
|
|
# Options to enable read affinity.
|
|
|
|
# If enabled Ceph CSI will fetch labels from kubernetes node and
|
|
|
|
# pass `read_from_replica=localize,crush_location=type:value` during
|
|
|
|
# rbd map command. refer:
|
|
|
|
# https://docs.ceph.com/en/latest/man/8/rbd/#kernel-rbd-krbd-options
|
|
|
|
# for more details.
|
|
|
|
# - "--enable-read-affinity=true"
|
|
|
|
# - "--crush-location-labels=topology.io/zone,topology.io/rack"
|
2018-01-09 13:59:50 -05:00
|
|
|
env:
|
2019-08-21 14:58:02 +05:30
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2018-01-09 13:59:50 -05:00
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2021-07-31 00:15:34 +07:00
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2020-12-15 15:37:28 +05:30
|
|
|
# - name: KMS_CONFIGMAP_NAME
|
|
|
|
# value: encryptionConfig
|
2018-01-09 13:59:50 -05:00
|
|
|
- name: CSI_ENDPOINT
|
2019-03-18 12:20:06 +05:30
|
|
|
value: unix:///csi/csi.sock
|
2021-12-22 08:09:27 +01:00
|
|
|
- name: CSI_ADDONS_ENDPOINT
|
|
|
|
value: unix:///csi/csi-addons.sock
|
2018-01-09 13:59:50 -05:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: socket-dir
|
2019-03-18 12:20:06 +05:30
|
|
|
mountPath: /csi
|
2018-01-09 13:59:50 -05:00
|
|
|
- mountPath: /dev
|
|
|
|
name: host-dev
|
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
2020-01-23 13:59:53 +05:30
|
|
|
- mountPath: /run/mount
|
|
|
|
name: host-mount
|
2021-08-02 16:57:11 +02:00
|
|
|
- mountPath: /etc/selinux
|
|
|
|
name: etc-selinux
|
|
|
|
readOnly: true
|
2018-01-09 13:59:50 -05:00
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: lib-modules
|
|
|
|
readOnly: true
|
2019-04-22 17:35:39 -04:00
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
2020-01-29 11:44:45 +00:00
|
|
|
- name: ceph-csi-encryption-kms-config
|
|
|
|
mountPath: /etc/ceph-csi-encryption-kms-config/
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: /var/lib/kubelet/plugins
|
|
|
|
mountPropagation: "Bidirectional"
|
|
|
|
- name: mountpoint-dir
|
|
|
|
mountPath: /var/lib/kubelet/pods
|
|
|
|
mountPropagation: "Bidirectional"
|
2019-06-25 15:29:17 -04:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
mountPath: /tmp/csi/keys
|
2021-08-12 18:37:54 +05:30
|
|
|
- name: ceph-logdir
|
|
|
|
mountPath: /var/log/ceph
|
2021-08-26 10:58:02 +05:30
|
|
|
- name: ceph-config
|
|
|
|
mountPath: /etc/ceph/
|
2022-03-02 16:00:48 +05:30
|
|
|
- name: oidc-token
|
2022-03-23 11:01:25 +05:30
|
|
|
mountPath: /run/secrets/tokens
|
2022-03-02 16:00:48 +05:30
|
|
|
readOnly: true
|
2024-02-14 13:23:11 +01:00
|
|
|
- name: driver-registrar
|
|
|
|
# This is necessary only for systems with SELinux, where
|
|
|
|
# non-privileged sidecar containers cannot access unix domain socket
|
|
|
|
# created by privileged CSI driver container.
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
allowPrivilegeEscalation: true
|
2025-01-17 10:45:48 +01:00
|
|
|
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0
|
2024-02-14 13:23:11 +01:00
|
|
|
args:
|
|
|
|
- "--v=1"
|
|
|
|
- "--csi-address=/csi/csi.sock"
|
|
|
|
- "--kubelet-registration-path=/var/lib/kubelet/plugins/rbd.csi.ceph.com/csi.sock"
|
|
|
|
env:
|
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
2019-06-20 15:30:40 -04:00
|
|
|
- name: liveness-prometheus
|
2020-01-13 09:44:18 +05:30
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2022-04-12 07:45:44 +02:00
|
|
|
allowPrivilegeEscalation: true
|
2019-06-20 15:30:40 -04:00
|
|
|
image: quay.io/cephcsi/cephcsi:canary
|
|
|
|
args:
|
|
|
|
- "--type=liveness"
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2019-08-27 14:55:15 -04:00
|
|
|
- "--metricsport=8680"
|
2019-08-21 14:58:02 +05:30
|
|
|
- "--metricspath=/metrics"
|
2019-06-20 15:30:40 -04:00
|
|
|
- "--polltime=60s"
|
|
|
|
- "--timeout=3s"
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
|
|
|
value: unix:///csi/csi.sock
|
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
2018-01-09 13:59:50 -05:00
|
|
|
volumes:
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: socket-dir
|
2018-01-09 13:59:50 -05:00
|
|
|
hostPath:
|
2019-03-13 10:39:58 +05:30
|
|
|
path: /var/lib/kubelet/plugins/rbd.csi.ceph.com
|
2018-01-09 13:59:50 -05:00
|
|
|
type: DirectoryOrCreate
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: plugin-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/kubelet/plugins
|
|
|
|
type: Directory
|
|
|
|
- name: mountpoint-dir
|
2019-02-07 15:29:26 +05:30
|
|
|
hostPath:
|
2019-07-03 15:32:36 +05:30
|
|
|
path: /var/lib/kubelet/pods
|
2018-11-01 01:03:03 +00:00
|
|
|
type: DirectoryOrCreate
|
2021-08-12 18:37:54 +05:30
|
|
|
- name: ceph-logdir
|
|
|
|
hostPath:
|
|
|
|
path: /var/log/ceph
|
|
|
|
type: DirectoryOrCreate
|
2018-09-10 19:16:17 +00:00
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
2018-12-04 15:08:39 -05:00
|
|
|
path: /var/lib/kubelet/plugins_registry/
|
2018-09-10 19:16:17 +00:00
|
|
|
type: Directory
|
2018-01-09 13:59:50 -05:00
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
2021-08-02 16:57:11 +02:00
|
|
|
- name: etc-selinux
|
|
|
|
hostPath:
|
|
|
|
path: /etc/selinux
|
2020-01-23 13:59:53 +05:30
|
|
|
- name: host-mount
|
|
|
|
hostPath:
|
|
|
|
path: /run/mount
|
2018-01-09 13:59:50 -05:00
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
2018-07-18 16:48:43 +02:00
|
|
|
path: /lib/modules
|
2021-08-26 10:58:02 +05:30
|
|
|
- name: ceph-config
|
|
|
|
configMap:
|
|
|
|
name: ceph-config
|
2019-04-22 17:35:39 -04:00
|
|
|
- name: ceph-csi-config
|
|
|
|
configMap:
|
|
|
|
name: ceph-csi-config
|
2020-01-29 11:44:45 +00:00
|
|
|
- name: ceph-csi-encryption-kms-config
|
|
|
|
configMap:
|
|
|
|
name: ceph-csi-encryption-kms-config
|
2019-06-25 15:29:17 -04:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
2022-03-02 16:00:48 +05:30
|
|
|
- name: oidc-token
|
|
|
|
projected:
|
|
|
|
sources:
|
|
|
|
- serviceAccountToken:
|
|
|
|
path: oidc-token
|
|
|
|
expirationSeconds: 3600
|
|
|
|
audience: ceph-csi-kms
|
2019-06-20 15:30:40 -04:00
|
|
|
---
|
2020-03-31 11:29:29 +05:30
|
|
|
# This is a service to expose the liveness metrics
|
2019-06-20 15:30:40 -04:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2019-08-21 14:58:02 +05:30
|
|
|
name: csi-metrics-rbdplugin
|
2021-07-31 00:15:34 +07:00
|
|
|
# replace with non-default namespace name
|
|
|
|
namespace: default
|
2019-06-20 15:30:40 -04:00
|
|
|
labels:
|
2019-08-21 14:58:02 +05:30
|
|
|
app: csi-metrics
|
2019-06-20 15:30:40 -04:00
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- name: http-metrics
|
|
|
|
port: 8080
|
|
|
|
protocol: TCP
|
2019-08-27 14:55:15 -04:00
|
|
|
targetPort: 8680
|
2019-06-20 15:30:40 -04:00
|
|
|
selector:
|
|
|
|
app: csi-rbdplugin
|