mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 17:00:56 +02:00
use proper ParameterCodec
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/watch"
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
"k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
|
|
||||||
"github.com/zalando-incubator/postgres-operator/pkg/cluster"
|
"github.com/zalando-incubator/postgres-operator/pkg/cluster"
|
||||||
@@ -39,7 +39,7 @@ func (c *Controller) clusterListFunc(options meta_v1.ListOptions) (runtime.Objec
|
|||||||
|
|
||||||
req := c.RestClient.Get().
|
req := c.RestClient.Get().
|
||||||
RequestURI(fmt.Sprintf(constants.ListClustersURITemplate, c.opConfig.Namespace)).
|
RequestURI(fmt.Sprintf(constants.ListClustersURITemplate, c.opConfig.Namespace)).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
FieldsSelectorParam(fields.Everything())
|
FieldsSelectorParam(fields.Everything())
|
||||||
|
|
||||||
object, err := req.Do().Get()
|
object, err := req.Do().Get()
|
||||||
@@ -92,7 +92,7 @@ func (c *Controller) clusterListFunc(options meta_v1.ListOptions) (runtime.Objec
|
|||||||
func (c *Controller) clusterWatchFunc(options meta_v1.ListOptions) (watch.Interface, error) {
|
func (c *Controller) clusterWatchFunc(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
req := c.RestClient.Get().
|
req := c.RestClient.Get().
|
||||||
RequestURI(fmt.Sprintf(constants.WatchClustersURITemplate, c.opConfig.Namespace)).
|
RequestURI(fmt.Sprintf(constants.WatchClustersURITemplate, c.opConfig.Namespace)).
|
||||||
VersionedParams(&options, api.ParameterCodec).
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
FieldsSelectorParam(fields.Everything())
|
FieldsSelectorParam(fields.Everything())
|
||||||
return req.Watch()
|
return req.Watch()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user