Skip to content

Commit fa233c7

Browse files
committed
Update with solution to the legacy provisioner problem
1 parent c21c688 commit fa233c7

File tree

1 file changed

+12
-9
lines changed
  • keps/sig-storage/1495-volume-populators

1 file changed

+12
-9
lines changed

keps/sig-storage/1495-volume-populators/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ way. In particular:
146146
1. If `DataSource` is set invalid and `DataSourceRef` is set; reject
147147
1. If `DataSource` is not set and `DataSourceRef` is set invalid (any core object other
148148
than PVC); reject
149-
1. If `DataSource` is not set and `DataSourceRef` is set PVC or VolumeSnapshot; set
150-
`DataSource` from `DataSourceRef` and accept
151-
1. If `DataSource` is not set and `DataSourceRef` is set some other valid value (not
152-
core object and not VolumeSnapshot); leave `DataSource` unset and accept
153-
154-
The last case is the one that enables using new types of data sources. Existing data
149+
1. If `DataSource` is not set and `DataSourceRef` is set valid (PVC or any non-core
150+
object); set `DataSource` from `DataSourceRef` and accept
151+
152+
Note that in the last case, we allow setting the CRD data sources, which enables
153+
volume populators to work. This is the only way that the `DataSource` field could get
154+
filled in with something not currently valid, like a CRD. Existing data
155155
sources continue to work, either through the old interface or the new interface. New
156156
data sources only work through the new interface, and additional validation is
157157
performed after the PVC is created.
@@ -327,7 +327,7 @@ situations outlined above, focusing especially on backwards compatibility.
327327
- Create PVC with `DataSource` is not set and `DataSourceRef` is set to Pod, expect error
328328
- Create PVC with `DataSource` is not set and `DataSourceRef` is set to PVC; expect success and `DataSource` contains PVC
329329
- Create PVC with `DataSource` is not set and `DataSourceRef` is set to VolumeSnapshot; expect success and `DataSource` contains VolumeSnapshot
330-
- Create PVC with `DataSource` is not set and `DataSourceRef` is set to CRD; expect success and `DataSource` empty
330+
- Create PVC with `DataSource` is not set and `DataSourceRef` is set to CRD; expect success and `DataSource` contains CRD
331331

332332
To test the `volume-data-source-validator`, we need to check the following cases:
333333
- Creation of a PVC with no `DataSourceRef` causes no events.
@@ -395,14 +395,17 @@ _This section must be completed when targeting alpha to a release._
395395
* **Does enabling the feature change any default behavior?**
396396
A new field is introduced on PVCs, but existing clients can safely ignore it.
397397
New clients that use the new field can cause PVCs to be created which can be
398-
used by volume populators.
398+
used by volume populators. Clients using the new field can cause the existing
399+
`DataSource` field to contain values not otherwise possible, but clients
400+
already cope with this by ignore unknown values, which is exactly the intended
401+
behvior.
399402

400403
* **Can the feature be disabled once it has been enabled (i.e. can we roll back
401404
the enablement)?**
402405
Yes, dropping or ignoring the new field returns the system to it's previous
403406
state. Worst case, some PVCs which were trying to use the new field might need
404407
to be deleted because they will never have anything happen to them after the
405-
feature is disaabled.
408+
feature is disabled.
406409

407410
* **What happens if we reenable the feature if it was previously rolled back?**
408411
As long as the alpha field was not dropped, things will go back to how they

0 commit comments

Comments
 (0)