From 49a4c19cc717fbe18d843b6097d9c02095e9c49d Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sun, 21 Jan 2024 19:00:31 -0500 Subject: [PATCH] feat: template the sops configuration file Signed-off-by: Devin Buhl --- bootstrap/templates/.sops.yaml.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap/templates/.sops.yaml.j2 b/bootstrap/templates/.sops.yaml.j2 index c44f9bad..f3e32435 100644 --- a/bootstrap/templates/.sops.yaml.j2 +++ b/bootstrap/templates/.sops.yaml.j2 @@ -1,16 +1,20 @@ --- creation_rules: + #% if bootstrap_distribution == "talos" %# - # IMPORTANT: This rule MUST be above the others path_regex: talos/.*\.sops\.ya?ml key_groups: - age: - "#{ bootstrap_age_public_key }#" + #% endif %# - path_regex: kubernetes/.*\.sops\.ya?ml encrypted_regex: "^(data|stringData)$" key_groups: - age: - "#{ bootstrap_age_public_key }#" + #% if bootstrap_distribution in ['k0s', 'k3s'] %# - path_regex: ansible/.*\.sops\.ya?ml key_groups: - age: - "#{ bootstrap_age_public_key }#" + #% endif %#