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
kubectl diff command #6284
Comments
I take it you mean something like this?
And that would output, for example:
Of course, this should work with YAML too. |
Analyses the current configuration of a resource and a configuration file, producing a diff as a result. Refs: kubernetes#6284
Analyses the current configuration of a resource and a configuration file, producing a diff as a result. Refs: kubernetes#6284
cc @jackgr |
diff is a building block needed for configuration reconciliation (#1702), so I'd like to get this in. |
Assigning to @jlowdermilk as he has the PR assigned to him. |
The patch generated should not contain the defaults. Think of it as a 3-way merge. It's not just defaults, but all fields set during/after creation. For more info, see: #15894 |
I like to contribute and looking for a task to start. Not sure if @krmayankk is working on this but if no one has taken this on I can work on it. |
@arashbina Not sure if you already know about this -- we have the kubectl roadmap here: https://github.com/kubernetes/community/wiki/Roadmap:-kubectl |
@janetkuo I didn't know about the roadmap. Thanks. I'll check it out. |
@janetkuo Is this still planned? I would like to see if a As far as I can see, #31892 would have added that feature, but it got superseded by #31892 which also adds |
@fgrzadkowski There are no sig labels on this issue. Please add a sig label by: |
@kubernetes/sig-cli-feature-requests |
@fgrzadkowski I'm working on a new command |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
There is no documentation about what the exit status of the command means. It seem that the exit status is 0 if there are no changes and 1 if there are changes. But without explicit documentation I am afraid to rely on this undocumented behaviour and it breaking in the future. |
@gjcarneiro I agree that this behavior should be documented (and tested if it isn't already), but I'd like to point out that this is how the linux |
Correct, but we still should document that none-the-less. Thanks for the interest. |
kubernetes/kubectl#707 was created to improve the exit code behaviour, hopefully this will result in some documentation as well. |
/wg apply |
It'd be great if user could diff current configuration with the one in a file. I imagine output to be a regular smart diff of JSON files (ignoring version, status etc).
The text was updated successfully, but these errors were encountered: