Files
kube/checksync.sh

25 lines
648 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
kubectl g ns -o name | cut -d/ -f2- | grep -v \
-e calico-apiserver -e calico-system `# by tigera-operator` \
-e kube-node-lease -e kube-public -e node-feature-discovery `# generated by kube` \
| sort > ns.swp
find -mindepth 1 -maxdepth 1 -type d | cut -d/ -f2- | grep -v -e _disabled -e .git | sort > dirs.swp
ls argocd/applications | exteat | grep -v \
-e passmower-members \
-e argocd-applications \
| sort > argo.swp # exteat from github.com/jtagcat/jtagcat
echo 'ns <-> dirs:'
diff ns.swp dirs.swp || true
echo
echo 'dirs <-> argo:'
diff dirs.swp argo.swp || true
rm ns.swp dirs.swp argo.swp