Skip to content

chore (deps) : update controller-runtime to v0.23.3#1568

Open
rohanKanojia wants to merge 3 commits intodevfile:mainfrom
rohankanojia-forks:pr/update-controller-runtime-0-22-4
Open

chore (deps) : update controller-runtime to v0.23.3#1568
rohanKanojia wants to merge 3 commits intodevfile:mainfrom
rohankanojia-forks:pr/update-controller-runtime-0-22-4

Conversation

@rohanKanojia
Copy link
Copy Markdown
Member

@rohanKanojia rohanKanojia commented Jan 8, 2026

What does this PR do?

This PR updates sigs.k8s.io/controller-runtime from v0.22.1 to v0.23.1, along with corresponding Kubernetes API dependencies to v0.35.0. This is a routine dependency update to ensure the DevWorkspace Operator stays current with the latest stable controller-runtime releases.

What issues does this PR fix or reference?

N/A - This is a routine dependency update for maintenance purposes.

Is it tested? How?

  • Existing unit tests validate compatibility with the updated controller-runtime version
  • The update only modifies go.mod and go.sum files with dependency version changes
  • There is only one breaking change introduced:
    • Existing code of the form builder.WebhookManagedBy(mgr).For(&corev1.Deployment{}) has to be changed to builder.WebhookManagedBy(mgr, &appsv1.Deployment{})

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Summary by CodeRabbit

  • New Features

    • Support numeric taint toleration operators (Lt/Gt) alongside Exists/Equal (requires TaintTolerationComparisonOperators).
    • Added userAnnotations for pod certificate signer configuration to propagate custom metadata.
  • Documentation

    • Clarified that container resizePolicy cannot be set on ephemeral containers; refined volume expansion guidance.
  • Chores

    • Updated module dependencies and webhook registration/configuration.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Jan 8, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Jan 8, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rohanKanojia
Once this PR has been reviewed and has the lgtm label, please assign dkwon17 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@rohanKanojia
Copy link
Copy Markdown
Member Author

/ok-to-test

@rohanKanojia
Copy link
Copy Markdown
Member Author

/retest

@rohanKanojia rohanKanojia force-pushed the pr/update-controller-runtime-0-22-4 branch from a4264d3 to 63ba147 Compare March 4, 2026 05:40
@rohanKanojia rohanKanojia changed the title chore (deps) : update controller-runtime to v0.22.4 chore (deps) : update controller-runtime to v0.23.1 Mar 4, 2026
@rohanKanojia rohanKanojia marked this pull request as ready for review March 4, 2026 11:12
@rohanKanojia rohanKanojia requested a review from tolusha March 4, 2026 13:44
@rohanKanojia rohanKanojia force-pushed the pr/update-controller-runtime-0-22-4 branch from 7f50c28 to c5cca66 Compare March 16, 2026 02:52
@dkwon17
Copy link
Copy Markdown
Collaborator

dkwon17 commented Mar 27, 2026

@rohanKanojia when you have a moment, could you please rebase?

@rohanKanojia rohanKanojia force-pushed the pr/update-controller-runtime-0-22-4 branch from c5cca66 to d254509 Compare March 27, 2026 16:07
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 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: 21523583-aade-4207-81f2-d422719a5317

📥 Commits

Reviewing files that changed from the base of the PR and between d254509 and b7c4562.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (12)
  • deploy/bundle/manifests/controller.devfile.io_devworkspaceoperatorconfigs.yaml
  • deploy/bundle/manifests/controller.devfile.io_devworkspaceroutings.yaml
  • deploy/deployment/kubernetes/combined.yaml
  • deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/deployment/kubernetes/objects/devworkspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/deployment/openshift/combined.yaml
  • deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/deployment/openshift/objects/devworkspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml
  • deploy/templates/crd/bases/controller.devfile.io_devworkspaceroutings.yaml
  • go.mod
  • main.go
✅ Files skipped from review due to trivial changes (2)
  • main.go
  • deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml
🚧 Files skipped from review as they are similar to previous changes (4)
  • deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml
  • go.mod
  • deploy/deployment/kubernetes/combined.yaml
  • deploy/deployment/openshift/combined.yaml

📝 Walkthrough

Walkthrough

Updated multiple CRD and manifest schema descriptions: added Lt/Gt to toleration operator docs (feature-gated), made resizePolicy descriptions explicit about ephemeral containers, removed conditional wording about RecoverVolumeExpansionFailure, added a userAnnotations map to podCertificate signer config, bumped Go module deps, and adjusted webhook registration in main.go.

Changes

Cohort / File(s) Summary
CRD & Manifests (tolerations / resizePolicy / podCertificate)
deploy/bundle/manifests/controller.devfile.io_devworkspaceoperatorconfigs.yaml, deploy/bundle/manifests/controller.devfile.io_devworkspaceroutings.yaml, deploy/deployment/kubernetes/combined.yaml, deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml, deploy/deployment/kubernetes/objects/devworkspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml, deploy/deployment/openshift/combined.yaml, deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml, deploy/deployment/openshift/objects/devworkspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml, deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml, deploy/templates/crd/bases/controller.devfile.io_devworkspaceroutings.yaml
Schema documentation edits: document toleration operator now includes Lt/Gt (numeric, require TaintTolerationComparisonOperators); resizePolicy descriptions converted to multi-line and now state they cannot be set on ephemeral containers; removed conditional reference to RecoverVolumeExpansionFailure in volume expansion guidance; added userAnnotations (object of string) to podCertificate signer config with copying/validation notes.
Go Module
go.mod
Bumped multiple direct and indirect dependencies (k8s.io/*, controller-runtime, testing libs, Prometheus, OpenTelemetry, etc.); removed github.com/pkg/errors indirect; added github.com/Masterminds/semver/v3.
Webhook registration change
main.go
Changed webhook managed registration to pass DevWorkspace types into ctrl.NewWebhookManagedBy(mgr, &dwvX.DevWorkspace{}) for both v1alpha1 and v1alpha2.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰
Manifests sprout clearer code and line,
Numbers now compare where taints align,
Ephemeral rules politely state,
Annotations ride through gate,
Webhooks snug, dependencies fine.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
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.
Title check ❓ Inconclusive The title mentions updating controller-runtime to v0.23.3, but the PR objectives indicate the actual update is to v0.23.1, and the changeset includes broader updates beyond just controller-runtime (Kubernetes dependencies, CRD schema updates, webhook registration changes). The title is partially related but incomplete. Clarify whether the title should reflect v0.23.3 or v0.23.1, and consider whether it adequately represents all significant changes including CRD documentation updates and webhook registration modifications.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ 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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@go.mod`:
- Line 99: Update the pinned vulnerable modules in go.mod: bump
go.opentelemetry.io/otel/sdk from v1.36.0 to at least v1.40.0 and
google.golang.org/grpc to at least v1.79.3 (these are the unique module names to
change), then run module resolution to refresh the go.sum (e.g., update
dependencies and run dependency tidy/resolve so the new versions are recorded
and checksums updated) and verify compilation and tests pass.

In `@main.go`:
- Around line 216-220: The webhook registration errors are currently only logged
and startup continues; change both ctrl.NewWebhookManagedBy(...).Complete()
error checks (for dwv1.DevWorkspace and dwv2.DevWorkspace using mgr) to treat
failures as fatal initialization errors: after logging the error with
setupLog.Error include a process-terminating action (consistent with other
main() setup steps), e.g. call os.Exit(1) or an equivalent fatal logger, so the
manager does not start in a degraded state when conversion webhook registration
fails.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aefb06e4-2a5e-4ad1-b807-2739fec3e9ed

📥 Commits

Reviewing files that changed from the base of the PR and between 441bcb2 and d254509.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (12)
  • deploy/bundle/manifests/controller.devfile.io_devworkspaceoperatorconfigs.yaml
  • deploy/bundle/manifests/controller.devfile.io_devworkspaceroutings.yaml
  • deploy/deployment/kubernetes/combined.yaml
  • deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/deployment/kubernetes/objects/devworkspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/deployment/openshift/combined.yaml
  • deploy/deployment/openshift/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/deployment/openshift/objects/devworkspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml
  • deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml
  • deploy/templates/crd/bases/controller.devfile.io_devworkspaceroutings.yaml
  • go.mod
  • main.go

Comment on lines +216 to 220
if err := ctrl.NewWebhookManagedBy(mgr, &dwv1.DevWorkspace{}).Complete(); err != nil {
setupLog.Error(err, "failed creating conversion webhook for DevWorkspaces v1alpha1")
}
if err := ctrl.NewWebhookManagedBy(mgr).For(&dwv2.DevWorkspace{}).Complete(); err != nil {
if err := ctrl.NewWebhookManagedBy(mgr, &dwv2.DevWorkspace{}).Complete(); err != nil {
setupLog.Error(err, "failed creating conversion webhook for DevWorkspaces v1alpha2")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fail fast if conversion webhook registration fails.

Line 216 and Line 219 only log .Complete() errors and continue startup. If conversion webhook registration fails, the manager can start in a degraded state where version conversions break at runtime. Please treat these as fatal initialization errors (consistent with other setup steps in main()).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@main.go` around lines 216 - 220, The webhook registration errors are
currently only logged and startup continues; change both
ctrl.NewWebhookManagedBy(...).Complete() error checks (for dwv1.DevWorkspace and
dwv2.DevWorkspace using mgr) to treat failures as fatal initialization errors:
after logging the error with setupLog.Error include a process-terminating action
(consistent with other main() setup steps), e.g. call os.Exit(1) or an
equivalent fatal logger, so the manager does not start in a degraded state when
conversion webhook registration fails.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…de to v0.23.1

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
This method arguments were changed in controller-runtime v0.23.0.

Existing code of the form builder.WebhookManagedBy(mgr).For(&corev1.Deployment{}) has to be changed to builder.WebhookManagedBy(mgr, &appsv1.Deployment{})

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia rohanKanojia force-pushed the pr/update-controller-runtime-0-22-4 branch from d254509 to b7c4562 Compare April 2, 2026 10:12
@rohanKanojia rohanKanojia changed the title chore (deps) : update controller-runtime to v0.23.1 chore (deps) : update controller-runtime to v0.23.3 Apr 2, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 2, 2026

@rohanKanojia: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v14-devworkspace-operator-e2e b7c4562 link true /test v14-devworkspace-operator-e2e

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants