Skip to content

Fix/controller runtime api update#449

Open
pshickeydev wants to merge 1 commit into
openshift:masterfrom
pshickeydev:fix/controller-runtime-api-update
Open

Fix/controller runtime api update#449
pshickeydev wants to merge 1 commit into
openshift:masterfrom
pshickeydev:fix/controller-runtime-api-update

Conversation

@pshickeydev

@pshickeydev pshickeydev commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • Fix build failure caused by controller-runtime v0.24 API changes introduced in PR fix(deps): update gomod dependencies #445
  • Replace removed MetricsBindAddress and Port fields in ctrl.Options with their v0.19+ replacements: Metrics (metricsserver.Options) and WebhookServer (webhook.NewServer)

Context

Renovate PR #445 bumped sigs.k8s.io/controller-runtime from v0.15 to v0.24.1. This upgrade removed two fields from ctrl.Options that main.go was using:

./main.go:89:3: unknown field MetricsBindAddress in struct literal of type controllerruntime.Options
./main.go:90:3: unknown field Port in struct literal of type controllerruntime.Options

All four CI checks (images, test, coverage, lint) fail with these compile errors.

No CVEs or security advisories are associated with this controller-runtime upgrade — it is a routine dependency freshness bump.

Changes

main.go — 4 lines changed:

  • Added imports for sigs.k8s.io/controller-runtime/pkg/metrics/server and sigs.k8s.io/controller-runtime/pkg/webhook
  • Replaced MetricsBindAddress: metricsAddr with Metrics: metricsserver.Options{BindAddress: metricsAddr}
  • Replaced Port: 9443 with WebhookServer: webhook.NewServer(webhook.Options{Port: 9443})

Behavior is identical — same bind address, same port, same defaults.

Test plan

  • go build ./... passes
  • go vet ./... clean
  • go test ./... all tests pass
  • CI checks pass on PR

Summary by CodeRabbit

  • Chores
    • Updated Go toolchain and refreshed dependency versions (direct and transitive) to newer releases for improved compatibility and ongoing supportability.
    • Updated controller manager configuration for the metrics and webhook servers to use the latest supported setup patterns, aligning runtime behavior with current tooling expectations.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@pshickeydev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 682f7f60-ed6a-4240-bb2e-22caf8d63af7

📥 Commits

Reviewing files that changed from the base of the PR and between 76233e7 and 1a32209.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod
  • main.go

Walkthrough

The PR bumps the Go toolchain, refreshes go.mod dependency and replace pins, and updates main.go to use newer controller-runtime metrics and webhook server option structs.

Changes

Runtime and manager wiring refresh

Layer / File(s) Summary
Go module updates
go.mod
The Go directive, direct and indirect dependency versions, and replace directives are updated across go.mod.
Manager options wiring
main.go
ctrl.NewManager now uses structured metrics and webhook server options, with the needed imports added.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: geowa4


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error fips.go's init() does fmt.Println, and Makefile sets FIPS_ENABLED=true, so the main binary emits non-JSON stdout on startup. Send that message to stderr or remove it (e.g. fmt.Fprintln(os.Stderr, ...)), or otherwise ensure no process-level stdout writes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the core change: updating controller-runtime APIs to fix a build issue.
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.
Stable And Deterministic Test Names ✅ Passed All Ginkgo titles in test/e2e are static strings; no It/Describe/Context/When uses dynamic values or generated names.
Test Structure And Quality ✅ Passed PASS: The PR only changes go.mod, go.sum, and main.go; no Ginkgo test files or test logic were modified, so the checklist is not applicable.
Microshift Test Compatibility ✅ Passed Diff only changes go.mod, go.sum, and main.go; no new Ginkgo e2e tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The Ginkgo e2e tests only verify resources/config and make no node/topology/HA assumptions; pod-ready checks are commented out.
Topology-Aware Scheduling Compatibility ✅ Passed Only controller-runtime manager option wiring changed; no node selectors, affinity, spread constraints, replica logic, or topology checks were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo/e2e tests were added; the PR only changes main.go/go.mod/go.sum and contains no IPv4 or external-network test assumptions.
No-Weak-Crypto ✅ Passed main.go only updates controller-runtime options; no weak-crypto algorithms, custom crypto, or new secret/token comparisons were added.
Container-Privileges ✅ Passed PASS: The PR only updates go.mod and main.go; main.go adds metrics/webhook wiring and no changed file introduces privileged, hostPID, hostNetwork, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed PR only updates controller-runtime wiring in main.go and dependency versions; no new logs or sensitive values appear in the diff.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@openshift-ci openshift-ci Bot requested review from aliceh and tnierman June 25, 2026 17:28
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pshickeydev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2026
@codecov-commenter

codecov-commenter commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.44%. Comparing base (b93db51) to head (1a32209).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
main.go 0.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #449   +/-   ##
=======================================
  Coverage   72.44%   72.44%           
=======================================
  Files          11       11           
  Lines         704      704           
=======================================
  Hits          510      510           
  Misses        173      173           
  Partials       21       21           
Files with missing lines Coverage Δ
main.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pshickeydev

Copy link
Copy Markdown
Author

/retest

@pshickeydev

Copy link
Copy Markdown
Author

/retest-required

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2026
@pshickeydev pshickeydev force-pushed the fix/controller-runtime-api-update branch from d127aa6 to 7cc12e6 Compare July 1, 2026 17:03
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 1, 2026
@pshickeydev

Copy link
Copy Markdown
Author

/test lint

@pshickeydev pshickeydev force-pushed the fix/controller-runtime-api-update branch from 7cc12e6 to 76233e7 Compare July 1, 2026 19:11
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 1, 2026
Update sigs.k8s.io/controller-runtime from v0.15.0 to v0.24.1 along
with its required k8s.io ecosystem dependencies. Replace removed
MetricsBindAddress and Port fields in ctrl.Options with the
replacement Metrics and WebhookServer fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pshickeydev pshickeydev force-pushed the fix/controller-runtime-api-update branch from 76233e7 to 1a32209 Compare July 1, 2026 19:15
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 1, 2026
@pshickeydev

Copy link
Copy Markdown
Author

/test lint

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@pshickeydev: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants