Skip to content

WIP: Rebase 1.36 jacob test revert tls gc#2659

Draft
jacobsee wants to merge 2925 commits intoopenshift:masterfrom
jacobsee:rebase-1.36-jacob-revert-gc
Draft

WIP: Rebase 1.36 jacob test revert tls gc#2659
jacobsee wants to merge 2925 commits intoopenshift:masterfrom
jacobsee:rebase-1.36-jacob-revert-gc

Conversation

@jacobsee
Copy link
Copy Markdown
Member

@jacobsee jacobsee commented Apr 30, 2026

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR is related to:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Summary by CodeRabbit

  • New Features

    • Sharded list/watch support: ShardInfo metadata + shardSelector query parameter across many APIs
    • New scheduling v1alpha2 with PodGroup; PodSchedulingGroup and PodSpec.schedulingGroup added
    • Added MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding; DeviceTaintRule and ResourcePoolStatusRequest resources
  • Infrastructure

    • Go runtime bumped to 1.26.2; CI/build base image updated to Go 1.26 / OpenShift 5.0
  • Documentation

    • Added extensive historical changelogs and OpenAPI documentation updates

yashasvimisra2798 and others added 30 commits March 19, 2026 19:36
* top command documentation enhancement

* Added FAQ details
Introduce the ResourcePoolStatusRequest resource type in the
resource.k8s.io/v1alpha3 API group, gated behind the
DRAResourcePoolStatus feature gate. This includes external and internal
type definitions, protobuf/OpenAPI generated code, client-go typed
clients, informers, listers, apply configurations, deepcopy, defaults,
conversion, fuzzer, declarative validation tags, and API discovery
metadata.
Implement the RPSR controller that watches ResourcePoolStatusRequest
objects and aggregates pool status from DRA drivers. Add the API server
registry (strategy, storage), handwritten validation, RBAC bootstrap
policy for the controller, kube-controller-manager wiring, table
printer columns, and storage factory registration.
Add unit tests for handwritten and declarative validation, controller
logic, metrics, table printer output, controller-manager registration,
etcd storage round-trip, and an integration test for the full RPSR
lifecycle. Also add an e2e test exercising the DRA test driver with
RPSR and the example manifest.
…00, maxLength=128) for etcd safety, add Errors printer column

Signed-off-by: Nour <nurmn3m@gmail.com>
Signed-off-by: Nour <nurmn3m@gmail.com>
…ify retry logic and metric tests

Signed-off-by: Nour <nurmn3m@gmail.com>
…op unnecessary Feature:DynamicResourceAllocation tag, fix indentation

Signed-off-by: Nour <nurmn3m@gmail.com>
…generate the code

Signed-off-by: Nour <nurmn3m@gmail.com>
* Add admission for podGroup

Signed-off-by: helayoty <heelayot@microsoft.com>

* Create workload object before podgroup

Signed-off-by: helayoty <heelayot@microsoft.com>

---------

Signed-off-by: helayoty <heelayot@microsoft.com>
…econcile

Remove reconcilePodMemoryProtection that resets pod cgroup values on systemd
…and container ID instead of StartTime

The expectation that StartTime changes on kubelet restart for static pods is no longer reliable due to faked init container status logic. This change updates the tests to assert on the specific behavior introduced by that logic.
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
test: fix flaky static pod tests by asserting on termination message …
Remove PodGroupTemplateRef from the PodGroup e2e CRUD test. The
PodGroupWorkloadExists admission plugin (introduced in kubernetes#137464)
rejects PodGroups that reference a non-existent Workload, causing
the test to fail. The workload reference is not needed to test
basic PodGroup API CRUD operations.
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
…ist-default-to-false-for-1.36

Switch PLEGOnDemandRelist default to `false` for 1.36
…ure actuated pod-level resources are updated
…heduler-events

scheduler: use contextual logging for event emission
…to ResourceSliceMaxDevicesWithAdvancedFeatures and add testcases with max devices with list attributes
KEP-961: demote maxUnavailable feature in statefulset to off by default
…oad-api

test: Fix PodGroup CRUD test failing due to missing Workload reference
sanchezl and others added 25 commits May 4, 2026 15:46
UPSTREAM: <carry>: admission: validate minimumKubeletVersion
Signed-off-by: Peter Hunt <pehunt@redhat.com>

UPSTREAM: <carry>: authorization: add minimumkubeletversion package

MinimumKubeletVersion is a way for an admin to declare that nodes any older than the
minimum version cannot authorize with the apiserver. This effectively prevents them from joining.

Doing so means the apiservers can trust newer features are usable on clusters with version skews

Signed-off-by: Peter Hunt <pehunt@redhat.com>

UPSTREAM: <carry>: authorizer: move mininum kubelet version authorizer to pkg/kubeapiserver and add authorization mode

this does require a line of code be moved from the enablement package to stop a cyclical import

Signed-off-by: Peter Hunt <pehunt@redhat.com>

UPSTREAM: <carry>: crdvalidation: move latency profile file to be agnostic of field

Signed-off-by: Peter Hunt <pehunt@redhat.com>

UPSTREAM: <carry>: features: add MinimumKubeletVersion feature

Signed-off-by: Peter Hunt <pehunt@redhat.com>

UPSTREAM: <carry>: Feature gates must now declare dependencies, even if there are none.
Upstream enables volume group snapshots by editing yaml files in a shell
script [1]. We can't use this script in openshift-tests.

Create a brand new, OCP specific test driver based on csi-driver-hostpath,
only with the --feature-gate=VolumeGroupSnapshot on external-snapshotter command line.

We will need to carry this patch until the feature graduates to GA. I've
chosen to create brand new files in this carry patch, so it can't conflict
with the existing ones.

1: https://github.com/kubernetes/kubernetes/blob/91d6fd3455c4a071408df20c7f48df221f2b6d30/test/e2e/testing-manifests/storage-csi/external-snapshotter/volume-group-snapshots/run_group_snapshot_e2e.sh
UPSTREAM: <carry>: Add plugin for storage performant security policy
Add featuregate for performantsecuritypolicy for storage

UPSTREAM: <carry>: Feature gates must now declare dependencies, even if there are none.
Signed-off-by: Harshal Patil <12152047+harche@users.noreply.github.com>
Analysis of flakes from the k8s suite has shown consistent examples
of otherwise well behaved testing failing due timeouts because of
temporary load on controllers during parallel testing. Increasing these
timeouts will reduce flakes.
MutableCSINodeAllocatableCount is now enabled in the default feature set,
the tests should succeed just fine.
…imary clusters

  Detect cluster's primary IP family by querying kubernetes.default service
  ClusterIP instead of using HasIPv4/HasIPv6 flags. The previous logic
  incorrectly returned ipv4 for dual-stack v6-primary clusters because
  both HasIPv4 and HasIPv6 were true.

  This matches the upstream approach in test/e2e/e2e.go and fixes DNS tests
  that were querying for A records instead of AAAA records in v6-primary
  environments.
After openshift/origin#30786 added ibmcloud to the provider switch in
openshift-tests, the provider name is now correctly passed through to
k8s-tests-ext. However, k8s-tests-ext only registers upstream Kubernetes
providers (aws, azure, gce, kubemark, openstack, vsphere) via the
test/e2e/providers.go import. OpenShift-specific providers like ibmcloud
are not registered, causing framework.AfterReadingAllFlags to call
SetupProviderConfig which fails with "Unknown provider" and Exit(1),
crashing every test process.

This registers all OpenShift-specific cloud providers (baremetal, ovirt,
kubevirt, alibabacloud, nutanix, ibmcloud, external) as NullProviders in
k8s-tests-ext. These providers don't require special setup for upstream
kube e2e tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e2e test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: jubittajohn <jujohn@redhat.com>
To be squashed with the following commit later:"UPSTREAM: <carry>: Add OpenShift tooling, images, configs and docs"

Signed-off-by: jubittajohn <jujohn@redhat.com>
…er_manager_linux_test.go

Squash into: UPSTREAM: <carry>: disable load balancing on created cgroups when managed is enabled
…s in flagz_test.go and statusz_test.go

Squash into: UPSTREAM: <carry>: apiserver: add system_client=kube-{apiserver,cm,s} to apiserver_request_total
Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
…e when claims.email is used in username expression

Signed-off-by: Shaza Aldawamneh <shaza.aldawamneh@hotmail.com>
Signed-off-by: jubittajohn <jujohn@redhat.com>
Signed-off-by: jubittajohn <jujohn@redhat.com>
Signed-off-by: jubittajohn <jujohn@redhat.com>
@jacobsee jacobsee force-pushed the rebase-1.36-jacob-revert-gc branch from 147d3f0 to 21e2941 Compare May 4, 2026 23:41
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 4, 2026
@jacobsee
Copy link
Copy Markdown
Member Author

jacobsee commented May 4, 2026

/test integration

@openshift-ci-robot
Copy link
Copy Markdown

@jacobsee: the contents of this pull request could not be automatically validated.

The following commits are valid:

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@api/openapi-spec/v3/apis__apps__v1_openapi.json`:
- Around line 6447-6455: The OpenAPI generator template is emitting invalid
"uniqueItems" on non-array parameter schemas (e.g., the "shardSelector" query
parameter schema is a string but includes "uniqueItems": true); update the
generator template to only emit "uniqueItems" when the schema.type is "array"
(or when an array schema object is being rendered) so scalar types (string,
integer, boolean) never get a uniqueItems property; search for the templated
parameter rendering code that outputs "uniqueItems" (used for parameters like
shardSelector, timeoutSeconds, allowWatchBookmarks) and wrap or gate that
emission with a check for schema.type == "array" (or equivalent template helper)
so generated specs no longer include dead/invalid metadata.

In `@api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json`:
- Around line 992-999: The description for the query parameter "shardSelector"
is currently phrased as if the operation returns a list ("restricts the list of
returned objects") but this parameter is used on the deletecollection operation
and returns a status; change the first sentence to be operation-neutral (e.g.
"restricts the set of objects the operation applies to using a CEL-based shard
selector expression") so it accurately describes deletecollection and other
operations; update the "description" text associated with the "shardSelector"
parameter in the openapi JSON (the block containing "name": "shardSelector" and
its "schema") to use the new wording while leaving the rest of the
explanation/examples intact.

In `@api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json`:
- Around line 926-934: The shardSelector query-parameter schema objects
incorrectly include the array-only property "uniqueItems" while their "type" is
"string"; remove the "uniqueItems" field from each shardSelector parameter
schema (the six parameter entries named "shardSelector") so the schema is just {
"type": "string" } and does not include uniqueItems. Locate the entries by the
parameter name "shardSelector" in the OpenAPI JSON (the schema objects that
currently show "type": "string" and "uniqueItems": true) and delete the
uniqueItems line in each occurrence.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8d5cc728-cd96-417c-b989-d1238f4f6e43

📥 Commits

Reviewing files that changed from the base of the PR and between 5fdcf1a and 21e2941.

⛔ Files ignored due to path filters (25)
  • LICENSES/vendor/github.com/armon/circbuf/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/cenkalti/backoff/v4/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/cenkalti/backoff/v5/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/gregjones/httpcache/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/karrick/godirwalk/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/libopenstorage/openstorage/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/mistifyio/go-zfs/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/mohae/deepcopy/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/mrunalp/fileutils/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/github.com/pkg/errors/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/otel/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/otel/metric/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/otel/sdk/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.opentelemetry.io/otel/trace/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/go.uber.org/zap/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/k8s.io/utils/third_party/forked/golang/LICENSE is excluded by !**/vendor/**
  • LICENSES/vendor/k8s.io/utils/third_party/forked/golang/btree/LICENSE is excluded by !**/vendor/**
  • cmd/kubeadm/app/discovery/token/testdata/ca-cert.pem is excluded by !**/*.pem
  • cmd/kubeadm/app/util/config/testdata/mynode.pem is excluded by !**/*.pem
📒 Files selected for processing (275)
  • .ci-operator.yaml
  • .github/PULL_REQUEST_TEMPLATE.md
  • .gitignore
  • .go-version
  • CHANGELOG/CHANGELOG-1.10.md
  • CHANGELOG/CHANGELOG-1.11.md
  • CHANGELOG/CHANGELOG-1.12.md
  • CHANGELOG/CHANGELOG-1.13.md
  • CHANGELOG/CHANGELOG-1.14.md
  • CHANGELOG/CHANGELOG-1.15.md
  • CHANGELOG/CHANGELOG-1.16.md
  • CHANGELOG/CHANGELOG-1.17.md
  • CHANGELOG/CHANGELOG-1.18.md
  • CHANGELOG/CHANGELOG-1.19.md
  • CHANGELOG/CHANGELOG-1.2.md
  • CHANGELOG/CHANGELOG-1.20.md
  • CHANGELOG/CHANGELOG-1.21.md
  • CHANGELOG/CHANGELOG-1.22.md
  • CHANGELOG/CHANGELOG-1.23.md
  • CHANGELOG/CHANGELOG-1.24.md
  • CHANGELOG/CHANGELOG-1.25.md
  • CHANGELOG/CHANGELOG-1.26.md
  • CHANGELOG/CHANGELOG-1.27.md
  • CHANGELOG/CHANGELOG-1.28.md
  • CHANGELOG/CHANGELOG-1.29.md
  • CHANGELOG/CHANGELOG-1.3.md
  • CHANGELOG/CHANGELOG-1.30.md
  • CHANGELOG/CHANGELOG-1.31.md
  • CHANGELOG/CHANGELOG-1.32.md
  • CHANGELOG/CHANGELOG-1.33.md
  • CHANGELOG/CHANGELOG-1.34.md
  • CHANGELOG/CHANGELOG-1.35.md
  • CHANGELOG/CHANGELOG-1.36.md
  • CHANGELOG/CHANGELOG-1.4.md
  • CHANGELOG/CHANGELOG-1.5.md
  • CHANGELOG/CHANGELOG-1.6.md
  • CHANGELOG/CHANGELOG-1.7.md
  • CHANGELOG/CHANGELOG-1.8.md
  • CHANGELOG/CHANGELOG-1.9.md
  • CHANGELOG/README.md
  • OWNERS_ALIASES
  • api/api-rules/sample_controller_violation_exceptions.list
  • api/api-rules/violation_exceptions.list
  • api/discovery/aggregated_v2.json
  • api/discovery/apis.json
  • api/discovery/apis__admissionregistration.k8s.io__v1.json
  • api/discovery/apis__resource.k8s.io__v1alpha3.json
  • api/discovery/apis__resource.k8s.io__v1beta2.json
  • api/discovery/apis__scheduling.k8s.io.json
  • api/discovery/apis__scheduling.k8s.io__v1alpha1.json
  • api/discovery/apis__scheduling.k8s.io__v1alpha2.json
  • api/discovery/apis__storage.k8s.io__v1.json
  • api/discovery/apis__storage.k8s.io__v1beta1.json
  • api/openapi-spec/README.md
  • api/openapi-spec/swagger.json
  • api/openapi-spec/v3/api__v1_openapi.json
  • api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json
  • api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__apps__v1_openapi.json
  • api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__authorization.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__autoscaling__v1_openapi.json
  • api/openapi-spec/v3/apis__autoscaling__v2_openapi.json
  • api/openapi-spec/v3/apis__batch__v1_openapi.json
  • api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json
  • api/openapi-spec/v3/apis__certificates.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json
  • api/openapi-spec/v3/apis__coordination.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json
  • api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__policy__v1_openapi.json
  • api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__resource.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json
  • api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__resource.k8s.io__v1beta2_openapi.json
  • api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__scheduling.k8s.io__v1alpha1_openapi.json
  • api/openapi-spec/v3/apis__scheduling.k8s.io__v1alpha2_openapi.json
  • api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__storagemigration.k8s.io__v1beta1_openapi.json
  • build/build-image/cross/VERSION
  • build/common.sh
  • build/dependencies.yaml
  • build/lib/release.sh
  • build/nsswitch.conf
  • build/pause/CHANGELOG.md
  • build/pause/Dockerfile.Rhel
  • build/pause/Makefile
  • build/server-image/Dockerfile
  • build/server-image/kube-apiserver/Dockerfile
  • build/tools.go
  • cluster/addons/dns/coredns/coredns.yaml.base
  • cluster/addons/dns/coredns/coredns.yaml.in
  • cluster/addons/dns/coredns/coredns.yaml.sed
  • cluster/addons/dns/kube-dns/kube-dns.yaml.base
  • cluster/addons/dns/kube-dns/kube-dns.yaml.in
  • cluster/addons/dns/kube-dns/kube-dns.yaml.sed
  • cluster/addons/dns/nodelocaldns/nodelocaldns.yaml
  • cluster/addons/kube-proxy/OWNERS
  • cluster/addons/kube-proxy/kube-proxy-ds.yaml
  • cluster/addons/kube-proxy/kube-proxy-rbac.yaml
  • cluster/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml
  • cluster/gce/addons/konnectivity-agent/konnectivity-agent-ds.yaml
  • cluster/gce/config-common.sh
  • cluster/gce/config-default.sh
  • cluster/gce/config-test.sh
  • cluster/gce/gci/configure-helper.sh
  • cluster/gce/gci/configure.sh
  • cluster/gce/gci/master.yaml
  • cluster/gce/gci/mounter/mounter.go
  • cluster/gce/gci/node.yaml
  • cluster/gce/manifests/cloud-controller-manager.manifest
  • cluster/gce/manifests/etcd.manifest
  • cluster/gce/manifests/konnectivity-server.yaml
  • cluster/gce/manifests/kube-proxy.manifest
  • cluster/gce/upgrade-aliases.sh
  • cluster/gce/util.sh
  • cluster/gce/windows/k8s-node-setup.psm1
  • cluster/gce/windows/smoke-test.sh
  • cluster/images/etcd/Dockerfile
  • cluster/images/etcd/Dockerfile.windows
  • cluster/images/etcd/Makefile
  • cluster/images/etcd/OWNERS
  • cluster/images/etcd/README.md
  • cluster/images/etcd/cloudbuild.yaml
  • cluster/images/etcd/migrate-if-needed.bat
  • cluster/images/etcd/migrate-if-needed.sh
  • cluster/images/etcd/migrate/copy_file.go
  • cluster/images/etcd/migrate/data_dir.go
  • cluster/images/etcd/migrate/data_dir_test.go
  • cluster/images/etcd/migrate/integration_test.go
  • cluster/images/etcd/migrate/migrate.go
  • cluster/images/etcd/migrate/migrate_client.go
  • cluster/images/etcd/migrate/migrate_server.go
  • cluster/images/etcd/migrate/migrator.go
  • cluster/images/etcd/migrate/options.go
  • cluster/images/etcd/migrate/options_test.go
  • cluster/images/etcd/migrate/testdata/datadir_with_version/version.txt
  • cluster/images/etcd/migrate/testdata/datadir_without_version/.placeholder
  • cluster/images/etcd/migrate/util_others.go
  • cluster/images/etcd/migrate/utils_windows.go
  • cluster/images/etcd/migrate/versions.go
  • cluster/images/etcd/migrate/versions_test.go
  • cmd/cloud-controller-manager/.import-restrictions
  • cmd/genfeaturegates/genfeaturegates.go
  • cmd/kube-apiserver/OWNERS
  • cmd/kube-apiserver/app/aggregator.go
  • cmd/kube-apiserver/app/testing/testserver.go
  • cmd/kube-controller-manager/app/batch.go
  • cmd/kube-controller-manager/app/controller_descriptor.go
  • cmd/kube-controller-manager/app/controllermanager.go
  • cmd/kube-controller-manager/app/controllermanager_test.go
  • cmd/kube-controller-manager/app/core.go
  • cmd/kube-controller-manager/app/options/options.go
  • cmd/kube-controller-manager/app/options/options_test.go
  • cmd/kube-controller-manager/app/options/resourceclaimcontroller.go
  • cmd/kube-controller-manager/app/plugins.go
  • cmd/kube-controller-manager/app/plugins_providers.go
  • cmd/kube-controller-manager/app/plugins_test.go
  • cmd/kube-controller-manager/app/resource.go
  • cmd/kube-controller-manager/app/scheduling.go
  • cmd/kube-controller-manager/app/scheduling_test.go
  • cmd/kube-controller-manager/app/storageversionmigrator.go
  • cmd/kube-controller-manager/app/testing/testserver.go
  • cmd/kube-controller-manager/names/controller_names.go
  • cmd/kube-proxy/app/conntrack.go
  • cmd/kube-proxy/app/init_linux.go
  • cmd/kube-proxy/app/init_other.go
  • cmd/kube-proxy/app/init_windows.go
  • cmd/kube-proxy/app/options.go
  • cmd/kube-proxy/app/server.go
  • cmd/kube-proxy/app/server_linux.go
  • cmd/kube-proxy/app/server_linux_test.go
  • cmd/kube-proxy/app/server_other.go
  • cmd/kube-proxy/app/server_test.go
  • cmd/kube-proxy/app/server_windows.go
  • cmd/kube-scheduler/app/options/options.go
  • cmd/kube-scheduler/app/options/options_test.go
  • cmd/kube-scheduler/app/server.go
  • cmd/kubeadm/app/apis/kubeadm/v1beta3/defaults_unix.go
  • cmd/kubeadm/app/apis/kubeadm/v1beta3/defaults_windows.go
  • cmd/kubeadm/app/apis/kubeadm/v1beta4/defaults_unix.go
  • cmd/kubeadm/app/apis/kubeadm/v1beta4/defaults_windows.go
  • cmd/kubeadm/app/apis/kubeadm/validation/util_unix.go
  • cmd/kubeadm/app/apis/kubeadm/validation/util_windows.go
  • cmd/kubeadm/app/cmd/certs_test.go
  • cmd/kubeadm/app/cmd/config.go
  • cmd/kubeadm/app/cmd/init.go
  • cmd/kubeadm/app/cmd/options/constant.go
  • cmd/kubeadm/app/cmd/phases/init/data.go
  • cmd/kubeadm/app/cmd/phases/init/data_test.go
  • cmd/kubeadm/app/cmd/phases/init/kubeletfinalize.go
  • cmd/kubeadm/app/cmd/phases/init/uploadconfig.go
  • cmd/kubeadm/app/cmd/phases/join/controlplanejoin.go
  • cmd/kubeadm/app/cmd/phases/join/data.go
  • cmd/kubeadm/app/cmd/phases/join/data_test.go
  • cmd/kubeadm/app/cmd/phases/join/kubelet.go
  • cmd/kubeadm/app/cmd/phases/reset/cleanupnode.go
  • cmd/kubeadm/app/cmd/phases/reset/data.go
  • cmd/kubeadm/app/cmd/phases/reset/data_test.go
  • cmd/kubeadm/app/cmd/phases/reset/removeetcdmember_test.go
  • cmd/kubeadm/app/cmd/phases/reset/testdata/etcd-pod-without-data-volume.yaml
  • cmd/kubeadm/app/cmd/phases/reset/testdata/etcd-pod.yaml
  • cmd/kubeadm/app/cmd/phases/reset/unmount.go
  • cmd/kubeadm/app/cmd/phases/reset/unmount_linux.go
  • cmd/kubeadm/app/cmd/phases/reset/unmount_linux_test.go
  • cmd/kubeadm/app/cmd/phases/upgrade/apply/uploadconfig.go
  • cmd/kubeadm/app/cmd/phases/upgrade/data.go
  • cmd/kubeadm/app/cmd/phases/upgrade/data_test.go
  • cmd/kubeadm/app/cmd/phases/upgrade/postupgrade.go
  • cmd/kubeadm/app/cmd/reset.go
  • cmd/kubeadm/app/cmd/testdata/token-config.yaml
  • cmd/kubeadm/app/cmd/token_test.go
  • cmd/kubeadm/app/cmd/upgrade/common_test.go
  • cmd/kubeadm/app/cmd/upgrade/plan.go
  • cmd/kubeadm/app/cmd/upgrade/testdata/config-token.yaml
  • cmd/kubeadm/app/cmd/util_other_test.go
  • cmd/kubeadm/app/cmd/util_windows_test.go
  • cmd/kubeadm/app/componentconfigs/kubelet_unix.go
  • cmd/kubeadm/app/componentconfigs/kubelet_unix_test.go
  • cmd/kubeadm/app/componentconfigs/kubelet_windows.go
  • cmd/kubeadm/app/componentconfigs/kubelet_windows_test.go
  • cmd/kubeadm/app/constants/constants.go
  • cmd/kubeadm/app/constants/constants_test.go
  • cmd/kubeadm/app/constants/constants_unix.go
  • cmd/kubeadm/app/constants/constants_windows.go
  • cmd/kubeadm/app/discovery/discovery.go
  • cmd/kubeadm/app/discovery/discovery_test.go
  • cmd/kubeadm/app/discovery/testdata/ca.crt
  • cmd/kubeadm/app/discovery/token/testdata/expected-kubeconfig.yaml
  • cmd/kubeadm/app/discovery/token/token_test.go
  • cmd/kubeadm/app/features/features.go
  • cmd/kubeadm/app/phases/addons/dns/dns_test.go
  • cmd/kubeadm/app/phases/controlplane/manifests_test.go
  • cmd/kubeadm/app/phases/controlplane/volumes.go
  • cmd/kubeadm/app/phases/controlplane/volumes_test.go
  • cmd/kubeadm/app/phases/copycerts/testutil_umask.go
  • cmd/kubeadm/app/phases/copycerts/testutil_umask_noop.go
  • cmd/kubeadm/app/phases/etcd/local.go
  • cmd/kubeadm/app/phases/etcd/local_test.go
  • cmd/kubeadm/app/phases/upgrade/health.go
  • cmd/kubeadm/app/preflight/checks.go
  • cmd/kubeadm/app/preflight/checks_darwin.go
  • cmd/kubeadm/app/preflight/checks_linux.go
  • cmd/kubeadm/app/preflight/checks_other.go
  • cmd/kubeadm/app/preflight/checks_unix.go
  • cmd/kubeadm/app/preflight/checks_windows.go
  • cmd/kubeadm/app/util/apiclient/wait.go
  • cmd/kubeadm/app/util/chroot_unix.go
  • cmd/kubeadm/app/util/chroot_windows.go
  • cmd/kubeadm/app/util/config/cluster_test.go
  • cmd/kubeadm/app/util/config/common.go
  • cmd/kubeadm/app/util/config/common_test.go
  • cmd/kubeadm/app/util/config/testdata/kubelet-with-embedded-cert.yaml
  • cmd/kubeadm/app/util/config/testdata/kubelet-with-invalid-context.yaml
  • cmd/kubeadm/app/util/config/testdata/kubelet-with-invalid-user.yaml
  • cmd/kubeadm/app/util/config/testdata/kubelet-with-linked-cert.yaml
  • cmd/kubeadm/app/util/config/testdata/kubelet-without-cert.yaml
  • cmd/kubeadm/app/util/config/upgradeconfiguration.go
  • cmd/kubeadm/app/util/copy_unix.go
  • cmd/kubeadm/app/util/copy_windows.go
  • cmd/kubeadm/app/util/etcd/etcd.go
  • cmd/kubeadm/app/util/initsystem/initsystem_unix.go
💤 Files with no reviewable changes (1)
  • api/discovery/apis__scheduling.k8s.io__v1alpha1.json
✅ Files skipped from review due to trivial changes (20)
  • .go-version
  • api/discovery/apis__storage.k8s.io__v1beta1.json
  • CHANGELOG/README.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .gitignore
  • api/discovery/apis__scheduling.k8s.io.json
  • api/api-rules/sample_controller_violation_exceptions.list
  • api/discovery/apis__storage.k8s.io__v1.json
  • api/discovery/apis__scheduling.k8s.io__v1alpha2.json
  • .ci-operator.yaml
  • api/discovery/apis__resource.k8s.io__v1alpha3.json
  • api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json
  • api/discovery/apis.json
  • api/api-rules/violation_exceptions.list
  • OWNERS_ALIASES
  • api/discovery/aggregated_v2.json
  • CHANGELOG/CHANGELOG-1.35.md
  • api/openapi-spec/README.md
  • api/openapi-spec/v3/apis__certificates.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__batch__v1_openapi.json
🚧 Files skipped from review as they are similar to previous changes (13)
  • api/discovery/apis__resource.k8s.io__v1beta2.json
  • api/discovery/apis__admissionregistration.k8s.io__v1.json
  • api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json
  • api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__authorization.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__coordination.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json
  • api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json
  • api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json
  • api/openapi-spec/v3/apis__autoscaling__v1_openapi.json

Comment on lines +6447 to +6455
{
"description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.",
"in": "query",
"name": "shardSelector",
"schema": {
"type": "string",
"uniqueItems": true
}
},
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 | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify every repeated shardSelector parameter block that still carries `uniqueItems: true`.
rg -nUP '"name": "shardSelector"\n(?:.*\n){0,8}\s*"uniqueItems": true' api/openapi-spec/v3/apis__apps__v1_openapi.json

Repository: openshift/kubernetes

Length of output: 46


🏁 Script executed:

sed -n '6447,6455p' api/openapi-spec/v3/apis__apps__v1_openapi.json

Repository: openshift/kubernetes

Length of output: 1839


🏁 Script executed:

rg 'uniqueItems' api/openapi-spec/v3/apis__apps__v1_openapi.json -n

Repository: openshift/kubernetes

Length of output: 21280


🏁 Script executed:

# Sample a few uniqueItems occurrences to understand their context
for line_num in 6453 6462 6542 6827; do
  echo "=== Context around line $line_num ==="
  sed -n "$((line_num-3)),$((line_num+1))p" api/openapi-spec/v3/apis__apps__v1_openapi.json
done

Repository: openshift/kubernetes

Length of output: 734


Remove uniqueItems from string/scalar parameter schemas in the generator template.

uniqueItems is only valid for array schemas per JSON Schema and OpenAPI 3.0.3 specifications. It appears on non-array types throughout this generated file (e.g., shardSelector at line 6453 is a string, timeoutSeconds is an integer, allowWatchBookmarks is a boolean). These instances are dead metadata that can trigger semantic warnings in OpenAPI linting and codegen tools. Fix this in the common generator template so all generated specs are corrected together.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/openapi-spec/v3/apis__apps__v1_openapi.json` around lines 6447 - 6455,
The OpenAPI generator template is emitting invalid "uniqueItems" on non-array
parameter schemas (e.g., the "shardSelector" query parameter schema is a string
but includes "uniqueItems": true); update the generator template to only emit
"uniqueItems" when the schema.type is "array" (or when an array schema object is
being rendered) so scalar types (string, integer, boolean) never get a
uniqueItems property; search for the templated parameter rendering code that
outputs "uniqueItems" (used for parameters like shardSelector, timeoutSeconds,
allowWatchBookmarks) and wrap or gate that emission with a check for schema.type
== "array" (or equivalent template helper) so generated specs no longer include
dead/invalid metadata.

Comment on lines +992 to +999
{
"description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.",
"in": "query",
"name": "shardSelector",
"schema": {
"type": "string",
"uniqueItems": true
}
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 | 🟡 Minor | ⚡ Quick win

Clarify shardSelector description for DELETE collection.

At Line 993, the text says it “restricts the list of returned objects,” but this operation is deletecollection (Line 880) and returns a status object. The first sentence should be operation-neutral (or delete-specific) to avoid API-doc confusion.

✏️ Suggested wording tweak
- "description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. ...
+ "description": "shardSelector restricts the objects targeted by this request using a CEL-based shard selector expression. ...
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.",
"in": "query",
"name": "shardSelector",
"schema": {
"type": "string",
"uniqueItems": true
}
{
"description": "shardSelector restricts the objects targeted by this request using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.",
"in": "query",
"name": "shardSelector",
"schema": {
"type": "string",
"uniqueItems": true
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json` around lines
992 - 999, The description for the query parameter "shardSelector" is currently
phrased as if the operation returns a list ("restricts the list of returned
objects") but this parameter is used on the deletecollection operation and
returns a status; change the first sentence to be operation-neutral (e.g.
"restricts the set of objects the operation applies to using a CEL-based shard
selector expression") so it accurately describes deletecollection and other
operations; update the "description" text associated with the "shardSelector"
parameter in the openapi JSON (the block containing "name": "shardSelector" and
its "schema") to use the new wording while leaving the rest of the
explanation/examples intact.

Comment on lines +926 to +934
{
"description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.",
"in": "query",
"name": "shardSelector",
"schema": {
"type": "string",
"uniqueItems": true
}
},
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 | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in $(fd -a 'apis__coordination.k8s.io__v(1|1alpha2)_openapi.json' api/openapi-spec/v3); do
  python - "$f" <<'PY'
import json, sys
path = sys.argv[1]
doc = json.load(open(path))
bad = []

def walk(node, p):
    if isinstance(node, dict):
        if node.get("name") == "shardSelector" and isinstance(node.get("schema"), dict):
            s = node["schema"]
            if "uniqueItems" in s and s.get("type") != "array":
                bad.append((p + "/schema", s.get("type"), s.get("uniqueItems")))
        for k, v in node.items():
            walk(v, f"{p}/{k}")
    elif isinstance(node, list):
        for i, v in enumerate(node):
            walk(v, f"{p}/{i}")

walk(doc, "$")
if bad:
    print(path)
    for ptr, t, u in bad:
        print(f"  {ptr}: type={t}, uniqueItems={u}")
PY
done

Repository: openshift/kubernetes

Length of output: 1750


🏁 Script executed:

#!/bin/bash

# Check the specific lines mentioned in the review comment for the v1 file
FILE="api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json"

echo "=== Line ranges mentioned in review ==="
echo "Lines 926-934:"
sed -n '926,934p' "$FILE" | head -20

echo ""
echo "Lines 1068-1076:"
sed -n '1068,1076p' "$FILE" | head -20

echo ""
echo "Lines 1212-1220:"
sed -n '1212,1220p' "$FILE" | head -20

echo ""
echo "=== Count of all shardSelector occurrences ==="
grep -c '"shardSelector"' "$FILE"

echo ""
echo "=== All shardSelector occurrences with line numbers ==="
grep -n '"shardSelector"' "$FILE"

Repository: openshift/kubernetes

Length of output: 5866


Remove uniqueItems from shardSelector string schemas.

These shardSelector parameters have type: string with uniqueItems: true. The uniqueItems constraint only applies to arrays per the OpenAPI specification. Keeping it can break strict OpenAPI validation and code generation.

All six occurrences (lines 926–934, 1068–1076, 1212–1220, 2033–2041, 2213–2221, 2403–2411) must be updated to remove uniqueItems.

Proposed fix
           "schema": {
-            "type": "string",
-            "uniqueItems": true
+            "type": "string"
           }

Apply this change to all six shardSelector occurrences in the file.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.",
"in": "query",
"name": "shardSelector",
"schema": {
"type": "string",
"uniqueItems": true
}
},
{
"description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.",
"in": "query",
"name": "shardSelector",
"schema": {
"type": "string"
}
},
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json` around lines
926 - 934, The shardSelector query-parameter schema objects incorrectly include
the array-only property "uniqueItems" while their "type" is "string"; remove the
"uniqueItems" field from each shardSelector parameter schema (the six parameter
entries named "shardSelector") so the schema is just { "type": "string" } and
does not include uniqueItems. Locate the entries by the parameter name
"shardSelector" in the OpenAPI JSON (the schema objects that currently show
"type": "string" and "uniqueItems": true) and delete the uniqueItems line in
each occurrence.

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. backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. vendor-update Touching vendor dir or related files

Projects

None yet

Development

Successfully merging this pull request may close these issues.