Skip to content

SRVKP-11558: remove deprecated k8s.io/api packages removed in v0.36.0#2834

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
anithapriyanatarajan:remove-deprecated-types
May 7, 2026
Merged

SRVKP-11558: remove deprecated k8s.io/api packages removed in v0.36.0#2834
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
anithapriyanatarajan:remove-deprecated-types

Conversation

@anithapriyanatarajan
Copy link
Copy Markdown
Contributor

k8s.io/api v0.36.0 (Kubernetes 1.36, released Dec 2025) deleted three Go packages that had been deprecated at the server level for years:

k8s.io/api/autoscaling/v2beta1 (deprecated k8s 1.12, server-removed k8s 1.26)
k8s.io/api/autoscaling/v2beta2 (deprecated k8s 1.23, server-removed k8s 1.26)
The upstream removal commit is kubernetes/api@d8ea27e.

k8s.io/api/scheduling/v1alpha1 (deprecated k8s 1.10, server-removed k8s 1.17)

Because Go resolves a single version of k8s.io/api across the entire module graph, any project that depends on both openshift/api and k8s.io/api >= v0.36.0 hits a hard build failure as below

k8s.io/api/autoscaling/v2beta2: module k8s.io/api@v0.36.0 found, but does not contain package k8s.io/api/autoscaling/v2beta2

Example case : Experienced this issue while upgrading k8s.io/client-go to 0.36.0(https://github.com/tektoncd/operator/blob/main/go.mod#L45) to address kubernetes/client-go@ea7a7e7 . We are blocked because of this.

Fixed this by removing the three imports and their AddToScheme registrations from install.go. The stable replacements (autoscaling/v2 and scheduling/v1) were already registered and are unchanged.

Also removes the corresponding vendor directories and modules.txt

Assisted-by: Copilot Agent using Claude-Sonnet 4.6 model

Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

📝 Walkthrough

Walkthrough

The change removes three Kubernetes API type packages from the scheme registration in install.go: autoscaling v2beta1, autoscaling v2beta2, and scheduling v1alpha1. The corresponding imports are deleted, and their AddToScheme entries are removed from the kubeSchemeBuilder. The exported scheme installer variables (Install and InstallKube) remain structurally unchanged and continue to register all other OpenShift and Kubernetes API versions.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the reason for the removal, the specific packages affected, the build failure issue it resolves, and how it was fixed.
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 The PR removes deprecated k8s.io/api packages from install.go. It modifies only infrastructure code (configuration file), not Ginkgo test files. The custom check is not applicable to this PR.
Test Structure And Quality ✅ Passed This PR removes deprecated k8s.io/api packages from install.go. While test files exist, the PR's primary purpose is not to modify Ginkgo test code. Custom check for test quality is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added. The only Ginkgo test (tests/suite_test.go) is a local unit test using envtest.Environment, not an e2e test targeting live clusters.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests added. This PR removes deprecated k8s.io/api packages. The test files added (tests/suite_test.go and machineconfiguration/install_test.go) are not Ginkgo e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed Removes deprecated API imports from library registration. No deployment manifests, operator code, or scheduling constraints added. Check not applicable.
Ote Binary Stdout Contract ✅ Passed PR removes deprecated k8s.io/api packages. No process-level stdout writes found. Test suite uses proper GinkgoWriter isolation for test stdout.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. The PR only removes deprecated k8s.io/api package references from install.go. The check is not applicable.
Title check ✅ Passed The title clearly and specifically summarizes the main change: removing deprecated k8s.io/api packages that were removed in Kubernetes v0.36.0.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@openshift-ci openshift-ci Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 7, 2026
@openshift-ci openshift-ci Bot requested review from JoelSpeed and everettraven May 7, 2026 08:31
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

Hello @anithapriyanatarajan! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 7, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

Hi @anithapriyanatarajan. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@anithapriyanatarajan
Copy link
Copy Markdown
Contributor Author

cc: @jkhelil This PR relates to case SRVKP-11558

@JoelSpeed
Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 7, 2026
@anithapriyanatarajan anithapriyanatarajan changed the title chore: remove deprecated k8s.io/api packages removed in v0.36.0 SRVKP-11558: remove deprecated k8s.io/api packages removed in v0.36.0 May 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 7, 2026

@anithapriyanatarajan: This pull request references SRVKP-11558 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 bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

k8s.io/api v0.36.0 (Kubernetes 1.36, released Dec 2025) deleted three Go packages that had been deprecated at the server level for years:

k8s.io/api/autoscaling/v2beta1 (deprecated k8s 1.12, server-removed k8s 1.26)
k8s.io/api/autoscaling/v2beta2 (deprecated k8s 1.23, server-removed k8s 1.26)
The upstream removal commit is kubernetes/api@d8ea27e.

k8s.io/api/scheduling/v1alpha1 (deprecated k8s 1.10, server-removed k8s 1.17)

Because Go resolves a single version of k8s.io/api across the entire module graph, any project that depends on both openshift/api and k8s.io/api >= v0.36.0 hits a hard build failure as below

k8s.io/api/autoscaling/v2beta2: module k8s.io/api@v0.36.0 found, but does not contain package k8s.io/api/autoscaling/v2beta2

Example case : Experienced this issue while upgrading k8s.io/client-go to 0.36.0(https://github.com/tektoncd/operator/blob/main/go.mod#L45) to address kubernetes/client-go@ea7a7e7 . We are blocked because of this.

Fixed this by removing the three imports and their AddToScheme registrations from install.go. The stable replacements (autoscaling/v2 and scheduling/v1) were already registered and are unchanged.

Also removes the corresponding vendor directories and modules.txt

Assisted-by: Copilot Agent using Claude-Sonnet 4.6 model

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 May 7, 2026
@anithapriyanatarajan
Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

@anithapriyanatarajan: 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.

@JoelSpeed
Copy link
Copy Markdown
Contributor

/lgtm
/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@JoelSpeed: This PR has been marked as verified by CI.

Details

In response to this:

/lgtm
/verified by CI

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 openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification

No second-stage tests were triggered for this PR.

This can happen when:

  • The changed files don't match any pipeline_run_if_changed patterns
  • All files match pipeline_skip_if_only_changed patterns
  • No pipeline-controlled jobs are defined for the master branch

Use /test ? to see all available tests.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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 May 7, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 2955bfa into openshift:master May 7, 2026
16 checks passed
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants