infra/scripts/rekey.sh

16 lines
257 B
Bash
Raw Permalink Normal View History

2024-10-13 15:16:39 -05:00
#!/usr/bin/env bash
2024-11-12 20:02:15 -06:00
shopt -s globstar
2024-10-13 15:16:39 -05:00
SCRIPT_DIR="$(dirname "$0")"
ROOT_DIR="$(realpath "$SCRIPT_DIR/..")"
pushd "$ROOT_DIR" > /dev/null
rekey_dir() {
find $1 | xargs -i sops updatekeys -y {}
}
2024-11-03 21:38:19 -06:00
rekey_dir "secrets/*"
2024-11-12 20:02:15 -06:00
rekey_dir "k8s/**/secrets/*.yaml"