← Back to Pull requests

chore(deps): bump k8s.io dependencies to v0.37 #3281

Closed
unknown closed this pull request without merging on Nov 20, 2026 22:27 UTC
View on GitHub
unknown unknown commented on Nov 02, 2026 08:48 UTC
Author

Purpose of this PR

Bump the Kubernetes dependencies to v0.37 so Kueue can use the new spec.managedBy field from #3221.

Kueue is on k8s.io v0.37. Our zz_generated.openapi.go was generated against k8s.io/api v0.35 and refers to v1.PodStatusResult and v1.WorkloadReference, which were removed in v0.37. Because of that, Kueue doesn't build when it pins a spark-operator version from master. Context: kubernetes-sigs/kueue#18107.

Proposed changes:

  • Bump k8s.io/* to v0.37.1, sigs.k8s.io/controller-runtime to v0.25.2 and k8s.io/kube-openapi to the commit k8s 0.37 uses. These are the same versions as Kueue main, so pinning this in Kueue changes nothing else in its go.mod.

  • Raise the go directive to 1.26.0, which k8s.io v0.37 requires, and update the toolchain and Dockerfile builder image to go1.26.10.

  • Bump controller-gen to v0.23.0, setup-envtest to release-0.25 and code-generator to v0.37.1, then regenerate the OpenAPI code, swagger, CRDs and pkg/client.

  • Switch api/v1alpha1 from controller-runtime's deprecated scheme.Builder to runtime.NewSchemeBuilder, the way api/v1beta2 already does it.

  • Point the envtest suites at the 1.37 binaries, and update the fake discovery client in pkg/util for client-go's new DiscoveryInterfaces return type.
  • Change Category

  • Bugfix (non-breaking change which fixes an issue)

  • Feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that could affect existing functionality)

  • Documentation update
  • Rationale

    controller-runtime v0.25 and the code-generator, controller-gen and envtest versions above are the ones built for k8s 0.37. I used the same versions as Kueue so that both projects run the code they build against.

    The CRD schema changes only add fields that come from the core/v1 types we embed: bindMountOptions, httpGet.protocol, grpc.mode, emptyDir.mode, and user/defaultUser on volumes. Nothing was removed or changed type, and no spark-operator field changed.

    Checklist

  • I have conducted a self-review of my own code.

  • I have updated documentation accordingly.

  • I have added tests that prove my changes are effective or that my feature works.

  • Existing unit tests pass locally with my changes.
  • Additional Notes

  • Marked as breaking only for Go consumers: importing this module now needs Go 1.26, and v1alpha1.SchemeBuilder is now a runtime.SchemeBuilder. AddToScheme works as before; only code that called .Register(objs...) on it directly would need a change. Nothing changes for cluster users.

  • The Kind version used in CI (KIND_K8S_VERSION) and the e2e k8s matrix stay on 1.35. Moving them can be done in a separate PR.

  • This covers #3265 (dependabot controller-runtime bump in test/e2e).

  • I checked Kueue main with a local replace pointing at this branch: it builds, and the SparkApplication unit tests pass.
  • Locally passing: make go-fmt go-vet go-lint unit-test verify-codegen detect-crds-drift drift-check helm-unittest helm-docs kustomize-lint.

    Diff: 384 lines (+288 / -96) across 4 files Reviewer: vjanelle Review duration: 26739m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 384 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.356
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #3281"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 66.2% (HIGH) · Higher = larger blast radius
    66.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.1% · Safe to merge
    26.1%