full-pushsecret.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {% raw %}
  2. apiVersion: external-secrets.io/v1alpha1
  3. kind: PushSecret
  4. metadata:
  5. name: pushsecret-example # Customisable
  6. namespace: default # Same of the SecretStores
  7. spec:
  8. deletionPolicy: Delete # the provider' secret will be deleted if the PushSecret is deleted
  9. refreshInterval: 10s # Refresh interval for which push secret will reconcile
  10. secretStoreRefs: # A list of secret stores to push secrets to
  11. - name: aws-parameterstore
  12. kind: SecretStore
  13. selector:
  14. secret:
  15. name: pokedex-credentials # Source Kubernetes secret to be pushed
  16. template:
  17. metadata:
  18. annotations: { }
  19. labels: { }
  20. data:
  21. best-pokemon: "{{ .best-pokemon | toString | upper }} is the really best!"
  22. # Uses an existing template from configmap
  23. # Secret is fetched, merged and templated within the referenced configMap data
  24. # It does not update the configmap, it creates a secret with: data["alertmanager.yml"] = ...result...
  25. templateFrom:
  26. - configMap:
  27. name: application-config-tmpl
  28. items:
  29. - key: config.yml
  30. data:
  31. - match:
  32. secretKey: best-pokemon # Source Kubernetes secret key to be pushed
  33. remoteRef:
  34. remoteKey: my-first-parameter # Remote reference (where the secret is going to be pushed)
  35. {% endraw %}