Skip to content

Commit 7307422

Browse files
authored
Merge pull request #368 from iPraveenParihar/cephfs/csiaddons-daemonset
cephfs: deploy csi-addons daemonset
2 parents 2a39c44 + a6080a5 commit 7307422

File tree

6 files changed

+28
-7
lines changed

6 files changed

+28
-7
lines changed

config/csi-rbac/cephfs_nodeplugin_cluster_role.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ rules:
2626
- apiGroups: [""]
2727
resources: ["persistentvolumes", "persistentvolumeclaims"]
2828
verbs: ["get"]
29+
- apiGroups: ["authentication.k8s.io"]
30+
resources: ["tokenreviews"]
31+
verbs: ["create"]

deploy/all-in-one/install.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29768,6 +29768,12 @@ rules:
2976829768
- persistentvolumeclaims
2976929769
verbs:
2977029770
- get
29771+
- apiGroups:
29772+
- authentication.k8s.io
29773+
resources:
29774+
- tokenreviews
29775+
verbs:
29776+
- create
2977129777
---
2977229778
apiVersion: rbac.authorization.k8s.io/v1
2977329779
kind: ClusterRole

deploy/charts/ceph-csi-drivers/templates/cephfs-nodeplugin-cr-rbac.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,10 @@ rules:
5656
- persistentvolumeclaims
5757
verbs:
5858
- get
59+
- apiGroups:
60+
- authentication.k8s.io
61+
resources:
62+
- tokenreviews
63+
verbs:
64+
- create
5965
{{- end }}

deploy/charts/ceph-csi-operator/templates/cephfs-nodeplugin-cr-rbac.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@ rules:
5454
- persistentvolumeclaims
5555
verbs:
5656
- get
57+
- apiGroups:
58+
- authentication.k8s.io
59+
resources:
60+
- tokenreviews
61+
verbs:
62+
- create

deploy/multifile/csi-rbac.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,12 @@ rules:
455455
- persistentvolumeclaims
456456
verbs:
457457
- get
458+
- apiGroups:
459+
- authentication.k8s.io
460+
resources:
461+
- tokenreviews
462+
verbs:
463+
- create
458464
---
459465
apiVersion: rbac.authorization.k8s.io/v1
460466
kind: ClusterRole

internal/controller/driver_controller.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,13 +1043,9 @@ func (r *driverReconcile) reconcileNodePluginDaemonSetForCsiAddons() error {
10431043

10441044
log := r.log.WithValues("csiAddonsDaemonSetName", daemonSet.Name)
10451045

1046-
withCsiAddonsDaemonSet := false
1046+
withCsiAddonsDaemonSet := ptr.Deref(r.driver.Spec.DeployCsiAddons, false)
10471047
withCsiAddonsVolumeCondition := false
10481048

1049-
if r.isRbdDriver() {
1050-
withCsiAddonsDaemonSet = ptr.Deref(r.driver.Spec.DeployCsiAddons, false)
1051-
}
1052-
10531049
// check if the driver wants CSI-Addons features
10541050
if feature := r.driver.GetAnnotations()[driverCSIAddonsFeatureVolumeCondition]; feature != "" {
10551051
enabled, err := strconv.ParseBool(feature)
@@ -1066,8 +1062,6 @@ func (r *driverReconcile) reconcileNodePluginDaemonSetForCsiAddons() error {
10661062
}
10671063

10681064
withCsiAddonsVolumeCondition = enabled
1069-
// if the feature is enabled, enable the daemonset too
1070-
withCsiAddonsDaemonSet = withCsiAddonsDaemonSet || withCsiAddonsVolumeCondition
10711065
}
10721066

10731067
if r.isNfsDriver() {

0 commit comments

Comments
 (0)