-
Notifications
You must be signed in to change notification settings - Fork 93
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
Replaces kubectl field managers with the resource manager owner in ssa apply #223
Conversation
ssa/patch.go
Outdated
@@ -91,6 +91,38 @@ func patchRemoveFieldsManagers(object *unstructured.Unstructured, managers []Fil | |||
return append(patches, newPatchReplace("/metadata/managedFields", entries)) | |||
} | |||
|
|||
// patchReplaceFieldsManagers returns a jsonPatch array for replacing the managers with matching prefix and operation type | |||
// with another manager name and an apply operation. |
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.
// with another manager name and an apply operation. | |
// with the specified manager name and an apply operation. |
ssa/patch.go
Outdated
entries = append(entries, entry) | ||
} | ||
|
||
if len(entries) == len(objEntries) && !renamed { |
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.
if len(entries) == len(objEntries) && !renamed { | |
if !renamed { |
ssa/patch.go
Outdated
return nil | ||
} | ||
|
||
if len(entries) == 0 { |
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.
Delete this condition, it was needed for remove but not here.
@somtochiama can you please rebase and squash your commits. |
Signed-off-by: Somtochi Onyekwere <[email protected]>
092ffc0
to
d5ab2c5
Compare
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.
LGTM
Thanks @somtochiama
Signed-off-by: Somtochi Onyekwere [email protected]