-
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
Add Annotation to Control Inline List Conversion in Kustomize Resources" #5745
Conversation
Hi @isarns. 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-sigs/prow repository. |
Hi @isarns I read the issue, but I think we should try another approach from this PR. I believe the better way is the cailynse's approach that changes to recognize kustomize/api/resource/factory.go Line 193 in cc9dd34
FYI: We already have API schemes on here. Could you change to use the above approach to this PR? |
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-sigs/prow repository. |
@koba1t Thanks for the reply. I have refactored my PR. |
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.
@isarns
Thanks for fixing your PR!
I added one comment. Could you check that?
@koba1t Thanks. I checked what current kustomize does with an empty “real” list, and it returns an empty response (No resource). |
Really looking forward to this |
Hey @koba1t. Can you have another look, please? |
@isarns |
/ok-to-test |
Hi @isarns |
Thanks! Fixed those. |
@isarns /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: isarns, koba1t 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 |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [kubernetes-sigs/kustomize](https://github.com/kubernetes-sigs/kustomize) | minor | `v5.4.3` -> `v5.5.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>kubernetes-sigs/kustomize (kubernetes-sigs/kustomize)</summary> ### [`v5.5.0`](https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize/v5.5.0) [Compare Source](kubernetes-sigs/kustomize@kustomize/v5.4.3...kustomize/v5.5.0) ### Breaking change A starlark support for krm functions was removed to cleanup dependencies. kubernetes-sigs/kustomize#5768 This feature was deprecated 3 years ago and removed because there was no desire to continue using it. kubernetes-sigs/kustomize#5768 (comment) #### Feature [#​5751](kubernetes-sigs/kustomize#5751): Add `--helm-debug` Flag to Kustomize for Enhanced Helm Debugging #### Fix Bugs [#​5458](kubernetes-sigs/kustomize#5458): Sort built-in Namespace kind before CRDs with the same name [#​5745](kubernetes-sigs/kustomize#5745): Add Annotation to Control Inline List Conversion in Kustomize Resources" #### Dependencies [#​5763](kubernetes-sigs/kustomize#5763): Update go 1.22.7 [#​5781](kubernetes-sigs/kustomize#5781): Update kyaml to v0.18.1 [#​5782](kubernetes-sigs/kustomize#5782): Update cmd/config to v0.15.0 [#​5783](kubernetes-sigs/kustomize#5783): Update api to v0.18.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
This PR introduces a new annotation to Kustomize resources:
kustomize.config.k8s.io/convertToInlineList
. When set tofalse
, this annotation prevents objects with names ending in "List" from being converted to inline resources, allowing them to be treated at face value.Changes:
kustomize.config.k8s.io/convertToInlineList: false
annotation.Example:
For example, the resource definition ManagedPrefixList does not require conversion to an inline list, and with this annotation, Kustomize will respect its original format.
Issues Addressed:
Feedback Request:
As someone new to Golang, I understand that this PR might not be perfect. I welcome any guidance, suggestions, or improvements from the community to refine this feature further.