You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kubernetes supports cross namespace volume data source.
959
+
To use cross namespace volume datasource, you must enable the `AnyVolumeDataSource` and `CrossNamespaceVolumeDataSource`
960
+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for
961
+
the kube-apiserver, kube-controller-manager.
962
+
Also, you must enable the `CrossNamespaceVolumeDataSource` feature gate for csi-provisioner.
963
+
964
+
Enabling the `CrossNamespaceVolumeDataSource` feature gate allow you to specify a namespace in the dataSourceRef field.
965
+
{{< note >}} When a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the [ReferenceGrant documentation](https://gateway-api.sigs.k8s.io/api-types/referencegrant/) for details.
966
+
955
967
## Data source references
956
968
957
969
The `dataSourceRef` field behaves almost the same as the `dataSource` field. If either one is
@@ -969,6 +981,11 @@ users should be aware of:
969
981
* The `dataSourceRef` field may contain different types of objects, while the `dataSource` field
970
982
only allows PVCs and VolumeSnapshots.
971
983
984
+
When the `CrossNamespaceVolumeDataSource` feature is enabled, there are additional differences:
985
+
986
+
* The `dataSource` field only allows local objects, while the `dataSourceRef` field allows objects in any namespaces.
987
+
* When namespace is specified, `dataSource` and `dataSourceRef` are not synced.
988
+
972
989
Users should always use `dataSourceRef` on clusters that have the feature gate enabled, and
973
990
fall back to `dataSource` on clusters that do not. It is not necessary to look at both fields
974
991
under any circumstance. The duplicated values with slightly different semantics exist only for
@@ -1009,6 +1026,50 @@ is registered to handle that kind of data source. When a suitable populator is i
1009
1026
responsibility of that populator controller to report Events that relate to volume creation and issues during
0 commit comments