Skip to content

Fix deprecated ObjectReference usage in cert-manager#77

Merged
notandy merged 1 commit intomainfrom
fix/deprecation-issuer-reference
Apr 24, 2026
Merged

Fix deprecated ObjectReference usage in cert-manager#77
notandy merged 1 commit intomainfrom
fix/deprecation-issuer-reference

Conversation

@notandy
Copy link
Copy Markdown
Contributor

@notandy notandy commented Apr 24, 2026

Summary

  • Replace v1.ObjectReference with v1.IssuerReference in certificate issuer configuration
  • Resolves staticcheck SA1019 deprecation warning

Test plan

  • make check passes (lint + tests)

Summary by CodeRabbit

  • Bug Fixes
    • Corrected certificate issuer reference configuration to ensure proper compatibility with certificate management systems.

Replace v1.ObjectReference with v1.IssuerReference to resolve
staticcheck SA1019 deprecation warning.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a237e955-c98c-42cb-976e-170be5a15103

📥 Commits

Reviewing files that changed from the base of the PR and between 8c7c66d and 64aebb6.

📒 Files selected for processing (1)
  • internal/certificates/manage_libvirt.go

📝 Walkthrough

Walkthrough

A type reference in the certificate issuer configuration has been updated from v1.ObjectReference to v1.IssuerReference in the EnsureCertificate function, while maintaining the same underlying values for Name, Kind, and Group sourced from configuration.

Changes

Cohort / File(s) Summary
Certificate Issuer Type Update
internal/certificates/manage_libvirt.go
Updated Spec.IssuerRef assignment to use the correct v1.IssuerReference type instead of v1.ObjectReference, aligning with cert-manager's type expectations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A tiny hop, a type refined,
IssuerReference on its mind,
The cert-manager nods with glee,
One line changed, yet perfectly,
Precision hops through our decree! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing deprecated ObjectReference with IssuerReference in cert-manager configuration.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deprecation-issuer-reference

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/kvm-node-agent/internal/certificates 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/kvm-node-agent/internal/certificates/manage_libvirt.go 0.00% (ø) 52 0 52

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.

@notandy notandy merged commit 9fe06a8 into main Apr 24, 2026
7 checks passed
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.

2 participants