aws-sm-push-secret-with-metadata.yaml 1.2 KB

1234567891011121314151617181920212223242526272829
  1. apiVersion: external-secrets.io/v1alpha1
  2. kind: PushSecret
  3. metadata:
  4. name: pushsecret-example # Customisable
  5. namespace: teamb # Same of the SecretStores
  6. spec:
  7. deletionPolicy: Delete
  8. refreshInterval: 1h # Refresh interval for which push secret will reconcile
  9. secretStoreRefs: # A list of secret stores to push secrets to
  10. - name: teamb-secret-store
  11. kind: SecretStore
  12. selector:
  13. secret:
  14. name: my-secret # Source Kubernetes secret to be pushed
  15. data:
  16. - match:
  17. secretKey: key1 # Source Kubernetes secret key to be pushed
  18. remoteRef:
  19. remoteKey: teamb-my-first-parameter-3 # Remote reference (where the secret is going to be pushed)
  20. metadata:
  21. apiVersion: kubernetes.external-secrets.io/v1alpha1
  22. kind: PushSecretMetadata
  23. spec:
  24. kmsKeyID: bb123123-b2b0-4f60-ac3a-44a13f0e6b6c # When not set, default to alias/aws/secretsmanager
  25. secretPushFormat: string # When not set, default to binary
  26. description: "secret 'managed-by:secret-manager' from 'secret-store:teamb-secret-store'"
  27. tags:
  28. secret-store: teamb-secret-store
  29. refresh-interval: 1h