mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 03:07:33 +02:00
client-go v4.0.0-beta0
go fmt glide
This commit is contained in:
@@ -4,12 +4,13 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/pkg/api"
|
||||
apierrors "k8s.io/client-go/pkg/api/errors"
|
||||
"k8s.io/client-go/pkg/api/unversioned"
|
||||
"k8s.io/client-go/pkg/runtime"
|
||||
"k8s.io/client-go/pkg/runtime/serializer"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
|
||||
@@ -38,21 +39,21 @@ func ResourceNotFound(err error) bool {
|
||||
}
|
||||
|
||||
func KubernetesRestClient(c *rest.Config) (*rest.RESTClient, error) {
|
||||
c.GroupVersion = &unversioned.GroupVersion{Version: constants.K8sVersion}
|
||||
c.GroupVersion = &schema.GroupVersion{Version: constants.K8sVersion}
|
||||
c.APIPath = constants.K8sAPIPath
|
||||
c.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
||||
|
||||
schemeBuilder := runtime.NewSchemeBuilder(
|
||||
func(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(
|
||||
unversioned.GroupVersion{
|
||||
schema.GroupVersion{
|
||||
Group: constants.TPRVendor,
|
||||
Version: constants.TPRApiVersion,
|
||||
},
|
||||
&spec.Postgresql{},
|
||||
&spec.PostgresqlList{},
|
||||
&api.ListOptions{},
|
||||
&api.DeleteOptions{},
|
||||
&meta_v1.ListOptions{},
|
||||
&meta_v1.DeleteOptions{},
|
||||
)
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user