FindFilteredLabelSelectorOptions
Options for findFiltered when using label selector matching (label selector mode).
Filters resources by labelSelector (matchLabels / matchExpressions).
The store automatically handles pagination:
- If
ui-sql-cacheis enabled: uses server-side pagination - Otherwise: uses native Kubernetes API pagination
Example
import { useResources, K8S } from '@shell/apis';
const resources = useResources();
const pods = await resources.cluster.findFiltered(K8S.POD, {
labelSelector: { matchLabels: { type: 'my-type' } }
});
Properties
force?
optional force?: boolean;
Force the request to go to the server instead of checking for a cached value first
labelSelector
labelSelector: KubeLabelSelector;
Represents the label selector to filter by
Example
{
matchLabels: {
app: 'my-app',
tier: 'frontend'
},
matchExpressions: [
{
key: 'environment',
operator: 'In',
values: ['production', 'staging']
}
]
}
namespaced?
optional namespaced?: string;
The single namespace to filter by (used in url path, not part of pagination params)
url?
optional url?: string;
Use this to override URL instead of looking up the URL for the type/id