output formating
This commit is contained in:
parent
1ee07edb31
commit
8df6097a73
1 changed files with 4 additions and 2 deletions
|
|
@ -46,11 +46,12 @@ in
|
||||||
MANIFESTS_DIR="/var/lib/rancher/k3s/server/manifests"
|
MANIFESTS_DIR="/var/lib/rancher/k3s/server/manifests"
|
||||||
NIX_MANIFESTS="${builtins.concatStringsSep " " (builtins.attrNames config.services.k3s.manifests)}"
|
NIX_MANIFESTS="${builtins.concatStringsSep " " (builtins.attrNames config.services.k3s.manifests)}"
|
||||||
DEFAULT_MANIFESTS="ccm coredns local-storage rolebindings runtimes traefik"
|
DEFAULT_MANIFESTS="ccm coredns local-storage rolebindings runtimes traefik"
|
||||||
|
echo "---"
|
||||||
echo "Cleaning up K3s manifests"
|
echo "Cleaning up K3s manifests"
|
||||||
|
echo
|
||||||
|
|
||||||
for file in $MANIFESTS_DIR/*.yaml; do
|
for file in $MANIFESTS_DIR/*.yaml; do
|
||||||
[ -f "$file" ] || echo "not a file"; continue
|
[ -f "$file" ] || continue
|
||||||
name=$(basename "$file" .yaml)
|
name=$(basename "$file" .yaml)
|
||||||
if ! (echo "$NIX_MANIFESTS $DEFAULT_MANIFESTS" | grep -qw $name); then
|
if ! (echo "$NIX_MANIFESTS $DEFAULT_MANIFESTS" | grep -qw $name); then
|
||||||
echo "Stale manifest found, deleting $name.yaml"
|
echo "Stale manifest found, deleting $name.yaml"
|
||||||
|
|
@ -60,6 +61,7 @@ in
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
echo
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue