Skip to content

Instantly share code, notes, and snippets.

@thikade
Forked from bioshazard/helm-get-objects.sh
Last active March 22, 2023 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thikade/fce2df4201bc3a60d9eb07edf5791387 to your computer and use it in GitHub Desktop.
Save thikade/fce2df4201bc3a60d9eb07edf5791387 to your computer and use it in GitHub Desktop.
List and VERIFY all objects in helm deployment
# helm get manifest $RELEASE_NAME | yq -N eval '[.kind, .metadata.name] | join("/")' - | sort
helm get manifest $RELEASE_NAME | yq -N '[.kind,.metadata.name] | join("/") '| sort | \
while read X; do \
Y=$(kubectl get $X -o name 2>/dev/null); \
test $? -eq 0 && Y="OK " || Y="MISSING"; \
echo "$Y $X"; \
done
# sample output:
MISSING ConfigMap/elastic-7
MISSING DeploymentConfig/elastic-7
OK PersistentVolumeClaim/elastic-7
MISSING Route/elastic-7
MISSING SealedSecret/elastic-7-secured
MISSING Service/elastic-7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment