Add --enable-annotations flag to allow custom annotations on generated Secrets #229
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.
✨ Summary
The use of secret annotations has been discussed in several opened and closed issues. Some users require them(e.g, for ArgoCD), while others do not(they believe propagating annotations can be dangerous). As a result, the annotation has been removed in a previous commit .
In our use case, secret annotations are necessary because the Reflector depends on them to replicate secrets across namespaces.
This pull request introduces a new feature that allows the operator to optionally add custom annotations to the Kubernetes secrets it manages. This is controlled via a new
--enable-annotationsflag. It is disabled by default and the annotations are only added when the flag is enabled.Feature: Optional Annotations for Managed Secrets
--enable-annotationsflag to the command-line interface, allowing operators to specify whether managed resources should include custom annotations.Fix
🔗 Resolves:
#144
#178
#114
✅ Checklist
🕵️ Review Notes &⚠️ Risks
I've tested in our real development environment and testing environment. it worked as expected.