Add labels and annotations to TLS secrets for discoverability#4479
Open
rene-dekker wants to merge 7 commits intotigera:masterfrom
Open
Add labels and annotations to TLS secrets for discoverability#4479rene-dekker wants to merge 7 commits intotigera:masterfrom
rene-dekker wants to merge 7 commits intotigera:masterfrom
Conversation
f7ea0a4 to
83614db
Compare
Surface certificate metadata (issuer, expiry, DNS SANs, IP SANs) as annotations and add a signer label on TLS secrets produced by Secret() and CreateSelfSignedSecret(). Use certificates.operator.tigera.io prefix for all cert metadata. Exclude certificates.operator.tigera.io keys from MergeMaps to prevent stale operator state from overwriting cluster state. Add unit tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display the Degraded condition's message when running `kubectl get tigerastatus`, making it easier to see error details at a glance without needing to describe the resource. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
KeyPairInterface now exposes a Warnings() method that returns a message when a BYO certificate is expiring within 30 days. StatusManager gains SetWarning/ClearWarning methods that append warning text to the Available condition message in TigeraStatus. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Check Warnings() on all keypairs obtained during reconciliation (typha, node, nodePrometheus, kubeController) and propagate them to the status manager so they appear in `kubectl get tigerastatus`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ensures warnings are cleared even when a keypair becomes nil (e.g., Enterprise-only secrets on a Calico install), preventing stale warnings from lingering in TigeraStatus. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add SetWarning/ClearWarning calls to 9 additional controllers (apiserver, authentication, compliance, intrusiondetection, logcollector, manager, monitor, packetcapture, policyrecommendation) and refactor status.go to use availableMessage() consistently across all condition types. Fix keypair_test.go warning message assertion to match implementation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
caseydavenport
left a comment
There was a problem hiding this comment.
Looks great, just a few comments / thoughts from me so far.
…Managed - Add CheckKeyPairWarnings() helper in certificatemanagement package to deduplicate the warning check loop across all controllers - Add WarningReporter interface to avoid circular dependency with status pkg - Extract isOperatorManaged() helper in MergeMaps to consolidate operator annotation filtering (covers all operator.tigera.io annotations) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Surface certificate metadata (issuer, expiry, DNS SANs, IP SANs) as annotations and add filtering labels (secret-type, signer) on TLS secrets produced by Secret() and CreateSelfSignedSecret().
This allows filtering secrets by secret type and /or issuer. It allows us to quickly see the signer, expiry and other metadata using describe, it can really speed up troubleshooting certificate misconfigurations and other issues.
This is now possible, which would be very helpful to our users:
The output of TigeraStatus will now look like this: