summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hockin <thockin@google.com>2018-09-18 11:06:35 -0700
committerTim Hockin <thockin@google.com>2018-09-18 11:08:59 -0700
commit95a0848c6080bdeaa960d2dd9c303315f7d0b87b (patch)
treeab3ada3b814a4526a70438bca21ddec7321fe113
parentb48267d4b1df1f74ebe61561ec5c362a3187c993 (diff)
Clarify rules around defaults across versions
-rw-r--r--contributors/devel/api_changes.md17
1 files changed, 8 insertions, 9 deletions
diff --git a/contributors/devel/api_changes.md b/contributors/devel/api_changes.md
index b4bc8c67..9e9b82ab 100644
--- a/contributors/devel/api_changes.md
+++ b/contributors/devel/api_changes.md
@@ -296,15 +296,14 @@ was added.
release, and do not make it the storage version. The latter is necessary so that a rollback of the
apiserver doesn't render resources in etcd undecodable after rollback.
-* Any field with a default value in one API version must have *non-nil default
- values* in all API versions. If a default value is added to a field in one API
- version, and the field didn't have a default value in previous API versions,
- it is required to add a default value semantically equivalent to an unset
- value to the field in previous API versions, to preserve the semantic
- meaning of the value being unset. This includes:
- * a new optional field with a default value is introduced in a new API version
- * an old optional field without a default value (i.e. can be nil) has a
- default value in a new API version
+* Any field with a default value in one API version must have a *non-nil* default
+ value in all API versions. This can be split into 2 cases:
+ * Adding a new API version with a default value for an existing non-defaulted
+ field: it is required to add a default value semantically equivalent to
+ being unset in all previous API versions, to preserve the semantic meaning
+ of the value being unset.
+ * Adding a new field with a default value: the default values must be
+ semantically equivalent in all currently supported API versions.
## Incompatible API changes