Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: preserve existing annotations when updating managed secret #1931

Merged

Conversation

minuchi
Copy link
Contributor

@minuchi minuchi commented Jun 8, 2024

Description 📣

This pull request fixes #1930 where the annotations on a managed Kubernetes secret were being reset during the update process. With this change, we ensure that existing annotations are preserved and only the ETag annotation is updated.

  • Fixed the bug where updating the managed secret would reset all annotations. Now, only the ETag annotation is updated, preserving existing annotations.

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Tests 🛠️

  1. Deploy the Kubernetes operator.
  2. Check the annotations on the managed secret before updating.
  3. Trigger an update.
  4. Verify the annotations on the managed secret after the update.

Before the fix:

  • Before update (annotations present)
    before-the-fix-1
  • After update before the fix (annotations reset)
    before-the-fix-2

After the fix:

  • After update with the fix (annotations preserved)
    after-the-fix-1

@minuchi minuchi force-pushed the fix/preserve-annotations-when-updating branch from f0e9220 to 6d40d95 Compare June 8, 2024 16:44
Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice fix

@maidul98 maidul98 merged commit b31d2be into Infisical:main Jun 10, 2024
2 checks passed
@maidul98
Copy link
Collaborator

When this is done https://github.com/Infisical/infisical/actions/runs/9455645624, you can update your values file for helm to use the new image tag.

The new image should be tagged v0.5.3 here https://hub.docker.com/r/infisical/kubernetes-operator/tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Managed kubernetes secret annotations reset during update
2 participants