2019-06-20 19:30:40 +00:00
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: csi-rbdplugin-provisioner
|
2021-07-30 17:15:34 +00:00
|
|
|
# replace with non-default namespace name
|
|
|
|
namespace: default
|
2019-06-20 19:30:40 +00:00
|
|
|
labels:
|
2019-08-21 09:28:02 +00:00
|
|
|
app: csi-metrics
|
2019-06-20 19:30:40 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: csi-rbdplugin-provisioner
|
|
|
|
ports:
|
|
|
|
- name: http-metrics
|
|
|
|
port: 8080
|
|
|
|
protocol: TCP
|
2019-08-27 18:55:15 +00:00
|
|
|
targetPort: 8680
|
|
|
|
|
2019-02-07 09:59:26 +00:00
|
|
|
---
|
2019-07-25 06:49:44 +00:00
|
|
|
kind: Deployment
|
2019-06-19 09:05:44 +00:00
|
|
|
apiVersion: apps/v1
|
2019-06-14 09:42:48 +00:00
|
|
|
metadata:
|
|
|
|
name: csi-rbdplugin-provisioner
|
2021-07-30 17:15:34 +00:00
|
|
|
# replace with non-default namespace name
|
|
|
|
namespace: default
|
2019-06-14 09:42:48 +00:00
|
|
|
spec:
|
2019-07-25 06:49:44 +00:00
|
|
|
replicas: 3
|
2019-06-19 09:05:44 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: csi-rbdplugin-provisioner
|
2018-07-18 14:48:43 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-rbdplugin-provisioner
|
|
|
|
spec:
|
2020-09-20 00:43:26 +00:00
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- csi-rbdplugin-provisioner
|
|
|
|
topologyKey: "kubernetes.io/hostname"
|
2021-04-05 11:43:45 +00:00
|
|
|
serviceAccountName: rbd-csi-provisioner
|
2020-05-05 08:28:39 +00:00
|
|
|
priorityClassName: system-cluster-critical
|
2018-07-18 14:48:43 +00:00
|
|
|
containers:
|
|
|
|
- name: csi-provisioner
|
2022-01-13 11:50:08 +00:00
|
|
|
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0
|
2018-07-18 14:48:43 +00:00
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
- "--v=5"
|
2019-10-07 05:10:39 +00:00
|
|
|
- "--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 16:43:28 +00:00
|
|
|
- "--retry-interval-start=500ms"
|
2020-09-30 04:58:08 +00:00
|
|
|
- "--leader-election=true"
|
2020-12-08 10:34:54 +00:00
|
|
|
# set it to true to use topology based provisioning
|
|
|
|
- "--feature-gates=Topology=false"
|
2020-12-08 10:49:39 +00:00
|
|
|
# if fstype is not specified in storageclass, ext4 is default
|
|
|
|
- "--default-fstype=ext4"
|
2020-10-22 05:07:05 +00:00
|
|
|
- "--extra-create-metadata=true"
|
2018-07-18 14:48:43 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2019-03-18 06:50:06 +00:00
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2018-07-18 14:48:43 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-03-18 06:50:06 +00:00
|
|
|
mountPath: /csi
|
2019-01-25 19:10:20 +00:00
|
|
|
- name: csi-snapshotter
|
2022-01-17 12:58:38 +00:00
|
|
|
image: k8s.gcr.io/sig-storage/csi-snapshotter:v5.0.1
|
2019-01-25 19:10:20 +00:00
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
- "--v=5"
|
2019-10-07 05:10:39 +00:00
|
|
|
- "--timeout=150s"
|
2019-12-17 11:20:37 +00:00
|
|
|
- "--leader-election=true"
|
2019-01-25 19:10:20 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2019-03-18 06:50:06 +00:00
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2020-05-12 12:16:06 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
2019-01-25 19:10:20 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-03-18 06:50:06 +00:00
|
|
|
mountPath: /csi
|
2019-03-27 06:03:09 +00:00
|
|
|
- name: csi-attacher
|
2022-01-13 11:55:18 +00:00
|
|
|
image: k8s.gcr.io/sig-storage/csi-attacher:v3.4.0
|
2019-03-27 04:59:40 +00:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
2019-07-25 06:49:44 +00:00
|
|
|
- "--leader-election=true"
|
2020-05-22 06:23:58 +00:00
|
|
|
- "--retry-interval-start=500ms"
|
2019-03-27 04:59:40 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2019-03-28 09:45:02 +00:00
|
|
|
value: /csi/csi-provisioner.sock
|
2019-03-27 04:59:40 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
2019-11-27 12:15:27 +00:00
|
|
|
- name: csi-resizer
|
2022-01-24 05:37:46 +00:00
|
|
|
image: k8s.gcr.io/sig-storage/csi-resizer:v1.4.0
|
2019-11-27 12:15:27 +00:00
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
- "--v=5"
|
2020-09-30 04:58:08 +00:00
|
|
|
- "--timeout=150s"
|
2019-11-27 12:15:27 +00:00
|
|
|
- "--leader-election"
|
2020-05-22 06:23:58 +00:00
|
|
|
- "--retry-interval-start=500ms"
|
2020-09-30 04:58:08 +00:00
|
|
|
- "--handle-volume-inuse-error=false"
|
2019-11-27 12:15:27 +00:00
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: unix:///csi/csi-provisioner.sock
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
2019-01-23 15:05:15 +00:00
|
|
|
- name: csi-rbdplugin
|
2022-04-04 08:47:14 +00:00
|
|
|
# for stable functionality replace canary with latest release version
|
2022-04-22 13:45:57 +00:00
|
|
|
image: quay.io/cephcsi/cephcsi:v3.6-canary
|
2019-02-07 09:59:26 +00:00
|
|
|
args:
|
2019-01-23 15:05:15 +00:00
|
|
|
- "--nodeid=$(NODE_ID)"
|
2019-05-24 11:03:33 +00:00
|
|
|
- "--type=rbd"
|
2019-08-14 06:42:17 +00:00
|
|
|
- "--controllerserver=true"
|
2019-01-23 15:05:15 +00:00
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2021-12-22 07:09:27 +00:00
|
|
|
- "--csi-addons-endpoint=$(CSI_ADDONS_ENDPOINT)"
|
2019-01-23 15:05:15 +00:00
|
|
|
- "--v=5"
|
2019-03-13 05:09:58 +00:00
|
|
|
- "--drivername=rbd.csi.ceph.com"
|
2019-07-26 12:36:43 +00:00
|
|
|
- "--pidlimit=-1"
|
2020-06-24 06:44:02 +00:00
|
|
|
- "--rbdhardmaxclonedepth=8"
|
|
|
|
- "--rbdsoftmaxclonedepth=4"
|
2021-03-25 11:14:46 +00:00
|
|
|
- "--enableprofiling=false"
|
2019-01-23 15:05:15 +00:00
|
|
|
env:
|
2019-08-21 09:28:02 +00:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2019-01-23 15:05:15 +00:00
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2021-07-30 17:15:34 +00:00
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2020-12-15 10:07:28 +00:00
|
|
|
# - name: KMS_CONFIGMAP_NAME
|
|
|
|
# value: encryptionConfig
|
2019-01-23 15:05:15 +00:00
|
|
|
- name: CSI_ENDPOINT
|
2019-03-18 06:50:06 +00:00
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2021-12-22 07:09:27 +00:00
|
|
|
- name: CSI_ADDONS_ENDPOINT
|
|
|
|
value: unix:///csi/csi-addons.sock
|
2019-01-23 15:05:15 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-03-18 06:50:06 +00:00
|
|
|
mountPath: /csi
|
2019-01-23 15:05:15 +00:00
|
|
|
- mountPath: /dev
|
|
|
|
name: host-dev
|
|
|
|
- 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/
|
2020-01-29 11:44:45 +00:00
|
|
|
- name: ceph-csi-encryption-kms-config
|
|
|
|
mountPath: /etc/ceph-csi-encryption-kms-config/
|
2019-06-25 19:29:17 +00:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
mountPath: /tmp/csi/keys
|
2021-08-26 05:28:02 +00:00
|
|
|
- name: ceph-config
|
|
|
|
mountPath: /etc/ceph/
|
2022-03-02 10:30:48 +00:00
|
|
|
- name: oidc-token
|
2022-03-23 05:31:25 +00:00
|
|
|
mountPath: /run/secrets/tokens
|
2022-03-02 10:30:48 +00:00
|
|
|
readOnly: true
|
2020-11-17 06:25:30 +00:00
|
|
|
- name: csi-rbdplugin-controller
|
2022-04-04 08:47:14 +00:00
|
|
|
# for stable functionality replace canary with latest release version
|
2022-04-22 13:45:57 +00:00
|
|
|
image: quay.io/cephcsi/cephcsi:v3.6-canary
|
2020-11-17 06:25:30 +00:00
|
|
|
args:
|
|
|
|
- "--type=controller"
|
|
|
|
- "--v=5"
|
|
|
|
- "--drivername=rbd.csi.ceph.com"
|
|
|
|
- "--drivernamespace=$(DRIVER_NAMESPACE)"
|
|
|
|
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 05:28:02 +00:00
|
|
|
- name: ceph-config
|
|
|
|
mountPath: /etc/ceph/
|
2019-06-20 19:30:40 +00:00
|
|
|
- name: liveness-prometheus
|
2022-04-22 13:45:57 +00:00
|
|
|
image: quay.io/cephcsi/cephcsi:v3.6-canary
|
2019-06-20 19:30:40 +00:00
|
|
|
args:
|
|
|
|
- "--type=liveness"
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2019-08-27 18:55:15 +00:00
|
|
|
- "--metricsport=8680"
|
2019-08-21 09:28:02 +00:00
|
|
|
- "--metricspath=/metrics"
|
2019-06-20 19:30:40 +00:00
|
|
|
- "--polltime=60s"
|
|
|
|
- "--timeout=3s"
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
2019-09-17 10:30:16 +00:00
|
|
|
value: unix:///csi/csi-provisioner.sock
|
2019-06-20 19:30:40 +00:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
2018-07-18 14:48:43 +00:00
|
|
|
volumes:
|
2019-01-23 15:05:15 +00:00
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
2019-02-07 09:59:26 +00:00
|
|
|
path: /lib/modules
|
2018-07-18 14:48:43 +00:00
|
|
|
- name: socket-dir
|
2020-01-13 04:05:50 +00:00
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
2021-08-26 05:28:02 +00:00
|
|
|
- name: ceph-config
|
|
|
|
configMap:
|
|
|
|
name: ceph-config
|
2019-04-22 21:35:39 +00: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 19:29:17 +00:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
2022-03-02 10:30:48 +00:00
|
|
|
- name: oidc-token
|
|
|
|
projected:
|
|
|
|
sources:
|
|
|
|
- serviceAccountToken:
|
|
|
|
path: oidc-token
|
|
|
|
expirationSeconds: 3600
|
|
|
|
audience: ceph-csi-kms
|