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
-[Provisioning PVCs from cross-namespace PVCs](#provisioning-pvcs-from-cross-namespace-pvcs)
91
91
-[Risks and Mitigations](#risks-and-mitigations)
92
-
-[Secret Handling](#secret-handling)
92
+
-[<code>Secret</code> Handling](#-handling)
93
93
-[Security](#security)
94
94
-[Conflict on installing <code>VolumePopulator</code> CR for <code>VolumeSnapshotLink</code> across CSI drivers](#conflict-on-installing--cr-for--across-csi-drivers)
95
95
-[Design Details](#design-details)
@@ -241,7 +241,7 @@ Define an API to specify a cross-namespace `VolumeSnapshot` as a `DataSourceRef`
241
241
- To specify a non-standard API as a `DataSourceRef` of a PVC, [AnyVolumeDataSource feature](https://kubernetes.io/blog/2021/08/30/volume-populators-redesigned/) is used,
242
242
- To specify a cross-namespace `VolumeSnapshot`, a new `VolumeSnapshotLink` CRD is introduced (Please also see [API](#api)),
243
243
- To restrict only allowed `VolumeSnapshot` to be consumed from other namespaces, [`ReferenceGrant` CRD (formerly `ReferencePolicy`)](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io%2fv1alpha2.ReferenceGrant) is used,
244
-
- To actually populate a PV from a `VolumeSnapshot` referenced from `VolumeSnapshotLink` CRD, a populator for each CSI driver is used,
244
+
- To populate a PV from a `VolumeSnapshot` referenced from `VolumeSnapshotLink` CRD, a populator for each CSI driver is used,
245
245
- As a reference populator implementation, [CSI external provisioner](https://github.com/kubernetes-csi/external-provisioner) is extended to handle the `VolumeSnapshotLink` CRD (Please also see [Populator implementation](#populator-implementation)).
246
246
247
247
An initial discussion of this idea can be found [here](https://github.com/kubernetes/enhancements/pull/2849#issuecomment-949929595) and PoC implementation can be found [here](https://github.com/kubernetes/enhancements/pull/2849#issuecomment-958208039).
@@ -291,10 +291,10 @@ How will UX be reviewed, and by whom?
291
291
Consider including folks who also work outside the SIG or subproject.
292
292
-->
293
293
294
-
#### Secret Handling
294
+
#### `Secret` Handling
295
295
296
-
Unlike transfer feature, this idea doesn't need to involve any transfers of Secert, therefore there will be no issue on Secret handling.
297
-
From a populator, Secrets are only referenced through snapshots that exist in the same namespace (As commented [here](https://github.com/kubernetes/enhancements/pull/2849#issuecomment-962168202), depending on the driver implementation, there may be very little chance that some CSI drivers won't work well in a very rare situation. However, such drivers can avoid this issue separately, by turning off this feature, implementing their own populator, and so on).
296
+
Unlike transfer feature, this idea doesn't need to involve any transfers of `Secret`, therefore there will be no issue on `Secret` handling.
297
+
From a populator, `Secret`s are only referenced through snapshots that exist in the same namespace (As commented [here](https://github.com/kubernetes/enhancements/pull/2849#issuecomment-962168202), depending on the driver implementation, there may be very little chance that some CSI drivers won't work well in a very rare situation. However, such drivers can avoid this issue separately, by turning off this feature, implementing their own populator, and so on).
298
298
299
299
#### Security
300
300
@@ -313,11 +313,11 @@ In addition, there will be cases that `ReferenceGrant` may be created/deleted/re
313
313
314
314
#### Conflict on installing `VolumePopulator` CR for `VolumeSnapshotLink` across CSI drivers
315
315
316
-
This feature requires installing VolumePopulator` CR for `VolumeSnapshotLink` and is enabled per CSI driver basis.
316
+
This feature requires installing `VolumePopulator` CR for `VolumeSnapshotLink` and is enabled per CSI driver basis.
317
317
Therefore, on enabling this feature for each CSI driver, it is expected that `VolumePopulator` CR for `VolumeSnapshotLink` is created before each CSI driver installation.
318
318
As a result, there may be a conflict in creating it for each driver, if there are any differences in their definitions, like alpha API and beta API.
319
319
320
-
To avoid this issue, it should be avoided to manage VolumePopulator` CR for `VolumeSnapshotLink` in each CSI driver's repository.
320
+
To avoid this issue, it should be avoided to manage `VolumePopulator` CR for `VolumeSnapshotLink` in each CSI driver's repository.
321
321
It should be managed in another single repository and the same CR should be used per cluster basis.
322
322
323
323
## Design Details
@@ -388,7 +388,7 @@ Once this proposal is implemented, it can be achieved by doing the following ste
388
388
volumeMode: Filesystem
389
389
```
390
390
4. Once the populator finds a `VolumeSnapshotLink` is specified as `dataSourceRef`, it checks all `ReferenceGrants` in `VolumeSnapshotLink.spec.source.namespace` to see if populating the `VolumeSnapshotLink.spec.source` is allowed. If it is allowed, the populator populates the volume.
391
-
Note that how `ReferenceGrant` is checked depends on the implementation, however controllers that are trying to use the `VolumeSnapshot` in another namespace must check `ReferenceGrant` if the access is allowed, before it actually starts exposing the data and metadata from the `VolumeSnapshot` to the `VolumeSnapshotLink`'s namespace.
391
+
Note that how `ReferenceGrant` is checked depends on the implementation, however controllers that are trying to use the `VolumeSnapshot` in another namespace must check `ReferenceGrant` if the access is allowed before it actually starts exposing the data and metadata from the `VolumeSnapshot` to the `VolumeSnapshotLink`'s namespace.
392
392
393
393
### API
394
394
@@ -434,7 +434,7 @@ As a reference implementation, only (a) will be implemented in the community.
434
434
435
435
Regardless of the implementation,
436
436
-`VolumeSnapshotLink` CRD and `ReferenceGrant` CRD must exist in the cluster before the populator is deployed.
437
-
-`VolumePopulator` CR to allow popluating from `VolumeSnapshotLink` CRD needs to be created to enable this feature, as AnyVolumeDataSource feature defines. The `VolumePopulator` CR needed for this feature will be as follows:
437
+
-`VolumePopulator` CR to allow populating from `VolumeSnapshotLink` CRD needs to be created to enable this feature, as AnyVolumeDataSource feature defines. The `VolumePopulator` CR needed for this feature will be as follows:
438
438
```yaml
439
439
kind: VolumePopulator
440
440
apiVersion: populator.storage.k8s.io/v1beta1
@@ -468,7 +468,7 @@ There will be two approaches to implement as a separate populator:
468
468
469
469
This is a straightforward implementation that AnyVolumeDataSource feature defines.
470
470
Developers will be able to utilize lib-volume-populator to implement this way.
471
-
One of the challenges to achieve it will be how to actually copy the data from a snapshot in one namespace to an already provisioned PV that will need to be bound to a PVC in the other namespace.
471
+
One of the challenges to achieve it will be how to copy the data from a snapshot in one namespace to an already provisioned PV that will need to be bound to a PVC in the other namespace.
472
472
473
473
A naive implementation will be:
474
474
1. Create another PV from the snapshot in the snapshot's namespace,
@@ -479,10 +479,10 @@ A naive implementation will be:
479
479
If the naive implementation is used, unintended transient states, for example a temporary PVC in the snapshot namespace, may be visible to users.
480
480
Also, there may be performance issues depending on where and how data is copied.
481
481
482
-
On the other hand, althoguh it completely depends on the implementation, this approach can have advantages, like the ability to populate volumes from snapshot across different CSI drivers or the ability to efficiently copy data by using CSI driver specific way.
482
+
On the other hand, although it completely depends on the implementation, this approach can have advantages, like the ability to populate volumes from snapshot across different CSI drivers or the ability to efficiently copy data by using CSI driver specific way.
483
483
484
484
There will be no generic way to implement by using this approach, because the implementations rely too much on backup tools or CSI drivers.
485
-
Therefore no community implementation of this approach will be provided.
485
+
Therefore, no community implementation of this approach will be provided.
486
486
487
487
Note that a PoC implementation for this approach can be found [here](https://github.com/kubernetes-csi/lib-volume-populator/pull/31). It works only for csi-hostpath driver and is intended to be just for discussion purpose.
488
488
@@ -507,7 +507,7 @@ The implementation of provisioner and populator of this approach will be as foll
507
507
The above implementation is just separating the logics in approach (a) to two components, and it won't help improve efficiency nor simplify implementations.
508
508
Therefore, the description in this section is just for discussion purpose and won't be implemented.
509
509
510
-
A PoC implementation for this approach, forking exisiting provisioner and modify it to only handle `VolumeSnapshotLink`, can be found [here](https://github.com/mkimuram/external-provisioner/commits/separate-controller).
510
+
A PoC implementation for this approach, forking existing provisioner and modify it to only handle `VolumeSnapshotLink`, can be found [here](https://github.com/mkimuram/external-provisioner/commits/separate-controller).
511
511
Note that just to separate the containers for normal provision and provision from `VolumeSnapshotLink`, we don't need to fork the codes, instead we can use a command line option.
512
512
Fork is only needed if we need to keep the existing CSI external provisioner codes separated from this feature.
We expect no non-infra related flakes in the last month as a GA graduation criteria.
581
581
-->
582
582
583
-
- Verify that PV is provisioned from VS in other namsepace if allowed by ReferenceGrant: <link to test coverage>
584
-
- Verify that PV isn't provisioned from VS in other namsepace if not allowed by ReferenceGrant: <link to test coverage>
583
+
- Verify that PV is provisioned from VS in other namespace and bound to PVC if allowed by ReferenceGrant: <link to test coverage>
584
+
- Verify that PV isn't provisioned from VS in other namespace and isn't bound to PVC if not allowed by ReferenceGrant: <link to test coverage>
585
585
586
586
### Graduation Criteria
587
587
@@ -651,15 +651,15 @@ enhancement:
651
651
-->
652
652
653
653
- Upgrade:
654
-
- Method: Do both of the below operations:
654
+
- Method: Do both of the following operations:
655
655
- Specify `--cross-namespace-snapshot=true` command line flag of CSI external-provisioner
656
-
- Create `VolumePopulator` CRD to allow popluating from `VolumeSnapshotLink` CRD
656
+
- Create `VolumePopulator` CRD to allow populating from `VolumeSnapshotLink` CRD
657
657
- Behavior:
658
658
- Provisioning volumes from snapshots in other namespaces is enabled.
659
659
- Downgrade:
660
-
- Method: Do both of the below operations:
660
+
- Method: Do both of the following operations:
661
661
- Specify `--cross-namespace-snapshot=false` command line flag of CSI external-provisioner
662
-
- Delete `VolumePopulator` CRD to deny popluating from `VolumeSnapshotLink` CRD
662
+
- Delete `VolumePopulator` CRD to deny populating from `VolumeSnapshotLink` CRD
663
663
- Behavior:
664
664
- Provisioning volumes from snapshots in other namespaces is disabled.
665
665
@@ -749,7 +749,7 @@ feature.
749
749
NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
750
750
-->
751
751
752
-
Yes, by specifying `--cross-namespace-snapshot=false` command line flag of CSI external-provisioner, and deleting `VolumePopulator` CRD to deny popluating from `VolumeSnapshotLink` CRD.
752
+
Yes, by specifying `--cross-namespace-snapshot=false` command line flag of CSI external-provisioner and deleting `VolumePopulator` CRD to deny popluating from `VolumeSnapshotLink` CRD.
753
753
754
754
###### What happens if we reenable the feature if it was previously rolled back?
755
755
@@ -845,7 +845,7 @@ Recall that end users cannot usually observe component logs or access metrics.
845
845
- Condition name: `Bound`for a PV that is provisioned from a PVC referencing `VolumeSnapshotLink`
846
846
- Other field:
847
847
- [x] Other (treat as last resort)
848
-
- Details: Check if a `VolumePopulator` CRD to allow popluating from `VolumeSnapshotLink` CRD exists.
848
+
- Details: Check if a `VolumePopulator` CRD to allow populating from `VolumeSnapshotLink` CRD exists.
849
849
850
850
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
0 commit comments