-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
replacements: Unable to add/create a new array element #4469
Comments
/triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
/assign koba1t |
@koba1t @natasha41575 how do we want this feature to work? I've been thinking about this lately as part of looking into #4561, which is required for the use case in #4761 (the regression is from incorrectly ignoring the invalid paths to a panic--it should throw an error, which will break that person's workflow). In short, I'm wondering if we need to constrain this feature to be able to create only append an array element. To give an extreme example, if they have 2 elements and try to create something in element 100, it doesn't make sense for us to try to create 98 blank elements in the middle. But if they have 2 and they target the 3rd, we have complete knowledge of what the overall array should contain. Incidentally, you may want to hold off on the implementation until I PR the fix to #4561, which will hopefully be soon. I currently expect that to contain a fairly big change to the transformer, because it surfaces the fact that we're currently splitting the implementation across two different filters, neither of which actually logically should behave the way we need it to for our ultimate feature set. |
Describe the bug
I'd like to copy the host name from an Ingress and use it in a newly created tls section. However, kustomize seems to be unable to create arrays to build the tls section.
Files that can reproduce the issue
ingress.yaml:
kustomize.yaml:
Expected output:
Actual output:
Workaround:
Pre-create the tls structure, including a value in hosts, otherwise it won't create the entry.
Expected output
Actual output
Kustomize version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6
", GitCommit:"f59f5c2fda36e4036b49ec027e556a15456108f0", GitTreeState:"
archive", BuildDate:"1980-01-01T00:00:00Z", GoVersion:"go1.16.13", Comp
iler:"gc", Platform:"linux/amd64"}
Additional context
The text was updated successfully, but these errors were encountered: