2019-06-20 15:30:40 -04:00
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: csi-rbdplugin-provisioner
|
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:
|
|
|
|
selector:
|
|
|
|
app: csi-rbdplugin-provisioner
|
|
|
|
ports:
|
|
|
|
- name: http-metrics
|
|
|
|
port: 8080
|
|
|
|
protocol: TCP
|
2019-08-27 14:55:15 -04:00
|
|
|
targetPort: 8680
|
|
|
|
|
2019-02-07 15:29:26 +05:30
|
|
|
---
|
2019-07-25 12:19:44 +05:30
|
|
|
kind: Deployment
|
2019-06-19 14:35:44 +05:30
|
|
|
apiVersion: apps/v1
|
2019-06-14 15:12:48 +05:30
|
|
|
metadata:
|
|
|
|
name: csi-rbdplugin-provisioner
|
2021-07-31 00:15:34 +07:00
|
|
|
# replace with non-default namespace name
|
|
|
|
namespace: default
|
2019-06-14 15:12:48 +05:30
|
|
|
spec:
|
2019-07-25 12:19:44 +05:30
|
|
|
replicas: 3
|
2019-06-19 14:35:44 +05:30
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: csi-rbdplugin-provisioner
|
2018-07-18 16:48:43 +02:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-rbdplugin-provisioner
|
|
|
|
spec:
|
2020-09-20 02:43:26 +02:00
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- csi-rbdplugin-provisioner
|
|
|
|
topologyKey: "kubernetes.io/hostname"
|
2021-04-05 17:13:45 +05:30
|
|
|
serviceAccountName: rbd-csi-provisioner
|
2020-05-05 13:58:39 +05:30
|
|
|
priorityClassName: system-cluster-critical
|
2018-07-18 16:48:43 +02:00
|
|
|
containers:
|
2024-02-14 13:23:11 +01:00
|
|
|
- name: csi-rbdplugin
|
2025-04-10 15:41:01 +05:30
|
|
|
image: quay.io/cephcsi/cephcsi:v3.14.0
|
2024-02-14 13:23:11 +01:00
|
|
|
args:
|
|
|
|
- "--nodeid=$(NODE_ID)"
|
|
|
|
- "--type=rbd"
|
|
|
|
- "--controllerserver=true"
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
|
|
- "--csi-addons-endpoint=$(CSI_ADDONS_ENDPOINT)"
|
|
|
|
- "--v=5"
|
|
|
|
- "--drivername=rbd.csi.ceph.com"
|
|
|
|
- "--pidlimit=-1"
|
|
|
|
- "--rbdhardmaxclonedepth=8"
|
|
|
|
- "--rbdsoftmaxclonedepth=4"
|
|
|
|
- "--enableprofiling=false"
|
|
|
|
- "--setmetadata=true"
|
|
|
|
env:
|
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
# - name: KMS_CONFIGMAP_NAME
|
|
|
|
# value: encryptionConfig
|
|
|
|
- name: CSI_ENDPOINT
|
|
|
|
value: unix:///csi/csi-provisioner.sock
|
|
|
|
- name: CSI_ADDONS_ENDPOINT
|
|
|
|
value: unix:///csi/csi-addons.sock
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- mountPath: /dev
|
|
|
|
name: host-dev
|
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: lib-modules
|
|
|
|
readOnly: true
|
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
|
|
|
- name: ceph-csi-encryption-kms-config
|
|
|
|
mountPath: /etc/ceph-csi-encryption-kms-config/
|
|
|
|
- name: keys-tmp-dir
|
|
|
|
mountPath: /tmp/csi/keys
|
|
|
|
- name: ceph-config
|
|
|
|
mountPath: /etc/ceph/
|
|
|
|
- name: oidc-token
|
|
|
|
mountPath: /run/secrets/tokens
|
|
|
|
readOnly: true
|
2018-07-18 16:48:43 +02:00
|
|
|
- name: csi-provisioner
|
2025-01-17 10:45:48 +01:00
|
|
|
image: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0
|
2018-07-18 16:48:43 +02:00
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
2022-07-26 10:22:19 +05:30
|
|
|
- "--v=1"
|
2019-10-07 10:40:39 +05:30
|
|
|
- "--timeout=150s"
|
Move locks to more granular locking than CPU count based
As detailed in issue #279, current lock scheme has hash
buckets that are count of CPUs. This causes a lot of contention
when parallel requests are made to the CSI plugin. To reduce
lock contention, this commit introduces granular locks per
identifier.
The commit also changes the timeout for gRPC requests to Create
and Delete volumes, as the current timeout is 10s (kubernetes
documentation says 15s but code defaults are 10s). A virtual
setup takes about 12-15s to complete a request at times, that leads
to unwanted retries of the same request, hence the increased
timeout to enable operation completion with minimal retries.
Tests to create PVCs before and after these changes look like so,
Before:
Default master code + sidecar provisioner --timeout option set
to 30 seconds
20 PVCs
Creation: 3 runs, 396/391/400 seconds
Deletion: 3 runs, 218/271/118 seconds
- Once was stalled for more than 8 minutes and cancelled the run
After:
Current commit + sidecar provisioner --timeout option set to 30 sec
20 PVCs
Creation: 3 runs, 42/59/65 seconds
Deletion: 3 runs, 32/32/31 seconds
Fixes: #279
Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-06-22 12:43:28 -04:00
|
|
|
- "--retry-interval-start=500ms"
|
2020-09-30 10:28:08 +05:30
|
|
|
- "--leader-election=true"
|
2022-06-15 12:44:49 +05:30
|
|
|
- "--feature-gates=HonorPVReclaimPolicy=true"
|
|
|
|
- "--prevent-volume-mode-conversion=true"
|
2020-12-08 16:19:39 +05:30
|
|
|
# if fstype is not specified in storageclass, ext4 is default
|
|
|
|
- "--default-fstype=ext4"
|
2020-10-22 10:37:05 +05:30
|
|
|
- "--extra-create-metadata=true"
|
2024-08-20 18:14:00 +05:30
|
|
|
- "--immediate-topology=false"
|
2024-10-04 12:23:33 +05:30
|
|
|
- "--http-endpoint=$(POD_IP):8090"
|
2018-07-18 16:48:43 +02:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2019-03-18 12:20:06 +05:30
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2024-10-04 12:23:33 +05:30
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2018-07-18 16:48:43 +02:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
2024-10-04 12:23:33 +05:30
|
|
|
ports:
|
|
|
|
- containerPort: 8090
|
|
|
|
name: http-endpoint
|
|
|
|
protocol: TCP
|
2018-07-18 16:48:43 +02:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-03-18 12:20:06 +05:30
|
|
|
mountPath: /csi
|
2019-01-26 00:40:20 +05:30
|
|
|
- name: csi-snapshotter
|
2024-12-12 13:22:59 +01:00
|
|
|
image: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.0
|
2019-01-26 00:40:20 +05:30
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
2022-07-26 10:22:19 +05:30
|
|
|
- "--v=1"
|
2019-10-07 10:40:39 +05:30
|
|
|
- "--timeout=150s"
|
2019-12-17 16:50:37 +05:30
|
|
|
- "--leader-election=true"
|
2022-03-04 11:05:42 +05:30
|
|
|
- "--extra-create-metadata=true"
|
2024-12-12 13:22:59 +01:00
|
|
|
- "--feature-gates=CSIVolumeGroupSnapshot=true"
|
2024-10-04 12:23:33 +05:30
|
|
|
- "--http-endpoint=$(POD_IP):8092"
|
2019-01-26 00:40:20 +05:30
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2019-03-18 12:20:06 +05:30
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2024-10-04 12:23:33 +05:30
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2020-05-12 17:46:06 +05:30
|
|
|
imagePullPolicy: "IfNotPresent"
|
2024-10-04 12:23:33 +05:30
|
|
|
ports:
|
|
|
|
- containerPort: 8092
|
|
|
|
name: http-endpoint
|
|
|
|
protocol: TCP
|
2019-01-26 00:40:20 +05:30
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-03-18 12:20:06 +05:30
|
|
|
mountPath: /csi
|
2019-03-27 11:33:09 +05:30
|
|
|
- name: csi-attacher
|
2025-01-17 10:45:48 +01:00
|
|
|
image: registry.k8s.io/sig-storage/csi-attacher:v4.8.0
|
2019-03-27 10:29:40 +05:30
|
|
|
args:
|
2022-07-26 10:22:19 +05:30
|
|
|
- "--v=1"
|
2019-03-27 10:29:40 +05:30
|
|
|
- "--csi-address=$(ADDRESS)"
|
2019-07-25 12:19:44 +05:30
|
|
|
- "--leader-election=true"
|
2020-05-22 11:53:58 +05:30
|
|
|
- "--retry-interval-start=500ms"
|
2022-09-20 16:07:14 +05:30
|
|
|
- "--default-fstype=ext4"
|
2024-10-04 12:23:33 +05:30
|
|
|
- "--http-endpoint=$(POD_IP):8093"
|
2019-03-27 10:29:40 +05:30
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2019-03-28 15:15:02 +05:30
|
|
|
value: /csi/csi-provisioner.sock
|
2024-10-04 12:23:33 +05:30
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2019-03-27 10:29:40 +05:30
|
|
|
imagePullPolicy: "IfNotPresent"
|
2024-10-04 12:23:33 +05:30
|
|
|
ports:
|
|
|
|
- containerPort: 8093
|
|
|
|
name: http-endpoint
|
|
|
|
protocol: TCP
|
2019-03-27 10:29:40 +05:30
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
2019-11-27 17:45:27 +05:30
|
|
|
- name: csi-resizer
|
2025-01-10 13:43:49 +01:00
|
|
|
image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1
|
2019-11-27 17:45:27 +05:30
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
2022-07-26 10:22:19 +05:30
|
|
|
- "--v=1"
|
2020-09-30 10:28:08 +05:30
|
|
|
- "--timeout=150s"
|
2019-11-27 17:45:27 +05:30
|
|
|
- "--leader-election"
|
2020-05-22 11:53:58 +05:30
|
|
|
- "--retry-interval-start=500ms"
|
2020-09-30 10:28:08 +05:30
|
|
|
- "--handle-volume-inuse-error=false"
|
2022-05-04 11:49:19 +05:30
|
|
|
- "--feature-gates=RecoverVolumeExpansionFailure=true"
|
2024-10-04 12:23:33 +05:30
|
|
|
- "--http-endpoint=$(POD_IP):8091"
|
2019-11-27 17:45:27 +05:30
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2024-10-04 12:23:33 +05:30
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2019-11-27 17:45:27 +05:30
|
|
|
imagePullPolicy: "IfNotPresent"
|
2024-10-04 12:23:33 +05:30
|
|
|
ports:
|
|
|
|
- containerPort: 8091
|
|
|
|
name: http-endpoint
|
|
|
|
protocol: TCP
|
2019-11-27 17:45:27 +05:30
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
2020-11-17 11:55:30 +05:30
|
|
|
- name: csi-rbdplugin-controller
|
2025-04-10 15:41:01 +05:30
|
|
|
image: quay.io/cephcsi/cephcsi:v3.14.0
|
2020-11-17 11:55:30 +05:30
|
|
|
args:
|
|
|
|
- "--type=controller"
|
|
|
|
- "--v=5"
|
|
|
|
- "--drivername=rbd.csi.ceph.com"
|
|
|
|
- "--drivernamespace=$(DRIVER_NAMESPACE)"
|
2022-02-22 11:29:11 +05:30
|
|
|
- "--setmetadata=true"
|
2020-11-17 11:55:30 +05:30
|
|
|
env:
|
|
|
|
- name: DRIVER_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
|
|
|
- name: keys-tmp-dir
|
|
|
|
mountPath: /tmp/csi/keys
|
2021-08-26 10:58:02 +05:30
|
|
|
- name: ceph-config
|
|
|
|
mountPath: /etc/ceph/
|
2019-06-20 15:30:40 -04:00
|
|
|
- name: liveness-prometheus
|
2025-04-10 15:41:01 +05:30
|
|
|
image: quay.io/cephcsi/cephcsi:v3.14.0
|
2019-06-20 15:30:40 -04:00
|
|
|
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
|
2019-09-17 16:00:16 +05:30
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2019-06-20 15:30:40 -04:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2024-10-04 12:23:33 +05:30
|
|
|
ports:
|
|
|
|
- containerPort: 8680
|
|
|
|
name: http-metrics
|
|
|
|
protocol: TCP
|
2019-06-20 15:30:40 -04:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
2018-07-18 16:48:43 +02:00
|
|
|
volumes:
|
2019-01-23 10:05:15 -05:00
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
2019-02-07 15:29:26 +05:30
|
|
|
path: /lib/modules
|
2018-07-18 16:48:43 +02:00
|
|
|
- name: socket-dir
|
2020-01-13 09:35:50 +05:30
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
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
|