aws-pm-push-secret-with-metadata.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. apiVersion: external-secrets.io/v1alpha1
  2. kind: PushSecret
  3. metadata:
  4. name: pushsecret-example # Customisable
  5. namespace: default # Same of the SecretStores
  6. spec:
  7. deletionPolicy: Delete # the provider' secret will be deleted if the PushSecret is deleted
  8. refreshInterval: 1h0m0s # Refresh interval for which push secret will reconcile
  9. secretStoreRefs: # A list of secret stores to push secrets to
  10. - name: aws-parameterstore
  11. kind: SecretStore
  12. selector:
  13. secret:
  14. name: pokedex-credentials # Source Kubernetes secret to be pushed
  15. data:
  16. - match:
  17. remoteRef:
  18. remoteKey: my-first-parameter # Remote reference (where the secret is going to be pushed)
  19. metadata:
  20. apiVersion: kubernetes.external-secrets.io/v1alpha1
  21. kind: PushSecretMetadata
  22. spec:
  23. description: "This is a secret for the API credentials"
  24. secretType: SecureString
  25. kmsKeyID: bb123123-b2b0-4f60-ac3a-44a13f0e6b6c
  26. tier:
  27. type: Advanced # default is Standard
  28. policies:
  29. - type: "Expiration"
  30. version: "1.0"
  31. attributes:
  32. timestamp: "2024-12-02T21:34:33.000Z"
  33. - type: "ExpirationNotification"
  34. version: "1.0"
  35. attributes:
  36. before: "2"
  37. unit: "Days"
  38. - type: "ExpirationNotification"
  39. version: "1.0"
  40. attributes:
  41. before: "30"
  42. unit: "Days"
  43. - type: "NoChangeNotification"
  44. version: "1.0"
  45. attributes:
  46. after: "30"
  47. unit: "Days"
  48. tags:
  49. environment: sandbox
  50. team: pokedex
  51. secret-store: aws-parameterstore
  52. refresh-interval: 1h