k8wiz
Flux CD
Hard
Troubleshooting

A .sops.yaml has a rule with path_regex: .*\.yaml$ followed by a rule with path_regex: ^prod/.*\.yaml$. Which rule applies when you encrypt prod/db.yaml?

Select your answer:

Show answer and explanation

Answer: The first rule, because sops uses the first match

Explanation

sops checks creation_rules in order against the file path relative to the directory of .sops.yaml and stops at the first rule that matches. A broad rule at the top shadows everything below it, so specific rules have to come first.

Read more about Flux CD