diff --git a/crates/cuddle-clusters/tests/with_vault_secrets/templates/clusters/some.yaml.jinja2 b/crates/cuddle-clusters/tests/with_vault_secrets/templates/clusters/some.yaml.jinja2 index af46d87..ab1a5d7 100644 --- a/crates/cuddle-clusters/tests/with_vault_secrets/templates/clusters/some.yaml.jinja2 +++ b/crates/cuddle-clusters/tests/with_vault_secrets/templates/clusters/some.yaml.jinja2 @@ -26,13 +26,13 @@ spec: envFrom: - configMapRef: name: {{service_name}}-config - {%- if vars.vault_secret is defined and (vars.vault_secret.secrets | length) > 0 %} + {%- if vars.vault_secret.has_values %} env: {%- for secret in vars.vault_secret.secrets %} - name: {{secret | upper | replace(".", "_") | replace("-", "_") }} valueFrom: secretKeyRef: - name: {{ service_name }}-{{ vars.vault_secret.name }} + name: {{ vars.vault_secret.file_name(service_name) }} key: {{ secret }} {%- endfor %} {%- endif %}