vault-pushsecret.yaml 814 B

1234567891011121314151617181920212223242526
  1. apiVersion: v1
  2. kind: Secret
  3. metadata:
  4. name: source-secret
  5. namespace: default
  6. stringData:
  7. source-key: "{\"foo\":\"bar\"}" # Needs to be a JSON
  8. ---
  9. apiVersion: external-secrets.io/v1alpha1
  10. kind: PushSecret
  11. metadata:
  12. name: pushsecret-example
  13. namespace: default
  14. spec:
  15. refreshInterval: 10s # Refresh interval for which push secret will reconcile
  16. secretStoreRefs: # A list of secret stores to push secrets to
  17. - name: vault-secretstore
  18. kind: SecretStore
  19. selector:
  20. secret:
  21. name: source-secret # Source Kubernetes secret to be pushed
  22. data:
  23. - match:
  24. secretKey: source-key # Source Kubernetes secret key containing the vault secret (in JSON format)
  25. remoteRef:
  26. remoteKey: vault/secret # path to vault secret. This path is appended with the vault-store path.