mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Fix path ordering in client
This commit is contained in:
parent
6694a45542
commit
cbbe61d115
@ -78,8 +78,8 @@ func (c *endpoints) Get(name string) (result *api.Endpoints, err error) {
|
|||||||
// Watch returns a watch.Interface that watches the requested endpoints for a service.
|
// Watch returns a watch.Interface that watches the requested endpoints for a service.
|
||||||
func (c *endpoints) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
func (c *endpoints) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
||||||
return c.r.Get().
|
return c.r.Get().
|
||||||
Namespace(c.ns).
|
|
||||||
Path("watch").
|
Path("watch").
|
||||||
|
Namespace(c.ns).
|
||||||
Path("endpoints").
|
Path("endpoints").
|
||||||
Param("resourceVersion", resourceVersion).
|
Param("resourceVersion", resourceVersion).
|
||||||
SelectorParam("labels", label).
|
SelectorParam("labels", label).
|
||||||
|
@ -65,8 +65,8 @@ func (e *events) Create(event *api.Event) (*api.Event, error) {
|
|||||||
}
|
}
|
||||||
result := &api.Event{}
|
result := &api.Event{}
|
||||||
err := e.client.Post().
|
err := e.client.Post().
|
||||||
Path("events").
|
|
||||||
Namespace(event.Namespace).
|
Namespace(event.Namespace).
|
||||||
|
Path("events").
|
||||||
Body(event).
|
Body(event).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
@ -77,8 +77,8 @@ func (e *events) Create(event *api.Event) (*api.Event, error) {
|
|||||||
func (e *events) List(label, field labels.Selector) (*api.EventList, error) {
|
func (e *events) List(label, field labels.Selector) (*api.EventList, error) {
|
||||||
result := &api.EventList{}
|
result := &api.EventList{}
|
||||||
err := e.client.Get().
|
err := e.client.Get().
|
||||||
Path("events").
|
|
||||||
Namespace(e.namespace).
|
Namespace(e.namespace).
|
||||||
|
Path("events").
|
||||||
SelectorParam("labels", label).
|
SelectorParam("labels", label).
|
||||||
SelectorParam("fields", field).
|
SelectorParam("fields", field).
|
||||||
Do().
|
Do().
|
||||||
@ -94,9 +94,9 @@ func (e *events) Get(name string) (*api.Event, error) {
|
|||||||
|
|
||||||
result := &api.Event{}
|
result := &api.Event{}
|
||||||
err := e.client.Get().
|
err := e.client.Get().
|
||||||
|
Namespace(e.namespace).
|
||||||
Path("events").
|
Path("events").
|
||||||
Path(name).
|
Path(name).
|
||||||
Namespace(e.namespace).
|
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return result, err
|
return result, err
|
||||||
@ -106,9 +106,9 @@ func (e *events) Get(name string) (*api.Event, error) {
|
|||||||
func (e *events) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
func (e *events) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
||||||
return e.client.Get().
|
return e.client.Get().
|
||||||
Path("watch").
|
Path("watch").
|
||||||
|
Namespace(e.namespace).
|
||||||
Path("events").
|
Path("events").
|
||||||
Param("resourceVersion", resourceVersion).
|
Param("resourceVersion", resourceVersion).
|
||||||
Namespace(e.namespace).
|
|
||||||
SelectorParam("labels", label).
|
SelectorParam("labels", label).
|
||||||
SelectorParam("fields", field).
|
SelectorParam("fields", field).
|
||||||
Watch()
|
Watch()
|
||||||
|
@ -95,8 +95,8 @@ func (c *replicationControllers) Delete(name string) error {
|
|||||||
// Watch returns a watch.Interface that watches the requested controllers.
|
// Watch returns a watch.Interface that watches the requested controllers.
|
||||||
func (c *replicationControllers) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
func (c *replicationControllers) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
||||||
return c.r.Get().
|
return c.r.Get().
|
||||||
Namespace(c.ns).
|
|
||||||
Path("watch").
|
Path("watch").
|
||||||
|
Namespace(c.ns).
|
||||||
Path("replicationControllers").
|
Path("replicationControllers").
|
||||||
Param("resourceVersion", resourceVersion).
|
Param("resourceVersion", resourceVersion).
|
||||||
SelectorParam("labels", label).
|
SelectorParam("labels", label).
|
||||||
|
@ -95,8 +95,8 @@ func (c *services) Delete(name string) error {
|
|||||||
// Watch returns a watch.Interface that watches the requested services.
|
// Watch returns a watch.Interface that watches the requested services.
|
||||||
func (c *services) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
func (c *services) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
||||||
return c.r.Get().
|
return c.r.Get().
|
||||||
Namespace(c.ns).
|
|
||||||
Path("watch").
|
Path("watch").
|
||||||
|
Namespace(c.ns).
|
||||||
Path("services").
|
Path("services").
|
||||||
Param("resourceVersion", resourceVersion).
|
Param("resourceVersion", resourceVersion).
|
||||||
SelectorParam("labels", label).
|
SelectorParam("labels", label).
|
||||||
|
Loading…
Reference in New Issue
Block a user