azkv-pushsecret-secret.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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
  12. namespace: default
  13. spec:
  14. refreshInterval: 1h0m0s # Refresh interval for which push secret will reconcile
  15. deletionPolicy: Delete
  16. secretStoreRefs: # A list of secret stores to push secrets to
  17. - name: azure-store
  18. kind: SecretStore
  19. selector:
  20. secret:
  21. name: source-secret # Source Kubernetes secret to be pushed
  22. data:
  23. - match:
  24. secretKey: source-key # Source Kubernetes secret key containing the secret
  25. remoteRef:
  26. remoteKey: my-azkv-secret-name
  27. metadata:
  28. apiVersion: kubernetes.external-secrets.io/v1alpha1
  29. kind: PushSecretMetadata
  30. spec:
  31. expirationDate: "2024-12-31T23:59:59Z" # Expiration date for the secret in Azure Key Vault
  32. tags: # Tags to be added to the secret in Azure Key Vault
  33. Content-Type: application/json