Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Have kubectl diff use your custom YAML cleaning and comparison logic (github.com/kwentine)
2 points by kwentine 6 months ago | hide | past | favorite
Hi HN, Meet `kdiff` a modest Bash wrapper around `kubectl diff` that allows to conveniently specify cleaning and comparison logic.

One example (many more in the README):

# Arguments after -- are passed to kubectl # Limit the diff to the resource spec, and use dyff kdiff --yq='.spec ' --compare 'dyff between -b' -- -f mypod.yaml

Comes with a "preset" configuration system, that allows to save executables in ~/.config/kdiff and then:

    kdiff --preset clean:dyff -- -f mypod.yaml
I hope the Bash code is readable, a lot of pen-and-papering and thinking during bike rides went into it... after a sobering first vibe-coding attempt that utterly failed.

Cheers HN, thanks for the endless source of inspiration (and distraction ^^)!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: