Merge pull request #16262 from rook/mergify/bp/release-1.17/pr-16244

csi: add CrossNamespaceVolumeDataSource feature gate (backport #16244)
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-08-07 12:25:01 -06:00
commit f37ebcd0cd
11 files changed
+28

No files matched your search

@@ -61,6 +61,7 @@ The following table lists the configurable parameters of the rook-operator chart
| `csi.cephfsLivenessMetricsPort` | CSI CephFS driver metrics port | `9081` |
| `csi.cephfsPodLabels` | Labels to add to the CSI CephFS Deployments and DaemonSets Pods | `nil` |
| `csi.clusterName` | Cluster name identifier to set as metadata on the CephFS subvolume and RBD images. This will be useful in cases like for example, when two container orchestrator clusters (Kubernetes/OCP) are using a single ceph cluster | `nil` |
| `csi.crossNamespaceVolumeDataSource.enabled` | Enable cross namespace volume data source provisioning | `false` |
| `csi.csiAddons.enabled` | Enable CSIAddons | `false` |
| `csi.csiAddons.repository` | CSIAddons sidecar image repository | `"quay.io/csiaddons/k8s-sidecar"` |
| `csi.csiAddons.tag` | CSIAddons sidecar image tag | `"v0.12.0"` |
@@ -664,6 +664,9 @@ rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["gateway.networking.k8s.io"]
resources: ["referencegrants"]
verbs: ["get", "list", "watch"]
- apiGroups: ["replication.storage.openshift.io"]
resources: ["volumegroupreplicationcontents"]
verbs: ["get", "list", "watch"]
@@ -130,6 +130,9 @@ data:
ROOK_CSIADDONS_IMAGE: "{{ .Values.csi.csiAddons.repository }}:{{ .Values.csi.csiAddons.tag }}"
{{- end }}
{{- end }}
{{- if .Values.csi.crossNamespaceVolumeDataSource }}
CSI_ENABLE_CROSS_NAMESPACE_VOLUME_DATA_SOURCE: {{ .Values.csi.crossNamespaceVolumeDataSource.enabled | quote }}
{{- end }}
{{- if .Values.csi.topology }}
CSI_ENABLE_TOPOLOGY: {{ .Values.csi.topology.enabled | quote }}
{{- if .Values.csi.topology.domainLabels }}
+4
View File
@@ -557,6 +557,10 @@ csi:
# - topology.kubernetes.io/zone
# - topology.rook.io/rack
crossNamespaceVolumeDataSource:
# -- Enable cross namespace volume data source provisioning
enabled: false
# -- Whether to skip any attach operation altogether for CephFS PVCs. See more details
# [here](https://kubernetes-csi.github.io/docs/skip-attach.html#skip-attach-with-csi-driver-object).
# If cephFSAttachRequired is set to false it skips the volume attachments and makes the creation
+3
View File
@@ -222,6 +222,9 @@ rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["gateway.networking.k8s.io"]
resources: ["referencegrants"]
verbs: ["get", "list", "watch"]
- apiGroups: ["replication.storage.openshift.io"]
resources: ["volumegroupreplicationcontents"]
verbs: ["get", "list", "watch"]
+3
View File
@@ -572,6 +572,9 @@ data:
# updated with node labels that define domains of interest
# CSI_TOPOLOGY_DOMAIN_LABELS: "kubernetes.io/hostname,topology.kubernetes.io/zone,topology.rook.io/rack"
# Enable cross namespace volume data source provisioning.
CSI_ENABLE_CROSS_NAMESPACE_VOLUME_DATA_SOURCE: "false"
# Whether to skip any attach operation altogether for CephCSI PVCs.
# See more details [here](https://kubernetes-csi.github.io/docs/skip-attach.html#skip-attach-with-csi-driver-object).
# If set to false it skips the volume attachments and makes the creation of pods using the CephCSI PVC fast.
+3
View File
@@ -523,6 +523,9 @@ data:
# updated with node labels that define domains of interest
# CSI_TOPOLOGY_DOMAIN_LABELS: "kubernetes.io/hostname,topology.kubernetes.io/zone,topology.rook.io/rack"
# Enable cross namespace volume data source provisioning.
CSI_ENABLE_CROSS_NAMESPACE_VOLUME_DATA_SOURCE: "false"
# Whether to skip any attach operation altogether for CephCSI PVCs.
# See more details [here](https://kubernetes-csi.github.io/docs/skip-attach.html#skip-attach-with-csi-driver-object).
# If set to false it skips the volume attachments and makes the creation of pods using the CephCSI PVC fast.
+5
View File
@@ -162,6 +162,11 @@ func (r *ReconcileCSI) setParams() error {
CSIParam.EnableCSIAddonsSideCar = true
}
CSIParam.EnableCrossNamespaceVolumeDataSource = false
if strings.EqualFold(k8sutil.GetOperatorSetting("CSI_ENABLE_CROSS_NAMESPACE_VOLUME_DATA_SOURCE", "false"), "true") {
CSIParam.EnableCrossNamespaceVolumeDataSource = true
}
CSIParam.EnableCSITopology = false
if strings.EqualFold(k8sutil.GetOperatorSetting("CSI_ENABLE_TOPOLOGY", "false"), "true") {
CSIParam.EnableCSITopology = true
+1
View File
@@ -72,6 +72,7 @@ type Param struct {
MountCustomCephConf bool
EnableCSIEncryption bool
EnableCSITopology bool
EnableCrossNamespaceVolumeDataSource bool
EnableLiveness bool
CephFSAttachRequired bool
RBDAttachRequired bool
@@ -120,6 +120,7 @@ spec:
- "--leader-election-renew-deadline={{ .LeaderElectionRenewDeadline }}"
- "--leader-election-retry-period={{ .LeaderElectionRetryPeriod }}"
- "--extra-create-metadata=true"
- "--feature-gates=CrossNamespaceVolumeDataSource={{ .EnableCrossNamespaceVolumeDataSource }}"
{{ if .KubeApiBurst }}
- "--kube-api-burst={{ .KubeApiBurst }}"
{{ end }}
@@ -39,6 +39,7 @@ spec:
- "--extra-create-metadata=true"
- "--prevent-volume-mode-conversion=true"
- "--feature-gates=HonorPVReclaimPolicy=true"
- "--feature-gates=CrossNamespaceVolumeDataSource={{ .EnableCrossNamespaceVolumeDataSource }}"
- "--feature-gates=Topology={{ .EnableCSITopology }}"
{{ if .KubeApiBurst }}
- "--kube-api-burst={{ .KubeApiBurst }}"