Files
Go.Rig-Operator/deploy/rig-operator/misc/patch-default-sa
2026-01-15 09:58:01 +00:00

12 lines
349 B
Bash
Executable File

#!/bin/sh
# Copy script into /etc/cron.daily/
# Make it executable chmod 0755
# TODO: Update path to actual kubeconfig
export KUBECONFIG=/home/rancher/.kube/config
for n in $(kubectl get namespaces -A -o=jsonpath="{.items[*]['metadata.name']}"); do
kubectl patch serviceaccount default -p '{"automountServiceAccountToken": false}' -n $n
done