full-pushsecret.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. updatePolicy: Replace # Policy to overwrite existing secrets in the provider on sync
  9. deletionPolicy: Delete # the provider' secret will be deleted if the PushSecret is deleted
  10. refreshInterval: 10s # Refresh interval for which push secret will reconcile
  11. secretStoreRefs: # A list of secret stores to push secrets to
  12. - name: aws-parameterstore
  13. kind: SecretStore
  14. selector:
  15. secret:
  16. name: pokedex-credentials # Source Kubernetes secret to be pushed
  17. template:
  18. metadata:
  19. annotations: { }
  20. labels: { }
  21. data:
  22. best-pokemon: "{{ .best-pokemon | toString | upper }} is the really best!"
  23. # Uses an existing template from configmap
  24. # Secret is fetched, merged and templated within the referenced configMap data
  25. # It does not update the configmap, it creates a secret with: data["alertmanager.yml"] = ...result...
  26. templateFrom:
  27. - configMap:
  28. name: application-config-tmpl
  29. items:
  30. - key: config.yml
  31. data:
  32. - conversionStrategy: None # Also supports the ReverseUnicode strategy
  33. match:
  34. secretKey: best-pokemon # Source Kubernetes secret key to be pushed
  35. remoteRef:
  36. remoteKey: my-first-parameter # Remote reference (where the secret is going to be pushed)
  37. {% endraw %}