-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add more fields to be stripped from managedFields #74206
add more fields to be stripped from managedFields #74206
Conversation
/assign @lavalamp |
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go
Show resolved
Hide resolved
I suspect we want #74207 so we can add a test for this feature. |
yes, I would have done it the other way round but now that you raised concerns about the MakePathOrDie, it would be more reasonable to merge #74207 first. |
f572461
to
89f4f9d
Compare
/retest |
@@ -233,8 +233,12 @@ var stripSet = fieldpath.NewSet( | |||
fieldpath.MakePathOrDie("metadata", "name"), | |||
fieldpath.MakePathOrDie("metadata", "namespace"), | |||
fieldpath.MakePathOrDie("metadata", "creationTimestamp"), | |||
fieldpath.MakePathOrDie("metadata", "deletionTimestamp"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it'd be generally useful to know who/what has set the deletion timestamp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's set in the delete handler, which doesn't set the field anyway (maybe we should also fix that?). I don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a state from which an object cannot recover?
It might be helpful, but I thought there was the audit log feature to better track things like this?
And do we want to change the object pre deletion? Feels a little off to change managed fields on deletion as it means the user deletes a state and then we modify it before really deleting. Wouldn't expect this.
On the other hand it might be a question of consistency to add this to the delete handler.
"selfLink": "b", | ||
"uid": "b", | ||
"clusterName": "b", | ||
"generation": 0, | ||
"managedFields": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to see if managedFields
gets removed "recursively", so you want to make this non-empty.
Look at what we do for finalizers and gracePeriod. There's a whole lifecycle after a deletion is initiated... |
To sum-up the decision we've made: We don't know how we're going to handle deletionTimestamp in the future, we know it's not set now (because we don't track fields for |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: apelisse, kwiesmueller The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Adds more fields to get stripped from managedFields
As requested by @lavalamp in #73681
Does this PR introduce a user-facing change?: