Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only enforce RangeEnd + Limit restriction when RangeEnd is set #126

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

brandond
Copy link
Member

@brandond brandond commented Jun 30, 2022

Related to: rancher/rancher#36922
Caused by: kubernetes/kubernetes#108569

Get requests with a field-selector now create range requests that include a limit (page size) that is managed by the apiserver. Kine was enforcing an unconditional restriction on the limit not being set, when the apparent intention was to only prohibit use of limit + rangeEnd at the same time.

Kubernetes 1.24 will when searching within a namespace for a resource using FieldSelector on metatada.name, send a Get request for the fully qualified resource name, but with a non-zero limit:
RangeRequest Key=/registry/services/specs/default/kubernetes RangeEnd= Limit=500 Revision=0 SortOrder=0 SortTarget=0 Serializable=false KeysOnly=false CountOnly=false

Confirmed that this fixes use of fieldSelector with K3s 1.24.2

Copy link
Contributor

@galal-hussein galal-hussein left a comment

Choose a reason for hiding this comment

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

Nice Catch! LGTM

Required for compatibility with Kubernetes 1.24, which when searching
within a namespace for a resource using FieldSelector on metatada.name,
sends a Get request for the fully qualified resource name, but with a
non-zero limit.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants