summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Liggitt <liggitt@google.com>2019-06-25 08:16:06 -0700
committerJordan Liggitt <liggitt@google.com>2019-06-25 08:18:34 -0700
commit47f58b5491c911f5f0f5d86de122a0ece1612e46 (patch)
treee356973d428d2d62619792d614b75bb479c2b16c
parent836e76b7c613060bc56b1b5ce0cb8c448e02ec57 (diff)
Add rationale for preserving persisted data for alpha fields
-rw-r--r--contributors/devel/sig-architecture/api_changes.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/contributors/devel/sig-architecture/api_changes.md b/contributors/devel/sig-architecture/api_changes.md
index 8bf99957..8125bd88 100644
--- a/contributors/devel/sig-architecture/api_changes.md
+++ b/contributors/devel/sig-architecture/api_changes.md
@@ -930,6 +930,9 @@ The preferred approach adds an alpha field to the existing object, and ensures i
3. Before persisting the object to storage, clear disabled alpha fields on create,
and on update if the existing object does not already have a value in the field.
This prevents new usage of the feature while it is disabled, while ensuring existing data is preserved.
+Ensuring existing data is preserved is needed so that when the feature is enabled by default in a future version *n*
+and data is unconditionally allowed to be persisted in the field, an *n-1* API server
+(with the feature still disabled by default) will not drop the data on update.
The recommended place to do this is in the REST storage strategy's PrepareForCreate/PrepareForUpdate methods:
```go