1password-push-secret.yaml 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. apiVersion: v1
  2. kind: Secret
  3. metadata:
  4. name: source-secret
  5. stringData:
  6. source-key: "my-secret"
  7. ---
  8. apiVersion: external-secrets.io/v1alpha1
  9. kind: PushSecret
  10. metadata:
  11. name: pushsecret-example # Customisable
  12. spec:
  13. deletionPolicy: Delete
  14. refreshInterval: 1h
  15. secretStoreRefs:
  16. - name: 1password
  17. kind: ClusterSecretStore
  18. selector:
  19. secret:
  20. name: source-secret # Source Kubernetes secret
  21. data:
  22. - match:
  23. secretKey: source-key # Source Kubernetes secret key to be pushed
  24. remoteRef:
  25. remoteKey: 1pw-secret-name # 1Password item/secret name
  26. property: password # (Optional) 1Password field type, default password
  27. metadata:
  28. apiVersion: kubernetes.external-secrets.io/v1alpha1
  29. kind: PushSecretMetadata
  30. spec:
  31. vault: staging # Optional the vault the secret is going to be pushed to, defaults to the first defined vault in the (Cluster)SecretStore
  32. tags: ["tag1", "tag2"] # Optional metadata to be pushed with the secret