1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00
external-secrets/docs/snippets/azkv-pushsecret-secret.yaml
Daniel R. Dagfinrud 40a698dafd
feat: add ability to push expiration date to secret in azure key vault (#4149)
* feat: add ability to push expiration date of secret to azure key vault with annotation

Signed-off-by: deggja <danieldagfinrud@gmail.com>

* docs: set example annotation on secret in docs

Signed-off-by: deggja <danieldagfinrud@gmail.com>

* test: added test for updating to new expiration date

Signed-off-by: deggja <danieldagfinrud@gmail.com>

* chore: format

Signed-off-by: deggja <danieldagfinrud@gmail.com>

* chore: clean up go.mod

Signed-off-by: deggja <danieldagfinrud@gmail.com>

* feat: add expiration date for secret as field in metadata block in pushsecret

Signed-off-by: deggja <danieldagfinrud@gmail.com>

* extract the metadata from Kubernetes package and put it into its own package

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>

---------

Signed-off-by: deggja <danieldagfinrud@gmail.com>
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
2024-11-26 10:15:40 +01:00

31 lines
No EOL
917 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: source-secret
stringData:
source-key: "my-secret"
---
apiVersion: external-secrets.io/v1alpha1
kind: PushSecret
metadata:
name: pushsecret-example
namespace: default
spec:
refreshInterval: 1h # Refresh interval for which push secret will reconcile
deletionPolicy: Delete
secretStoreRefs: # A list of secret stores to push secrets to
- name: azure-store
kind: SecretStore
selector:
secret:
name: source-secret # Source Kubernetes secret to be pushed
data:
- match:
secretKey: source-key # Source Kubernetes secret key containing the secret
remoteRef:
remoteKey: my-azkv-secret-name
metadata:
apiVersion: kubernetes.external-secrets.io/v1alpha1
kind: PushSecretMetadata
spec:
expirationDate: "2024-12-31T23:59:59Z" # Expiration date for the secret in Azure Key Vault