Skip to content

Set TLS status condition when resource version is unchanged#68

Merged
notandy merged 1 commit intomainfrom
set-tls-status-if-certificate-unchanged
Mar 11, 2026
Merged

Set TLS status condition when resource version is unchanged#68
notandy merged 1 commit intomainfrom
set-tls-status-if-certificate-unchanged

Conversation

@notandy
Copy link
Contributor

@notandy notandy commented Mar 10, 2026

Ensure the TLSCertificateInstalled status condition is always set to Ready
when the Secret's ResourceVersion matches the last processed version. This
provides consistent status reporting even when no certificate update is needed.

Also adds comprehensive unit tests covering:

  • Status condition set when resource version unchanged
  • Reconciliation skipping when InstallCertificate is false
  • Error handling for missing secrets and hypervisors
  • Version difference detection logic

Fixes nova-issues #528

Ensure the TLSCertificateInstalled status condition is always set to Ready
when the Secret's ResourceVersion matches the last processed version. This
provides consistent status reporting even when no certificate update is needed.

Also adds comprehensive unit tests covering:
- Status condition set when resource version unchanged
- Reconciliation skipping when InstallCertificate is false
- Error handling for missing secrets and hypervisors
- Version difference detection logic
@notandy notandy requested review from fwiesel and mchristianl March 10, 2026 19:19
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/kvm-node-agent/internal/controller 57.29% (+10.94%) 🎉

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/kvm-node-agent/internal/controller/secret_controller.go 38.46% (+38.46%) 52 20 (+20) 32 (-20) 🌟

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/cobaltcore-dev/kvm-node-agent/internal/controller/secret_controller_test.go

@notandy notandy merged commit 7025171 into main Mar 11, 2026
6 checks passed
@notandy notandy deleted the set-tls-status-if-certificate-unchanged branch March 11, 2026 13:34
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.

3 participants