Skip to content

MGMT-24938: (IBIO) Upgrade operator-sdk from v1.30.0 to v1.42.3 (kubebuilder v3→v4 migration) - #851

Open
shay23bra wants to merge 1 commit into
openshift:mainfrom
shay23bra:operator-sdk-upgrade
Open

MGMT-24938: (IBIO) Upgrade operator-sdk from v1.30.0 to v1.42.3 (kubebuilder v3→v4 migration)#851
shay23bra wants to merge 1 commit into
openshift:mainfrom
shay23bra:operator-sdk-upgrade

Conversation

@shay23bra

@shay23bra shay23bra commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrade operator-sdk from v1.30.0 to v1.42.3 and migrate the project layout from go.kubebuilder.io/v3 to go.kubebuilder.io/v4.

The older operator-sdk (v1.30.0) depends on operator-registry v1.28.0 which doesn't support NetworkPolicy as a valid OLM bundle resource type — operator-sdk bundle validate rejects it. The new version (v1.42.3) depends on operator-registry v1.59.0 which supports it.

Changes

  • PROJECT: layout go.kubebuilder.io/v3go.kubebuilder.io/v4
  • Makefile: OPERATOR_SDK_VERSION v1.30.0v1.42.3
  • config/default/kustomization.yaml: bases:resources: (deprecated kustomize syntax)
  • config/crd/kustomization.yaml: patchesStrategicMerge:patches: with path: key
  • config/scorecard/kustomization.yaml: patchesJson6902:patches:
  • bundle/: regenerated metadata with updated builder/layout labels

No Go code changes. No runtime behavior changes. No Dockerfile changes. Tooling-only upgrade.

Migration guide: https://book.kubebuilder.io/migration/v3vsv4

Related

Summary by CodeRabbit

  • Configuration

    • Updated project scaffolding and deployment metadata to newer Operator SDK and Kubebuilder versions.
    • Modernized Kustomize configuration for current patch and resource conventions.
    • Default deployments now consistently target the image-based-install-operator namespace.
  • Deployment

    • Updated bundle and installation metadata to reflect the latest build tooling and project layout.
    • Refreshed the generated build timestamp in the installation manifest.

@openshift-ci-robot

openshift-ci-robot commented Jul 29, 2026

Copy link
Copy Markdown

@shay23bra: This pull request references MGMT-24938 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Upgrade operator-sdk from v1.30.0 to v1.42.3 and migrate the project layout from go.kubebuilder.io/v3 to go.kubebuilder.io/v4.

The older operator-sdk (v1.30.0) depends on operator-registry v1.28.0 which doesn't support NetworkPolicy as a valid OLM bundle resource type — operator-sdk bundle validate rejects it. The new version (v1.42.3) depends on operator-registry v1.59.0 which supports it.

Changes

  • PROJECT: layout go.kubebuilder.io/v3go.kubebuilder.io/v4
  • Makefile: OPERATOR_SDK_VERSION v1.30.0v1.42.3
  • config/default/kustomization.yaml: bases:resources: (deprecated kustomize syntax)
  • config/crd/kustomization.yaml: patchesStrategicMerge:patches: with path: key
  • config/scorecard/kustomization.yaml: patchesJson6902:patches:
  • bundle/: regenerated metadata with updated builder/layout labels

No Go code changes. No runtime behavior changes. No Dockerfile changes. Tooling-only upgrade.

Migration guide: https://book.kubebuilder.io/migration/v3vsv4

Related

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f301fcae-8db3-4bb5-963d-d4e4c3a7d998

📥 Commits

Reviewing files that changed from the base of the PR and between 6621941 and 5d47b69.

📒 Files selected for processing (8)
  • Makefile
  • PROJECT
  • bundle.Dockerfile
  • bundle/manifests/image-based-install-operator.clusterserviceversion.yaml
  • bundle/metadata/annotations.yaml
  • config/crd/kustomization.yaml
  • config/default/kustomization.yaml
  • config/scorecard/kustomization.yaml

Walkthrough

The project updates Operator SDK and Kubebuilder metadata versions, refreshes generated bundle annotations, and modernizes Kustomize configuration with resource-based inclusion, namespace assignment, and unified patch declarations.

Changes

Operator tooling and bundle metadata

Layer / File(s) Summary
Align tool and bundle versions
Makefile, PROJECT, bundle.Dockerfile, bundle/metadata/annotations.yaml, bundle/manifests/...
Operator SDK metadata moves to v1.42.3, Kubebuilder layout metadata moves to go.kubebuilder.io/v4, and the CSV creation timestamp is refreshed.
Update Kustomize configuration
config/crd/kustomization.yaml, config/default/kustomization.yaml, config/scorecard/kustomization.yaml
Kustomize uses patches and resources, applies the image-based-install-operator namespace, and updates the Kubebuilder patch scaffold directive.

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

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: upgrading operator-sdk and migrating Kubebuilder v3 to v4.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 No Go test files or Ginkgo titles changed; the PR only updates tooling, bundle metadata, and kustomize files.
Test Structure And Quality ✅ Passed PR changes only Makefile, PROJECT, kustomize, and bundle metadata; no Ginkgo test files or test logic were modified.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests were added; the diff only changes tooling and bundle metadata, so no MicroShift-unsafe test APIs to flag.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Diff only changes tooling/bundle YAML; no Go/e2e test files or Ginkgo specs were added, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only operator-sdk/Kubebuilder version bumps, kustomize syntax updates, and bundle metadata changes were made; no affinity, nodeSelector, spread, or PDB scheduling changes.
Ote Binary Stdout Contract ✅ Passed PR only updates build/bundle/kustomize config; no Go/main/TestMain/suite setup code was changed, so no stdout contract risk.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo/e2e test files or test declarations were added; the PR only changes tooling/configuration files.
No-Weak-Crypto ✅ Passed PR only updates SDK/Kubebuilder config and bundle metadata; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons appear in the diff.
Container-Privileges ✅ Passed Changed manifests only use allowPrivilegeEscalation: false, privileged: false, and runAsNonRoot: true; no hostPID/hostNetwork/hostIPC/SYS_ADMIN found.
No-Sensitive-Data-In-Logs ✅ Passed Changed files only update versions and kustomize/bundle metadata; no new logging or sensitive-data exposure was introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from javipolo and leo8a July 29, 2026 13:33
@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shay23bra
Once this PR has been reviewed and has the lgtm label, please assign romfreiman 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

@shay23bra

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown

@shay23bra: The following tests 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/ibio-reinstall-v4v6 5d47b69 link false /test ibio-reinstall-v4v6
ci/prow/e2e-ibio-v4v6 5d47b69 link true /test e2e-ibio-v4v6

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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants