diff options
Diffstat (limited to 'plugin/kubernetes')
-rw-r--r-- | plugin/kubernetes/autopath.go | 2 | ||||
-rw-r--r-- | plugin/kubernetes/controller.go | 18 | ||||
-rw-r--r-- | plugin/kubernetes/handler_test.go | 2 | ||||
-rw-r--r-- | plugin/kubernetes/kubernetes.go | 2 | ||||
-rw-r--r-- | plugin/kubernetes/kubernetes_test.go | 2 | ||||
-rw-r--r-- | plugin/kubernetes/ns.go | 2 | ||||
-rw-r--r-- | plugin/kubernetes/ns_test.go | 2 | ||||
-rw-r--r-- | plugin/kubernetes/reverse_test.go | 2 |
8 files changed, 16 insertions, 16 deletions
diff --git a/plugin/kubernetes/autopath.go b/plugin/kubernetes/autopath.go index feab430a9..45fe26088 100644 --- a/plugin/kubernetes/autopath.go +++ b/plugin/kubernetes/autopath.go @@ -4,7 +4,7 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - api "k8s.io/client-go/pkg/api/v1" + api "k8s.io/api/core/v1" ) // AutoPath implements the AutoPathFunc call from the autopath plugin. diff --git a/plugin/kubernetes/controller.go b/plugin/kubernetes/controller.go index c47c33819..536f65f32 100644 --- a/plugin/kubernetes/controller.go +++ b/plugin/kubernetes/controller.go @@ -6,8 +6,8 @@ import ( "sync" "time" + api "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes" - api "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/tools/cache" meta "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -164,7 +164,7 @@ func serviceListFunc(c *kubernetes.Clientset, ns string, s *labels.Selector) fun if s != nil { opts.LabelSelector = (*s).String() } - listV1, err := c.Services(ns).List(opts) + listV1, err := c.CoreV1().Services(ns).List(opts) if err != nil { return nil, err } @@ -177,7 +177,7 @@ func podListFunc(c *kubernetes.Clientset, ns string, s *labels.Selector) func(me if s != nil { opts.LabelSelector = (*s).String() } - listV1, err := c.Pods(ns).List(opts) + listV1, err := c.CoreV1().Pods(ns).List(opts) if err != nil { return nil, err } @@ -190,7 +190,7 @@ func serviceWatchFunc(c *kubernetes.Clientset, ns string, s *labels.Selector) fu if s != nil { options.LabelSelector = (*s).String() } - w, err := c.Services(ns).Watch(options) + w, err := c.CoreV1().Services(ns).Watch(options) if err != nil { return nil, err } @@ -203,7 +203,7 @@ func podWatchFunc(c *kubernetes.Clientset, ns string, s *labels.Selector) func(o if s != nil { options.LabelSelector = (*s).String() } - w, err := c.Pods(ns).Watch(options) + w, err := c.CoreV1().Pods(ns).Watch(options) if err != nil { return nil, err } @@ -216,7 +216,7 @@ func endpointsListFunc(c *kubernetes.Clientset, ns string, s *labels.Selector) f if s != nil { opts.LabelSelector = (*s).String() } - listV1, err := c.Endpoints(ns).List(opts) + listV1, err := c.CoreV1().Endpoints(ns).List(opts) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func endpointsWatchFunc(c *kubernetes.Clientset, ns string, s *labels.Selector) if s != nil { options.LabelSelector = (*s).String() } - w, err := c.Endpoints(ns).Watch(options) + w, err := c.CoreV1().Endpoints(ns).Watch(options) if err != nil { return nil, err } @@ -393,7 +393,7 @@ func (dns *dnsControl) EndpointsList() (eps []*api.Endpoints) { // returned. This query causes a roundtrip to the k8s API server, so use // sparingly. Currently this is only used for Federation. func (dns *dnsControl) GetNodeByName(name string) (*api.Node, error) { - v1node, err := dns.client.Nodes().Get(name, meta.GetOptions{}) + v1node, err := dns.client.CoreV1().Nodes().Get(name, meta.GetOptions{}) if err != nil { return &api.Node{}, err } @@ -404,7 +404,7 @@ func (dns *dnsControl) GetNodeByName(name string) (*api.Node, error) { // error is returned. This query causes a roundtrip to the k8s API server, so // use sparingly. func (dns *dnsControl) GetNamespaceByName(name string) (*api.Namespace, error) { - v1ns, err := dns.client.Namespaces().Get(name, meta.GetOptions{}) + v1ns, err := dns.client.CoreV1().Namespaces().Get(name, meta.GetOptions{}) if err != nil { return &api.Namespace{}, err } diff --git a/plugin/kubernetes/handler_test.go b/plugin/kubernetes/handler_test.go index fb510857f..f92c8aa4b 100644 --- a/plugin/kubernetes/handler_test.go +++ b/plugin/kubernetes/handler_test.go @@ -8,8 +8,8 @@ import ( "github.com/miekg/dns" "golang.org/x/net/context" + api "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - api "k8s.io/client-go/pkg/api/v1" ) var dnsTestCases = []test.Case{ diff --git a/plugin/kubernetes/kubernetes.go b/plugin/kubernetes/kubernetes.go index c16083f0e..3a2c4870d 100644 --- a/plugin/kubernetes/kubernetes.go +++ b/plugin/kubernetes/kubernetes.go @@ -17,10 +17,10 @@ import ( "github.com/coredns/coredns/request" "github.com/miekg/dns" + api "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/kubernetes" - api "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" diff --git a/plugin/kubernetes/kubernetes_test.go b/plugin/kubernetes/kubernetes_test.go index 6a95c5b71..2eb7330c0 100644 --- a/plugin/kubernetes/kubernetes_test.go +++ b/plugin/kubernetes/kubernetes_test.go @@ -7,8 +7,8 @@ import ( "github.com/coredns/coredns/request" "github.com/miekg/dns" + api "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - api "k8s.io/client-go/pkg/api/v1" ) func TestWildcard(t *testing.T) { diff --git a/plugin/kubernetes/ns.go b/plugin/kubernetes/ns.go index 16fa36994..af5c86450 100644 --- a/plugin/kubernetes/ns.go +++ b/plugin/kubernetes/ns.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/miekg/dns" - api "k8s.io/client-go/pkg/api/v1" + api "k8s.io/api/core/v1" ) func isDefaultNS(name, zone string) bool { diff --git a/plugin/kubernetes/ns_test.go b/plugin/kubernetes/ns_test.go index 853ef9288..f328bf06c 100644 --- a/plugin/kubernetes/ns_test.go +++ b/plugin/kubernetes/ns_test.go @@ -3,8 +3,8 @@ package kubernetes import ( "testing" + api "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - api "k8s.io/client-go/pkg/api/v1" ) type APIConnTest struct{} diff --git a/plugin/kubernetes/reverse_test.go b/plugin/kubernetes/reverse_test.go index 941d1ab08..881b99285 100644 --- a/plugin/kubernetes/reverse_test.go +++ b/plugin/kubernetes/reverse_test.go @@ -8,8 +8,8 @@ import ( "github.com/miekg/dns" "golang.org/x/net/context" + api "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" - api "k8s.io/client-go/pkg/api/v1" ) type APIConnReverseTest struct{} |