-
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
Unable to add new path and value using patch operation #4786
Comments
Your DaemonSet is lacking the "app" label mentioned in your patch's label selector. You have that label in the DaemonSet's pod spec template, but not on the DaemonSet itself. |
I am seeing this issue with following resources as well: kustomization.yaml with patches:
The output is (as you can see the envFrom is not included in first container of targeted Deployment):
but if I use patchesJson6902 as in:
then output is:
|
According to https://www.rfc-editor.org/rfc/rfc6902#section-4.1:
What I think that means is that the JSON patch should be creating the new path/value if it is not already there. I'm doubtful that this is something we can fix in kustomize, as my guess is that we probably use some JSON patch library, but it would be helpful to have someone investigate. /triage accepted In the meantime, you may find replacements to be a better alternative to do this creation operation. |
In my case the issue is that So the issue is actually the divergent behavior, where it should actually be the same, and not that Json6902 patch is not behaving as expected. |
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 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Describe the bug
"Add" patch does not add new path and value to Daemonset manifest.
Files that can reproduce the issue
Example:
kustomization.yaml
Or
resources.yaml
...
-->
Expected output
Actual output
Kustomize version
Kustomize Version: v4.5.4
Platform
MacOS Monterey 12.5.1
Additional context
The text was updated successfully, but these errors were encountered: