Server-Side Apply: Status Wiping/Reset Fields

Adds and implements ResetFieldsProvder interface in order to ensure that
the fieldmanager no longer owns fields that get reset before the object
is persisted.

Co-authored-by: Kevin Wiesmueller <kwiesmul@redhat.com>
Co-authored-by: Kevin Delgado <kevindelgado@google.com>
This commit is contained in:
Kevin Delgado
2021-03-09 23:54:55 +00:00
parent d66477d512
commit a1fac8cbd9
67 changed files with 1448 additions and 121 deletions

View File

@@ -130,6 +130,10 @@ EOF
# Creates a node object with name 127.0.0.1. This is required because we do not
# run kubelet.
#
# An arbitrary annotation is needed to ensure field managers are saved on the
# object. Without it, we would be creating an empty object and because status
# and name get wiped, there were be no field managers tracking any fields.
#
# Exports:
# SUPPORTED_RESOURCES(Array of all resources supported by the apiserver).
function create_node() {
@@ -138,7 +142,10 @@ function create_node() {
"kind": "Node",
"apiVersion": "v1",
"metadata": {
"name": "127.0.0.1"
"name": "127.0.0.1",
"annotations": {
"save-managers": "true"
}
},
"status": {
"capacity": {