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
@@ -197,7 +201,7 @@ demonstrate the interest in a KEP within the wider Kubernetes community.
197
201
198
202
By using [volume snapshots feature](https://kubernetes.io/docs/concepts/storage/volume-snapshots/), users can provision volumes from snapshots.
199
203
However, it only works for the `VolumeSnapshot` in the same namespace,
200
-
therefore users can't provision a volume in one namespace from a `VolumeSnapshot` in the other namespace.
204
+
therefore users can't provision a persistent volume claim in one namespace from a `VolumeSnapshot` in the other namespace.
201
205
On the other hand, as discussed in other KEP PRs (https://github.com/kubernetes/enhancements/pull/643,
202
206
https://github.com/kubernetes/enhancements/pull/1112, and https://github.com/kubernetes/enhancements/pull/2849), there are use cases that require to share the `VolumeSnapshot` across namespaces.
203
207
For such use cases, this KEP proposes a method for provisioning volumes from cross-namespace snapshots.
@@ -208,15 +212,15 @@ For such use cases, this KEP proposes a method for provisioning volumes from cro
208
212
List the specific goals of the KEP. What is it trying to achieve? How will we
209
213
know that this has succeeded?
210
214
-->
211
-
- Provision of PVs from `VolumeSnapshot`s in other namespaces
215
+
- Provision of PVCs from `VolumeSnapshot`s in other namespaces
212
216
213
217
### Non-Goals
214
218
215
219
<!--
216
220
What is out of scope for this KEP? Listing non-goals helps to focus discussion
217
221
and make progress.
218
222
-->
219
-
- Provision of PVs from PVCs in other namespaces (Please also see [Provisioning PVs from cross-namespace PVs](#provisioning-pvs-from-cross-namespace-pvs))
223
+
- Provision of PVCs from PVCs in other namespaces (Please also see [Provisioning PVCs from cross-namespace PVCs](#provisioning-pvcs-from-cross-namespace-pvcs))
220
224
- Copy or move of `VolumeSnapshot`s to other namespaces (Please also see [Alternatives](#alternatives))
221
225
- Clone of `VolumeSnapshotContent`s
222
226
@@ -267,10 +271,10 @@ Go in to as much detail as necessary here.
267
271
This might be a good place to talk about core concepts and how they relate.
268
272
-->
269
273
270
-
#### Provisioning PVs from cross-namespace PVs
274
+
#### Provisioning PVCs from cross-namespace PVCs
271
275
272
-
The conclusion of the original discussion ([here](https://docs.google.com/document/d/17H1k4lqdtJwZSjNRaQue-FhMhyk14JA_MoURpoxha5Q/edit#bookmark=id.nj4e1ocn8b23) and [here](https://docs.google.com/document/d/17H1k4lqdtJwZSjNRaQue-FhMhyk14JA_MoURpoxha5Q/edit#bookmark=id.h1eqongxseo)) on transfer feature was that we should avoid implementing transfer of PVCs, because there will be more race conditions for PVs than snapshots.
273
-
However, we might have a room to reconsider if this cross-namespace-provision approach can solve the issue of race for PVCs, although transfer approach can't seems to resolve the issue easily.
276
+
The conclusion of the original discussion ([here](https://docs.google.com/document/d/17H1k4lqdtJwZSjNRaQue-FhMhyk14JA_MoURpoxha5Q/edit#bookmark=id.nj4e1ocn8b23) and [here](https://docs.google.com/document/d/17H1k4lqdtJwZSjNRaQue-FhMhyk14JA_MoURpoxha5Q/edit#bookmark=id.h1eqongxseo)) on transfer feature was that we should avoid implementing transfer of PVCs, because there will be more race conditions for PVCs than snapshots.
277
+
However, we might have a room to reconsider if this cross-namespace-provision approach can solve the issue of race for PVCs, although transfer approach can't seem to resolve the issue easily.
274
278
275
279
### Risks and Mitigations
276
280
@@ -288,13 +292,13 @@ Consider including folks who also work outside the SIG or subproject.
288
292
289
293
#### Secret Handling
290
294
291
-
TBD: Unlike transfer feature, this idea doesn't require transfer of secert, but it may need to be discussed
292
-
(We would need to go back to discussion around https://github.com/kubernetes/enhancements/pull/2849#issuecomment-962168202).
295
+
Unlike transfer feature, this idea doesn't need to involve any transfers of Secert, therefore there will be no issue on Secret handling.
296
+
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).
293
297
294
298
#### Security
295
299
296
-
TBD: Use of `ReferencePolicy` should remove the risk, but it may need to be discussed
297
-
(We would need to check again for [the original use case of Gateway APIs](https://github.com/kubernetes/enhancements/pull/2849#issuecomment-919107307), and review if there are any security risks).
300
+
By using [`ReferencePolicy`](https://gateway-api.sigs.k8s.io/concepts/security-model/#2-referencepolicy), only allowed snapshots can be accessed beyond the namespace boundary (Please also see [original discussion on security](https://github.com/kubernetes/enhancements/pull/2849#issuecomment-919107307)).
301
+
Therefore, no malicious user will be able to access to prohibited snapshots.
298
302
299
303
## Design Details
300
304
@@ -307,17 +311,17 @@ proposal will be implemented, this is the place to discuss them.
307
311
308
312
### Example flow of how this proposal works
309
313
310
-
Let's use [Story 1](#story-1) as an example and let's assume:
314
+
Let's use [Story 1](#story-1) as an example and let's assume the following:
311
315
- There are two namespaces, prod and test,
312
-
- Alice manages the prod namesapce and Bob manages the test namespace,
316
+
- Alice manages the prod namespace and Bob manages the test namespace,
313
317
- Alice would like to allow `VolumeSnapshot` foo-backup in the prod namespace to be consumed in the test namespace for testing,
314
318
- Bob would like to create a PV for PVC foo-testing in the test namespace from the `VolumeSnapshot` foo-backup in the prod namespace.
315
319
316
320
Once this proposal is implemented, it can be achieved by doing the following steps:
317
321
318
322
1. In the prod namespace, Alice creates a `ReferencePolicy` bar that allows referencing to the `VolumeSnapshot` foo-backup in the prod namespace from any `VolumeSnapshotLinks` in the test namespace,
319
323
```yaml
320
-
apiVersion: gateway.networking.k8s.io/v1alpha2
324
+
apiVersion: gateway.networking.k8s.io/v1alpha2
321
325
kind: ReferencePolicy
322
326
metadata:
323
327
name: bar
@@ -346,7 +350,7 @@ Once this proposal is implemented, it can be achieved by doing the following ste
346
350
```
347
351
3. In the test namespace, Bob creates a `PersistentVolumeClaim` foo-testing that references the `VolumeSnapshotLink` foo-link as a data source,
348
352
```yaml
349
-
apiVersion: v1
353
+
apiVersion: v1
350
354
kind: PersistentVolumeClaim
351
355
metadata:
352
356
name: foo-testing
@@ -480,14 +484,7 @@ Therefore, the description in this section is just for discussion purpose and wo
480
484
481
485
<!--
482
486
**Note:** *Not required until targeted at a release.*
483
-
484
-
Consider the following in developing a test plan for this enhancement:
485
-
- Will there be e2e and integration tests, in addition to unit tests?
486
-
- How will it be tested in isolation vs with other components?
487
-
488
-
No need to outline all of the test cases, just the general strategy. Anything
489
-
that would count as tricky in the implementation, and anything particularly
490
-
challenging to test, should be called out.
487
+
The goal is to ensure that we don't accept enhancements with inadequate testing.
491
488
492
489
All code is expected to have adequate tests (eventually with coverage
493
490
expectations). Please adhere to the [Kubernetes testing guidelines][testing-guidelines]
@@ -496,18 +493,62 @@ when drafting this test plan.
We expect no non-infra related flakes in the last month as a GA graduation criteria.
548
+
-->
549
+
550
+
- Verify that PV is provisioned from VS in other namsepace if allowed by ReferencePolicy: <link to test coverage>
551
+
- Verify that PV isn't provisioned from VS in other namsepace if not allowed by ReferencePolicy: <link to test coverage>
511
552
512
553
### Graduation Criteria
513
554
@@ -649,7 +690,7 @@ well as the [existing list] of feature gates.
649
690
- [x] Other
650
691
- Describe the mechanism:
651
692
- Will enabling / disabling the feature require downtime of the control
652
-
plane? No.
693
+
plane? No, it won't require downtime of the entire control plane. However, it will require a downtime of each provisioner whose enablement is being changed.
653
694
- Will enabling / disabling the feature require downtime or reprovisioning
654
695
of a node? (Do not assume `Dynamic Kubelet Config` feature is enabled). No.
655
696
@@ -660,7 +701,7 @@ Any change of default behavior may be surprising to users or break existing
660
701
automations, so be extremely careful here.
661
702
-->
662
703
663
-
Yes, `VolumeSnapshotLink` CRD can be used as a `DataSourceRef` for provisioning PV.
704
+
Yes, `VolumeSnapshotLink` CRD can be used as a `DataSourceRef` for PVC.
664
705
665
706
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
666
707
@@ -679,7 +720,7 @@ Yes, by specifying `--cross-namespace-snapshot=false` command line flag of CSI e
679
720
680
721
###### What happens if we reenable the feature if it was previously rolled back?
681
722
682
-
`VolumeSnapshotLink`CRD can be used as a `DataSourceRef` for provisioning PV, again.
723
+
`VolumeSnapshotLink`CRD can be used as a `DataSourceRef` for PVC, again.
683
724
684
725
###### Are there any tests for feature enablement/disablement?
0 commit comments