1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00
external-secrets/docs/snippets/azkv-datafrom-external-secret.yaml

31 lines
809 B
YAML
Raw Normal View History

2022-04-28 08:29:34 +00:00
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: all-secrets
2022-04-28 08:29:34 +00:00
spec:
refreshInterval: 1h # rate ESO pulls Azure Key Vault
2022-04-28 08:29:34 +00:00
secretStoreRef:
kind: SecretStore
name: azure-store # name of the SecretStore (or kind specified)
2022-04-28 08:29:34 +00:00
target:
name: all-secrets # name of the k8s Secret to be created
2022-04-28 08:29:34 +00:00
creationPolicy: Owner
dataFrom:
# find all secrets starting with dev-
2022-04-28 08:29:34 +00:00
- find:
name:
regexp: "^dev"
# find all secrets with tags
2022-04-28 08:29:34 +00:00
- find:
tags:
environment: dev
# extract data from a json value
- extract:
key: database-credentials
# fetch tags from `database-credentials`
# and store them as individual keys in a secret
- extract:
key: database-credentials
2022-04-28 08:29:34 +00:00
metadataPolicy: Fetch