infra/scripts/rekey.sh

16 lines
257 B
Bash
Executable File

#!/usr/bin/env bash
shopt -s globstar
SCRIPT_DIR="$(dirname "$0")"
ROOT_DIR="$(realpath "$SCRIPT_DIR/..")"
pushd "$ROOT_DIR" > /dev/null
rekey_dir() {
find $1 | xargs -i sops updatekeys -y {}
}
rekey_dir "secrets/*"
rekey_dir "k8s/**/secrets/*.yaml"