mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 19:52:42 +00:00
Merge pull request #5233 from brendandburns/labels
Make label and field selector query strings versionable.
This commit is contained in:
@@ -101,8 +101,8 @@ func (e *events) List(label, field labels.Selector) (*api.EventList, error) {
|
||||
err := e.client.Get().
|
||||
NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
|
||||
Resource("events").
|
||||
SelectorParam("labels", label).
|
||||
SelectorParam("fields", field).
|
||||
SelectorParam(api.LabelSelectorQueryParam(e.client.APIVersion()), label).
|
||||
SelectorParam(api.FieldSelectorQueryParam(e.client.APIVersion()), field).
|
||||
Do().
|
||||
Into(result)
|
||||
return result, err
|
||||
@@ -131,8 +131,8 @@ func (e *events) Watch(label, field labels.Selector, resourceVersion string) (wa
|
||||
NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
|
||||
Resource("events").
|
||||
Param("resourceVersion", resourceVersion).
|
||||
SelectorParam("labels", label).
|
||||
SelectorParam("fields", field).
|
||||
SelectorParam(api.LabelSelectorQueryParam(e.client.APIVersion()), label).
|
||||
SelectorParam(api.FieldSelectorQueryParam(e.client.APIVersion()), field).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user