-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: ensure key node style in FieldSetter.Filter #4948
Conversation
When FieldSetter.Filter creates a new field, check the key node's value and apply an appropriate style when needed.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ephesused The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @ephesused. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Related to #3446 , though only addresses the specific case of integer keys that come from an SMP (if the resource being patched has an integer key, even that still does not work). Please fix the test failures and re-ping. |
@ephesused: This PR has multiple commits, and the default merge method is: merge. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Apologies - I'm still struggling to set up a kustomize development environment where I can run all the tests cleanly. That makes it hard to catch "honest" test failures. I'm hopeful that the second commit will address the problems. |
@KnVerey, after seeing https://istio.io/latest/docs/reference/config/security/peer_authentication/ (mentioned in #3446), I'm concerned about using this change since it effectively forces stringification of patch-added keys. I fear that probably is a stronger assumption than is appropriate. The test cases altered in ffd9a18 look like the changes are appropriate (label and annotation keys are supposed to be strings), but the PeerAuthentication reference points to resources where certain keys are supposed to be uint32. To quote myself from the discussion in #4928:
I'm willing to give that approach a try if you'd like to see it. Let me know what you think. |
@ephesused Did you manage to take a look at this? |
@Hammond95, sorry, I have not. I have been focused on other things and forgot about this issue. I'll try to take a look within the next few days. |
amazing! thank you @ephesused! |
From the discussion in #4928:
This now is #5005. Edited to add: I believe #5005 is the better approach. I'm leaving this here as an alternative if there's a meaningful concern uncovered with #5005. |
amazing @ephesused!! Great job! |
I had a look at that PR today and I agree that that seems like the better place to fix this issue. I also agree with the concerns you expressed above about forcing stringification of patch-added keys. I'm going to close this PR in favour of that one. /close |
@KnVerey: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When FieldSetter.Filter creates a new field, check the key node's value and apply an appropriate style when needed.
Fixes #4928