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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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: 1h # 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. secretType: SecureString
  24. kmsKeyID: bb123123-b2b0-4f60-ac3a-44a13f0e6b6c
  25. tier:
  26. type: Advanced # default is Standard
  27. policies:
  28. - type: "Expiration"
  29. version: "1.0"
  30. attributes:
  31. timestamp: "2024-12-02T21:34:33.000Z"
  32. - type: "ExpirationNotification"
  33. version: "1.0"
  34. attributes:
  35. before: "2"
  36. unit: "Days"
  37. - type: "ExpirationNotification"
  38. version: "1.0"
  39. attributes:
  40. before: "30"
  41. unit: "Days"
  42. - type: "NoChangeNotification"
  43. version: "1.0"
  44. attributes:
  45. after: "30"
  46. unit: "Days"