-
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
kustomize edit add replacement #4679
Comments
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 |
/remove-lifecycle stale |
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 |
/remove-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 |
@Gikkman Just to confirm, given a
to While we triage this feature request, how does
|
@KnVerey How do we feel about this request for I'm not very familiar with the rationale behind the |
/triage under-consideration |
/triage accepted on the condition that
This command should not be responsible for adding an "inline" replacement
given all the field values under |
/good-first-issue |
/remove-good-first-issue |
Hi @annasong20 . Sorry for the late reply.
Yes. This is the same behavior we see when we use |
@charles-chenzz, that's correct! |
/assign |
hi @Gikkman . can you provide a detail example of the input and output that we expect? It would help a lot for the implement! Thanks |
From how I've use Case 1 - No pre-existing replacements list
>> kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml We want to add the kustomize edit add replacement --path changes.yaml This should add a list named >> kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
replacements:
- path: changes.yaml Case 2 - A pre-existing replacements list
>> kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
replacements:
- path: replacement.yaml We want to add the kustomize edit add replacement --path changes.yaml This should append to the list named >> kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
replacements:
- path: replacement.yaml
- path: changes.yaml |
so we only accept the --path changes.yaml and write it to the field replacements in kustomization.yaml? do we need to handle something like |
Yes. (This is answered earlier in this issue thread, if you read it through from the start)
No. The
Both case should be handled. Please see my previous post that outlined the two cases with expected input and output. |
@charles-chenzz To piggy back off of @Gikkman's response, this issue requests the implementation of
As @Gikkman notes, this is very similar to the existing
which you can use as reference. If the
Context
In addition to the use case @Gikkman provided in his issue description, say in your automated manifest promotion pipeline you wanted to add different annotations to your manifests for the different development, staging, and production environments. It'd be ideal if you didn't need (1) a human in the middle of your pipeline to add said annotations or (2) a more complicated bash script invoking |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
Is your feature request related to a problem? Please describe.
We got some scripts which generates a replacement file , and would like to automatically add the replacement file to the
kustomization.yaml
file. (I patch in a init container, and then we want that init container to have the same image as a main container. I know, it's hacky, but I am testing some PoCs) Similarly to how we can add a patch withkustomize edit add patch --path
or a label withkustomize edit add label
.I've recently started working with replacements, so maybe I am missing something in the documentation or the intentions with it, but I can't see any support for this feature and I would consider it really useful.
The text was updated successfully, but these errors were encountered: