mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +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.
|
||||
func (c *endpoints) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Namespace(c.ns).
|
||||
Path("watch").
|
||||
Namespace(c.ns).
|
||||
Path("endpoints").
|
||||
Param("resourceVersion", resourceVersion).
|
||||
SelectorParam("labels", label).
|
||||
|
@ -65,8 +65,8 @@ func (e *events) Create(event *api.Event) (*api.Event, error) {
|
||||
}
|
||||
result := &api.Event{}
|
||||
err := e.client.Post().
|
||||
Path("events").
|
||||
Namespace(event.Namespace).
|
||||
Path("events").
|
||||
Body(event).
|
||||
Do().
|
||||
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) {
|
||||
result := &api.EventList{}
|
||||
err := e.client.Get().
|
||||
Path("events").
|
||||
Namespace(e.namespace).
|
||||
Path("events").
|
||||
SelectorParam("labels", label).
|
||||
SelectorParam("fields", field).
|
||||
Do().
|
||||
@ -94,9 +94,9 @@ func (e *events) Get(name string) (*api.Event, error) {
|
||||
|
||||
result := &api.Event{}
|
||||
err := e.client.Get().
|
||||
Namespace(e.namespace).
|
||||
Path("events").
|
||||
Path(name).
|
||||
Namespace(e.namespace).
|
||||
Do().
|
||||
Into(result)
|
||||
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) {
|
||||
return e.client.Get().
|
||||
Path("watch").
|
||||
Namespace(e.namespace).
|
||||
Path("events").
|
||||
Param("resourceVersion", resourceVersion).
|
||||
Namespace(e.namespace).
|
||||
SelectorParam("labels", label).
|
||||
SelectorParam("fields", field).
|
||||
Watch()
|
||||
|
@ -95,8 +95,8 @@ func (c *replicationControllers) Delete(name string) error {
|
||||
// Watch returns a watch.Interface that watches the requested controllers.
|
||||
func (c *replicationControllers) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Namespace(c.ns).
|
||||
Path("watch").
|
||||
Namespace(c.ns).
|
||||
Path("replicationControllers").
|
||||
Param("resourceVersion", resourceVersion).
|
||||
SelectorParam("labels", label).
|
||||
|
@ -95,8 +95,8 @@ func (c *services) Delete(name string) error {
|
||||
// Watch returns a watch.Interface that watches the requested services.
|
||||
func (c *services) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Namespace(c.ns).
|
||||
Path("watch").
|
||||
Namespace(c.ns).
|
||||
Path("services").
|
||||
Param("resourceVersion", resourceVersion).
|
||||
SelectorParam("labels", label).
|
||||
|
Loading…
Reference in New Issue
Block a user