How to patch a ConfigMap in Kubernetes
This will apply the same patch to that single field: kubectl patch configmap/coredns \ -n kube-system \ –type merge \ -p ‘{“data”:{“upstreamNameservers”:”[\”1.1.1.1\”, \”1.0.0.1\”]”}}’
This will apply the same patch to that single field: kubectl patch configmap/coredns \ -n kube-system \ –type merge \ -p ‘{“data”:{“upstreamNameservers”:”[\”1.1.1.1\”, \”1.0.0.1\”]”}}’
The patch decorator requires the target to be a full dotted path, as stated in the documentation: target should be a string in the form ‘package.module.ClassName’. The target is imported and the specified object replaced with the new object, so the target must be importable from the environment you are calling patch from. The target … Read more
Here’s an adaptation from a related question. git diff -w –no-color | git apply –cached –ignore-whitespace It has the benefit that you don’t need to use stash, temporary files, or perform a reset –hard on your working folders. Addendum The solution above only stages changes except whitespace-only edits. This did not address patch, though using … Read more
1. Yes, you are right, one of the places to look is the kernel bug tracker. Searching the Linux kernel mailing list as well as the subsystem-related mailing lists could also be helpful but is probably more difficult. 2. The main kernel mailing list is here. You can find subscription instructions there. 3. There is … Read more
The –binary option is used when you create the patch file, not when you apply it. That means, instead of your current git diff branch1 branch2 > patch-file, you have to do this instead: git diff branch1 branch2 –binary > patch-file. And, then, apply the patch with git apply patch-file in the same way as … Read more
The explanation for this is here. To summarize, patchJson6902 is an older keyword which can only match one resource via target (no wildcards), and accepts only Group-version-kind (GVK), namespace, and name. The patches directive is newer and accepts more elements (annotation selector and label selector as well). In addition, namespace and name can be regexes. … Read more
Update: You can use git apply -v to see more detailed info about what’s going on, git apply –check to just verify the operation, or git apply –index to rebuild the local index file. Based on your comment, it seems your local index was corrupted, and so index solved it. I will leave my original … Read more
Try using kompare – http://www.caffeinated.me.uk/kompare/. It should do the job. EDIT: Also, check out the list of file comparison tools here: http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools – have a look at the column “Patch preview” in one of the tables.
I really like Kompare. It is just a (very nice) graphical interface for diff. http://www.caffeinated.me.uk/kompare/ sudo apt-get install kompare Creating and applying patches Kompare is able to create a patch file which lists only the differences between two compared text files A and B. Further, Kompare can apply a patch file which was created this … Read more
When I hear those terms this is what comes to mind: Patch – Publicly released update to fix a known bug/issue Hotfix – update to fix a very specific issue, not always publicly released Maintenance Release – Incremental update between service packs or software versions to fix multiple outstanding issues Service Pack – Large Update … Read more