Skip to content
Snippets Groups Projects
2022-04-11-apply-last-np.sh 290 B
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
#!/bin/bash -eux

for NS in `kubectl get ns --no-headers -o custom-columns=":metadata.name" -l libre.sh/scope=user`; do
  kubctl -n ${NS} delete networkpolicies allow-from-ingress-namespace
  cat "/root/domains/common/networkpolicies.yml" | envsubst '$NS' | kubectl -n ${NS} diff -f -
done