Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controllers: fix issues found in recent testing #82

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/rbac/csi_cephfs_ctrlplugin_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ subjects:
namespace: system
roleRef:
kind: Role
name: csi-cephfs-ctrlplugin-role
name: csi-cephfs-ctrlplugin-r
apiGroup: rbac.authorization.k8s.io
2 changes: 1 addition & 1 deletion config/rbac/csi_rbd_ctrlplugin_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ subjects:
namespace: system
roleRef:
kind: Role
name: csi-rbd-ctrlplugin-role
name: csi-rbd-ctrlplugin-r
apiGroup: rbac.authorization.k8s.io
2 changes: 1 addition & 1 deletion config/rbac/csi_rbd_nodeplugin_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ subjects:
namespace: system
roleRef:
kind: Role
name: csi-rbd-nodeplugin-role
name: csi-rbd-nodeplugin-r
apiGroup: rbac.authorization.k8s.io
8 changes: 6 additions & 2 deletions internal/controller/driver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,15 @@ func (r *driverReconcile) reconcileK8sCsiDriver() error {
)
desiredCsiDriver.Spec.FSGroupPolicy = ptr.To(
cmp.Or(
r.driver.Spec.FsGroupPolicy,
r.driver.Spec.FsGroupPolicy,
storagev1.FileFSGroupPolicy,
),
)
if nodePlugin := r.driver.Spec.NodePlugin; nodePlugin != nil {
desiredCsiDriver.Spec.SELinuxMount = nodePlugin.EnableSeLinuxHostMount
desiredCsiDriver.Spec.SELinuxMount = cmp.Or(
nodePlugin.EnableSeLinuxHostMount,
desiredCsiDriver.Spec.SELinuxMount,
)
}

ownerObjKey := client.ObjectKeyFromObject(&r.driver)
Expand Down Expand Up @@ -828,6 +830,7 @@ func (r *driverReconcile) reconcileNodePluginDeamonSet() error {
utils.LibModulesVolumeMount,
utils.KeysTmpDirVolumeMount,
utils.PluginDirVolumeMount,
utils.CsiConfigVolumeMount,
utils.PluginMountDirVolumeMount(kubeletDirPath),
utils.PodsMountDirVolumeMount(kubeletDirPath),
}
Expand Down Expand Up @@ -965,6 +968,7 @@ func (r *driverReconcile) reconcileNodePluginDeamonSet() error {
utils.HostRunMountVolume,
utils.LibModulesVolume,
utils.KeysTmpDirVolume,
utils.CsiConfigVolume,
utils.PluginDirVolume(kubeletDirPath, r.driver.Name),
utils.PluginMountDirVolume(kubeletDirPath),
utils.PodsMountDirVolume(kubeletDirPath),
Expand Down
4 changes: 3 additions & 1 deletion internal/utils/csi.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ var PoolTimeContainerArg = "--polltime=60s"
var ExtraCreateMetadataContainerArg = "--extra-create-metadata=true"
var PreventVolumeModeConversionContainerArg = "--prevent-volume-mode-conversion=true"
var HonorPVReclaimPolicyContainerArg = "--feature-gates=HonorPVReclaimPolicy=true"
var TopologyContainerArg = "--feature-gates=Topology=true"

nb-ohad marked this conversation as resolved.
Show resolved Hide resolved
// TODO: the value for this field should be based on "domainlabels" in RBD nodeplugin, so "false" here is temporary.
var TopologyContainerArg = "--feature-gates=Topology=false"
Madhu-1 marked this conversation as resolved.
Show resolved Hide resolved
var RecoverVolumeExpansionFailureContainerArg = "--feature-gates=RecoverVolumeExpansionFailure=true"
var EnableVolumeGroupSnapshotsContainerArg = "--enable-volume-group-snapshots=true"
var ForceCephKernelClientContainerArg = "--forcecephkernelclient=true"
Expand Down
Loading