-
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
Allow setting every array element in replacements #4053
Allow setting every array element in replacements #4053
Comments
In its current state you would have to list out all the fieldPaths you need. |
@yogeshgadge: This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The 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. |
Using [] or .. for representing all elements seems reasonable to me.
|
I think the feature makes sense. As for the syntax, fieldPath is essentially using a subset of JSONPath syntax, so we should stick with its way of expressing things as we add features. Specifically, our implementation should be consistent with what k/k packages use, i.e. this parser from client-go if my searching is serving me well. In this case, |
Being consistent with k/k sounds good to me. In that case, the syntax would be something like |
Adding a comment to note a caveat in that fieldPath separates on "." for everything - so while a JSON path is something like @m-Bilal, feel free to assign yourself if you would like |
/assign |
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 |
Has there been any work on this topic? |
@m-Bilal are you still planning to work on this? |
Sorry I have not been able to work on this yet, been busy with office work. I do plan on working on this, but I'll be occupied this week as well. If anyone else wants to take this up, please feel free to do so. In case nobody takes this up, I'll leave a comment here when I do start working on this. |
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 |
A maintainer should probably remove the lifecycle/rotten and stale from this, seeing as it's still active and relevant |
/remove-lifecycle rotten |
/help |
@natasha41575: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed 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. |
/assign |
This is fixed by #4424. The only thing left to do is documentation. @koba1t would you be interested in updating the documentation for this feature? The replacement doc lives here: https://github.com/kubernetes-sigs/cli-experimental/tree/master/site/content/en/references/kustomize/kustomization/replacements |
I'm creating PR to add a document. kubernetes-sigs/cli-experimental#240 |
Documentation LGTM. Will merge the docs PR when we do a release. Thank you! |
I think there's a problem with this code.
File: test/deployment.yaml
File: test/kustomization.yaml
|
@koba1t could you please investigate the above issue? |
I was thinking of no use case to create nodes when wildcard matching (and PathMatcher didn't support I feel this bug is caused to output error messages. I can fix it. |
I would very much expect a wildcard and create options to be a supported combination. If you need to add an environment variable or an argument to every pod/deployment/statefulset, then that feature would be required. Without that option, we're only able to modify environment/arguments that are already defined with a new value. |
I see there is a new issue filed regarding this, so let's move the discussion there. |
I left a commend #4561 (comment) I think we should start by improving the error message, but in general I agree that the feature makes sense to support. |
On the lines of targeting specific array
entry prop.[name=nginx].host
I triedentry prop.-.host
so that all the array elements are targeted. However this did not work.See my example below
kustomization.yaml
Here are the detailed values https://stackoverflow.com/questions/68322864/kustomize-how-to-target-replacement-in-every-array
I am using kustomize 4.2.0 version
The text was updated successfully, but these errors were encountered: