azkv-external-secret.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. apiVersion: external-secrets.io/v1alpha1
  2. kind: ExternalSecret
  3. metadata:
  4. name: example-external-secret
  5. spec:
  6. refreshInterval: 1h # rate SecretManager pulls Azure
  7. secretStoreRef:
  8. kind: SecretStore
  9. name: example-secret-store # name of the SecretStore (or kind specified)
  10. target:
  11. name: secret-to-be-created # name of the k8s Secret to be created
  12. creationPolicy: Owner
  13. data:
  14. - secretKey: dev-secret-test # name of the key to be created in the secret object
  15. remoteRef:
  16. key: dev-secret-test #name of the SECRET in the Azure KV (no prefix => SECRET)
  17. - secretKey: dev-another-secret-test # name of the key to be created in the secret object
  18. remoteRef:
  19. key: secret/dev-secret-test #type and name of secret in the Azure KV
  20. - secretKey: dev-cert-test # name of the key to be created in the secret object
  21. remoteRef:
  22. key: cert/dev-cert-test #type/name of certificate in the Azure KV
  23. #raw value will be returned , use templating features for data processing
  24. - secretKey: dev-key-test # name of the key to be created in the secret object
  25. remoteRef:
  26. key: key/dev-key-test #type/name of the public key in the Azure KV
  27. # dataFrom , return ALL secrets saved in the referenced secretStore
  28. # each secret name in the KV will be used as the secret key in the SECRET k8s target object
  29. dataFrom:
  30. - name: "*"