-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: upgrade managed fields in controller resources from CSA to SSA #121
Conversation
@ymmt2005, do you have any suggestions on how to test this properly? Some of the owned resources are created with a CREATE request, which will set the |
@erikgb
I'm OK with this. |
@ymmt2005 Do you know what's wrong with the CI? Seems unrelated to the change here, and I cannot reproduce it locally. It appears to complain about some aqua "policies". |
@erikgb Lines 174 to 177 in 36bb411
The warning log by aqua may confuse developers, so I'll fix it in another PR. |
Thanks for the feedback @yamatcha! I will take another look! |
I finally found the reason for the failing test. When using SSA you need to set ALL fields the manager cares for. These two lines were missing: e899d87#diff-33975f8c70294bffa37f57ef00ebd5656b884bad2006be7e261ef8cca1011161R122-R123 No idea why the envtests didn't catch this. But the PR should be ready for review now! PTAL! |
This PR reuses the upstream code that
kubectl
uses to upgrademanagedFields
from CSA to SSA. It appears like subresources are not supported yet, but I am working on it in kubernetes/kubernetes#123484. The PR allowing us to upgrade managed fields for subresources is now merged and should be released with the upcoming K8s 1.30. I will create a follow-up PR when the improved helper is available, but this PR fixes the main issue.Fixes #120