@@ -67,7 +67,7 @@ SIG Architecture for cross-cutting KEPs).
67
67
- [ Goals] ( #goals )
68
68
- [ Non-Goals] ( #non-goals )
69
69
- [ Proposal] ( #proposal )
70
- - [ User Stories (Optional) ] ( #user-stories-optional )
70
+ - [ User Stories] ( #user-stories )
71
71
- [ Apply (force=true) to unset an owned listType=map element] ( #apply-forcetrue-to-unset-an-owned-listtypemap-element )
72
72
- [ Apply (force=true) to unset an owned granular map value] ( #apply-forcetrue-to-unset-an-owned-granular-map-value )
73
73
- [ Apply (force=false) to an owned field] ( #apply-forcefalse-to-an-owned-field )
@@ -105,6 +105,8 @@ SIG Architecture for cross-cutting KEPs).
105
105
- [ Implementation History] ( #implementation-history )
106
106
- [ Drawbacks] ( #drawbacks )
107
107
- [ Alternatives] ( #alternatives )
108
+ - [ Alternatives to declaring the intent to unset a field] ( #alternatives-to-declaring-the-intent-to-unset-a-field )
109
+ - [ Escaping] ( #escaping )
108
110
<!-- /toc -->
109
111
110
112
## Release Signoff Checklist
@@ -456,8 +458,10 @@ fieldManager2:
456
458
- Caveat: Non-declarative defaulting, such as defaulting that is performed by the strategy, or
457
459
admission control, is not detectable by server side apply, and will result in conflicts between
458
460
field managers even for cases where the defaulting SHOULD result in shared field ownership.
459
- This is a pre-existing problem between defaulting and server side apply but is more likely
460
- to occur with this enhancement.
461
+ This is a pre-existing problem between mutating admission and server side apply but
462
+ will also become possible via defaulting of unset fields with this enhancement.
463
+ See [issue 129960](https://github.com/kubernetes/kubernetes/issues/129960) for
464
+ for examples.
461
465
1. listType=map key fields that are defaulted MUST be respected when extracting unset value markers from
462
466
apply configurations. That is, a unset marker such as ` {keyField1: "x", k8s_io__value: unset}`
463
467
will be treated as `{keyField1 : " x" , defaultedKeyField: "defaultValue", k8s_io__value: unset}`
@@ -524,6 +528,7 @@ the introduction of custom marshalling to the apply configuration types.
524
528
525
529
# ## Unset marker escaping
526
530
531
+ <<<<<<< Updated upstream
527
532
We will **NOT** support escaping of the marker.
528
533
529
534
We considered this and started to prototype an implementation, but :
@@ -533,6 +538,9 @@ We considered this and started to prototype an implementation, but:
533
538
- It's hard to imagine where escaping this key would actually be needed. If we really need the ability
534
539
to "apply to an apply configuration" in the future, look into options, but building this without
535
540
a plausible use case does not seem necessary.
541
+ =======
542
+ We will NOT support escaping of the marker. See the alternatives considered section for details.
543
+ >>>>>>> Stashed changes
536
544
537
545
# ## High level implementation plan
538
546
@@ -607,9 +615,10 @@ TODO: For beta
607
615
608
616
# ### Beta
609
617
610
- - applyconfiguration-gen generates typesafe bindings for unsetting fields
618
+ - applyconfiguration-gen generates typesafe bindings for unsetting fields.
611
619
- We decide if the marker values should be allowed in CREATE/UPDATE manifests, and stripped out, or
612
- if we will not allow marker values in manifests.
620
+ if we will not allow marker values in manifests. If we to add this support, we will also
621
+ add feature gates to `kubectl` and client-go to opt-in to it.
613
622
- Kubectl allows `{k8s_io__value : unset}` when validating apply configurations.
614
623
- e2e tests are completed
615
624
@@ -943,6 +952,8 @@ Why should this KEP _not_ be implemented?
943
952
944
953
# # Alternatives
945
954
955
+ # ## Alternatives to declaring the intent to unset a field
956
+
946
957
We considered requiring users modify the `managed.managedFields` data to add the fields that are unset
947
958
but that they wish to own. While this is possible, it goes against a goal established at the beginning
948
959
of the server side apply project to make all operations possible without client modifiecations to
@@ -963,4 +974,15 @@ both identify the entry to be unset by the entries keys, and then also indicate
963
974
unset. So if we use "__UNSET__" for fields, then we need to introduce a special field name for keyed lists,
964
975
for example `__VALUE__ : __UNSET__`. This observation led us to favor using a key/value representation
965
976
for all markers, which is slightly more verbose in the case of unsetting fields, but only requires
966
- developers learn a single representation for the marker to be able to use it in for all possible cases.
977
+ developers learn a single representation for the marker to be able to use it in for all possible cases.
978
+
979
+ # ## Escaping
980
+
981
+ We considered escaping the marker field key, and started to prototype an implementation, but concluded that :
982
+
983
+ - The marker key is already sufficiently unique that having it accidentally collide with a field name is
984
+ a pathological concern. The only plausible collision would be if there was a need to "apply to an apply configuration".
985
+ - If we ever need the ability to "apply to an apply configuration" in the future, we COULD add escaping, but
986
+ building this without a plausible use case feels like over engineering.
987
+ - Adding a performant unescaping pass to structured-merge-diff is complex and it effectively doubles
988
+ the implementation effort of this KEP.
0 commit comments