Last active
February 19, 2020 23:05
-
-
Save rms1000watt/786ce6c1c29598f3e8e819aff4642105 to your computer and use it in GitHub Desktop.
Get diff for helmfile against actual k8s state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Render all the k8s yaml | |
| helmfile -f hello.yml template > ~/Desktop/hello.helmfile.yml | |
| # Diff the new yaml with what's actually deployed | |
| tail -n +2 ~/Desktop/hello.helmfile.yml | kubectl diff -f - > ~/Desktop/hello.helmfile.diff | |
| # If diff is acceptable, run k8s | |
| kubectl apply -f ~/Desktop/hello.helmfile.yml | |
| # Then you can do a helmfile apply on top of it | |
| helmfile -f hello.yml apply |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment