Skip to content

Best practice: Ensure timely secret sync during application upgrades #1322

Closed Answered by Xitric
Xitric asked this question in Q&A
Discussion options

You must be logged in to vote

For anyone else who happens to come across this looking for an answer like we did, here is the solution we ended up implementing.

We include our application version in the names of our SecretProviderClasses as well as our Secret resources:

apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
  name: my-app-secret-1.0.0
spec:
  secretObjects:
    - secretName: my-app-secret-1.0.0
      type: Opaque
      data:
        - ...

During an application upgrade, let's say from v1 to v2, the SecretProviderClass named my-app-secret-1.0.0 is deleted and a new SecretProviderClass named my-app-secret-2.0.0 is created in its place.

However, the old Secret my-app-secret-1.0.0 is …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Xitric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant