Skip to content

Commit

Permalink
csi: remove attacher sidecar from CephFS rook deployment
Browse files Browse the repository at this point in the history
CephFS CSI driver dont have/advertise controller publish/unpublish
capabilities, thus dont need attacher sidecar for its operations.
The presence of external-attacher adds on overhead and issues wrt
attachment in various scenarios. One of them would be the lack of
performance on syncing volumeattachment from api server..etc.
More or less we don't have controller publish and unpublish capabilities,
so we should not make use of this sidecar and cause
unnecessary addon here thus other issues.

similar changes have been added to CSI
ceph/ceph-csi#3149

Signed-off-by: yati1998 <ypadia@redhat.com>
  • Loading branch information
yati1998 committed Aug 2, 2022
1 parent e78714c commit 6323322
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 58 deletions.
4 changes: 2 additions & 2 deletions Documentation/Getting-Started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ If you did not modify the `cluster.yaml` above, it is expected that one OSD will
```console
$ kubectl -n rook-ceph get pod
NAME READY STATUS RESTARTS AGE
csi-cephfsplugin-provisioner-d77bb49c6-n5tgs 5/5 Running 0 140s
csi-cephfsplugin-provisioner-d77bb49c6-v9rvn 5/5 Running 0 140s
csi-cephfsplugin-provisioner-d77bb49c6-n5tgs 4/4 Running 0 140s
csi-cephfsplugin-provisioner-d77bb49c6-v9rvn 4/4 Running 0 140s
csi-cephfsplugin-rthrp 3/3 Running 0 140s
csi-rbdplugin-hbsm7 3/3 Running 0 140s
csi-rbdplugin-provisioner-5b5cd64fd-nvk6c 6/6 Running 0 140s
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Troubleshooting/ceph-csi-common-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Restarting the `csi-xxxxplugin-xxx` pod on the node may help.

## Volume Attachment

Each provisioner pod also has a sidecar container called `csi-attacher`.
Each RBD provisioner pod also has a sidecar container called `csi-attacher`.

### csi-attacher

Expand Down
6 changes: 0 additions & 6 deletions deploy/charts/rook-ceph/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,6 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments/status"]
verbs: ["patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["patch"]
Expand Down
8 changes: 0 additions & 8 deletions deploy/charts/rook-ceph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,6 @@ csi:
limits:
memory: 256Mi
cpu: 200m
- name : csi-attacher
resource:
requests:
memory: 128Mi
cpu: 100m
limits:
memory: 256Mi
cpu: 200m
- name : csi-snapshotter
resource:
requests:
Expand Down
6 changes: 0 additions & 6 deletions deploy/examples/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments/status"]
verbs: ["patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["patch"]
Expand Down
8 changes: 0 additions & 8 deletions deploy/examples/operator-openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,6 @@ data:
# limits:
# memory: 256Mi
# cpu: 200m
# - name : csi-attacher
# resource:
# requests:
# memory: 128Mi
# cpu: 100m
# limits:
# memory: 256Mi
# cpu: 200m
# - name : csi-snapshotter
# resource:
# requests:
Expand Down
8 changes: 0 additions & 8 deletions deploy/examples/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,6 @@ data:
# limits:
# memory: 256Mi
# cpu: 200m
# - name : csi-attacher
# resource:
# requests:
# memory: 128Mi
# cpu: 100m
# limits:
# memory: 256Mi
# cpu: 200m
# - name : csi-snapshotter
# resource:
# requests:
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/ceph/csi/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ func (r *ReconcileCSI) startDrivers(ver *version.Info, ownerInfo *k8sutil.OwnerI
}
}
if EnableCephFS {
err = csiDriverobj.createCSIDriverInfo(r.opManagerContext, r.context.Clientset, CephFSDriverName, k8sutil.GetValue(r.opConfig.Parameters, "CSI_CEPHFS_FSGROUPPOLICY", string(k8scsi.ReadWriteOnceWithFSTypeFSGroupPolicy)), true)
err = csiDriverobj.createCSIDriverInfo(r.opManagerContext, r.context.Clientset, CephFSDriverName, k8sutil.GetValue(r.opConfig.Parameters, "CSI_CEPHFS_FSGROUPPOLICY", string(k8scsi.ReadWriteOnceWithFSTypeFSGroupPolicy)), false)
if err != nil {
return errors.Wrapf(err, "failed to create CSI driver object for %q", CephFSDriverName)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,6 @@ spec:
priorityClassName: {{ .ProvisionerPriorityClassName }}
{{ end }}
containers:
- name: csi-attacher
image: {{ .AttacherImage }}
args:
- "--v={{ .LogLevel }}"
- "--csi-address=$(ADDRESS)"
- "--leader-election=true"
- "--timeout={{ .GRPCTimeout }}"
- "--leader-election-namespace={{ .Namespace }}"
- "--leader-election-lease-duration=137s"
- "--leader-election-renew-deadline=107s"
- "--leader-election-retry-period=26s"
env:
- name: ADDRESS
value: /csi/csi-provisioner.sock
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /csi
{{ if .EnableCephFSSnapshotter }}
- name: csi-snapshotter
image: {{ .SnapshotterImage }}
Expand Down

0 comments on commit 6323322

Please sign in to comment.