[v1.38] Add labels and annotations to TLS secrets for discoverability#4508
Merged
rene-dekker merged 10 commits intotigera:release-v1.38from Mar 11, 2026
Merged
Conversation
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>
…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>
* Fix flaky certificatemanager test and upload CI logs Compare certificate PEM bytes instead of full KeyPair objects in equality assertions. reflect.DeepEqual on *rsa.PrivateKey is non-deterministic because internal big.Int representation can differ after deserialization. Also tee UT/FV output to log files and upload them as Semaphore artifacts. * Update generated files
83bd145 to
bb600ce
Compare
caseydavenport
approved these changes
Mar 11, 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.
Cherry-pick history
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: