age-keygen -o keys.txt
macOS
mkdir -p "$HOME/Library/Application Support/sops/age"
mv keys.txt "$HOME/Library/Application Support/sops/age"
Linux
mkdir -p "$XDG_CONFIG_HOME/sops/age"
mv keys.txt"$XDG_CONFIG_HOME/sops/age"
mv keys.txt
sops -e some-secret.yaml > some-secret.enc.yaml
ksops.yaml
apiVersion: viaduct.ai/v1
kind: ksops
metadata:
name: ksops
annotations:
config.kubernetes.io/function: |
exec:
path: ksops
files:
- ./secrets/some-secret.enc.yaml
kubectl create secret generic sops-age --namespace=argocd --from-file="$HOME/Library/Application Support/sops/age/keys.txt"
kubectl create ns argocd
kustomize build . --enable-alpha-plugins --enable-exec --enable-helm | kubectl apply -n argocd -f -