imgpkg icon indicating copy to clipboard operation
imgpkg copied to clipboard

Find a way to show configuration files diff between different versions of an image

Open jessehu opened this issue 5 years ago • 4 comments

When storing configuration files in Git, it's easy to show diff between different versions. When storing configuration files in a docker image, we will need an imgpkg sub command to show the diff (which is similar to the --diff-changes of kapp)


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this bug fixed as soon as possible" 👎 "There are more important bugs to focus on right now"

We are also happy to receive and review Pull Requests if you want to help fix this issue.

jessehu avatar Apr 15 '20 03:04 jessehu

that's an interesting suggestion. may be something like this: imgpkg diff --images your-user/app1-config:0.1.1...your-user/app1-config:0.1.5 which would use typical differs to show content differences. might be even useful to have similar semantics as git for ranges (ie head, etc.)

cppforlife avatar Apr 15 '20 14:04 cppforlife

Thanks. Sound good! imgpkg will need to pull the two images, mount the data volume to local dir and run diff to get the result. Another format could be imgpkg diff --image your-user/app1-config --tags 0.1.1:0.1.5, as we probably won't compare different images but only different tags of the same image.

jessehu avatar Apr 15 '20 14:04 jessehu

as we probably won't compare different images but only different tags of the same image.

i can imagine someone trying to diff two separate images if they "augmented" one with changes from the other and now trying to determine what's changed. but your point still stands, common case is a single image.

cppforlife avatar Apr 16 '20 15:04 cppforlife

Got your pionts :D

jessehu avatar Apr 17 '20 00:04 jessehu