Repository navigation
controller: dynamically detect new, updated, and deleted sealing key secrets - #2034
Merged
alvneiayu merged 1 commit intoSep 16, 2026
Merged
Conversation
alvneiayu
previously approved these changes
Aug 27, 2026
Collaborator
|
thanks a lot @VedantMadane for your contribution. Amazing catch. |
Collaborator
|
there are building problems 😅 |
VedantMadane
force-pushed
the
fix-1819-detect-key-secret-updates
branch
from
September 10, 2026 13:46
4686833 to
3967840
Compare
Contributor
Author
|
Rebased on main and resolved merge conflicts / build issues with the latest client-go changes. All unit tests (go test ./...) are passing. |
…secrets (bitnami#1819) - Add UpdateFunc and DeleteFunc to watchKeySecrets event handler so the controller detects new, updated, or relabeled sealing keys without requiring a pod restart. - Add unregisterKey to KeyRegistry to safely remove deleted keys and recompute mostRecentKey. - Update HasSynced to include kInformer. - Fix registryNewKeyWithSecret to return errors instead of proceeding on failed key reads. - Add unit tests for dynamic key secret detection and key unregistration. Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
VedantMadane
force-pushed
the
fix-1819-detect-key-secret-updates
branch
from
September 15, 2026 08:30
3967840 to
ee413a5
Compare
alvneiayu
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1819.
When users manually create, update, or relabel sealing key secrets (e.g., secrets with \sealedsecrets.bitnami.com/sealed-secrets-key: active), the controller's key secrets informer (\watchKeySecrets) previously only had an \AddFunc\ handler.
This meant:
egistryNewKeyWithSecret\ logged errors on failed key reads but did not return immediately, leading to potential slice indexing panics on empty cert slices.
Changes
egistryNewKeyWithSecret\ on read failures.
Checklist