From 4fa924eeb5b519108077af9b010071624e9c810a Mon Sep 17 00:00:00 2001 From: Rami Daghlawi Date: Sat, 2 Dec 2023 13:09:48 +0100 Subject: [PATCH] using key lookup instead, ignore argo key --- src/assets/diff.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/assets/diff.sh b/src/assets/diff.sh index bad73af..05f72ee 100755 --- a/src/assets/diff.sh +++ b/src/assets/diff.sh @@ -19,7 +19,8 @@ find "$@" -type f -exec yq e -i 'del( .webhooks, .data, .spec.caBundle, - .metadata.annotations == with_entries(select(.key == "kubectl.kubernetes.io/last-applied-configuration")) + .metadata.annotations["kubectl.kubernetes.io/last-applied-configuration"], + .metadata.annotations["argocd.argoproj.io/tracking-id"] )' {} \; diff "${DIFF_ARGS[@]}" "$@" | awk '!/^diff/ {if ($1 ~ /(---|\+\+\+)/) {print $1, $2} else {print $0}}'