Prior, table client configs were mistakenly swapped out for regular
client configs. This caused requests using these methods to no
longer return table column data under metadata.fields. Consequently,
table data was blank in the dashboard UI. Now, the client config
swap has been reverted and table fields should be populated in the
dashboard UI.
Without this change, the cache is checked if a revision is specified,
but the revision is ignored if the value is not found in the cache. This
is a problem if by chance sequential paginated requests land on separate
pods, because a different version number may be fetched on the sequent
request and cause the caches to be inconsistent with one another. This
change ensures that `revision` is passed as `resourceVersion` to the
Kubernetes request, since `revision` has no meaning to Kubernetes.
The default chunk size in the partition was set to 100000. It could be
overridden as a larger or smaller number, but not disabled altogether.
This change adds the ability for users to explicitly opt out of the
limit by specifying a negative number or zero. The default behavior is
the same.
Extend the sorting functionality in the partition store to support
primary and secondary sorting criteria. Sorting parameters are specified
by a single 'sort' query and comma separated. Example:
Sort by name and creation time:
GET /v1/secrets?sort=metadata.name,metadata.creationTimestamp
Reverse sort by name, normal sort by creation time:
GET /v1/secrets?sort=-metadata.name,metadata.creationTimestamp
Normal sort by name, reverse sort by creation time:
GET /v1/secrets?sort=metadata.name,-metadata.creationTimestamp
Cache filtered, sorted results for fast subsequent page retrieval.
Requests for cached queries need to include the list revision number
along with other queries. If no specific revision is requested, a new
fetch is done in order to get the latest revision. The revision is
included in the list response.
Example first request:
GET /v1/secrets?pagesize=10
Example subsequent page request:
GET /v1/secrets?pagesize=10&page=1&revision=107740
Extend the partition store to parse page and pagesize parameters and
return a subset of list results. The total number of pages is included
in the list response.
Request an initial page:
GET /v1/secrets?pagesize=10
or
GET /v1/secrets?pagesize=10&page=1
Request subsequent pages, or arbitrary pages:
GET /v1/secrets?pagesize=10&page=37
If a page number is out of bounds, an empty list is returned.
Extend the partition store to parse the "sort" query parameter as a
sorting condition. Dot notation is used to denote the object field.
Preceding the key with "-" denotes descending (reverse) order.
Example sorting by name:
GET /v1/secrets?sort=metadata.name
Reverse sorting by name:
GET /v1/secrets?sort=-metadata.name
All values are converted to strings and sorted lexicographically.
Extend the partition store to parse query params as list filters. Filter
keys use dot notation to denote the subfield of an object to filter on.
Example:
GET /v1/secrets?filter=metadata.name=foo
Filters are ANDed together, so an object must match all filters to be
included in the list. Example:
GET /v1/secrets?filter=metadata.name=foo&filter=metadata.namespace=bar
Arrays are searched for matching items. If any item in the array
matches, the item is included in the list. Example:
GET /v1/pods?filter=spec.containers.image=alpine
Filtering and sorting needs to operate on unstructured data. It also
needs to operate after the parallel partitioner, higher in the store
stack. This means that the proxy Store needs to return raw, unstructured
data up to the partitioner. This change moves all conversions from
unstructured Kubernetes types to apiserver objects up from the proxy
store into the partitioner.
The use of AddNamespaceConstraint was removed in e35b8304 of
rancher/rancher, so there is no possibility of there being a namespace
constraint in the request context. Remove the unused function and the
unused codepath from the rbac store.
The header defined in RFC 9110[1] is "Accept", not "Accepts". This
change corrects the route filter. Since this API is not documented and
the header was plainly incorrect, no attempt is made at backwards
compatibility.
[1] https://www.rfc-editor.org/rfc/rfc9110.html#name-accept