Merge pull request #3141 from bjhaid/upgrade_client_go
Upgrading client go and vendoring its extra dependencies.
This commit is contained in:
commit
ee48700b40
25 files changed
+95
-35
No files matched your search
+45
@@ -133,3 +133,48 @@
|
||||
[submodule "vendor/golang.org/x/net"]
|
||||
path = vendor/golang.org/x/net
|
||||
url = https://github.com/golang/net
|
||||
[submodule "vendor/k8s.io/api"]
|
||||
path = vendor/k8s.io/api
|
||||
url = https://github.com/kubernetes/api
|
||||
[submodule "vendor/k8s.io/apimachinery"]
|
||||
path = vendor/k8s.io/apimachinery
|
||||
url = https://github.com/kubernetes/apimachinery
|
||||
[submodule "vendor/github.com/PuerkitoBio/purell"]
|
||||
path = vendor/github.com/PuerkitoBio/purell
|
||||
url = https://github.com/PuerkitoBio/purell
|
||||
[submodule "vendor/github.com/PuerkitoBio/urlesc"]
|
||||
path = vendor/github.com/PuerkitoBio/urlesc
|
||||
url = https://github.com/PuerkitoBio/urlesc
|
||||
[submodule "vendor/github.com/emicklei/go-restful"]
|
||||
path = vendor/github.com/emicklei/go-restful
|
||||
url = https://github.com/emicklei/go-restful
|
||||
[submodule "vendor/github.com/go-openapi/jsonpointer"]
|
||||
path = vendor/github.com/go-openapi/jsonpointer
|
||||
url = https://github.com/go-openapi/jsonpointer
|
||||
[submodule "vendor/github.com/go-openapi/jsonreference"]
|
||||
path = vendor/github.com/go-openapi/jsonreference
|
||||
url = https://github.com/go-openapi/jsonreference
|
||||
[submodule "vendor/github.com/go-openapi/spec"]
|
||||
path = vendor/github.com/go-openapi/spec
|
||||
url = https://github.com/go-openapi/spec
|
||||
[submodule "vendor/github.com/go-openapi/swag"]
|
||||
path = vendor/github.com/go-openapi/swag
|
||||
url = https://github.com/go-openapi/swag
|
||||
[submodule "vendor/github.com/golang/glog"]
|
||||
path = vendor/github.com/golang/glog
|
||||
url = https://github.com/golang/glog
|
||||
[submodule "vendor/github.com/google/gofuzz"]
|
||||
path = vendor/github.com/google/gofuzz
|
||||
url = https://github.com/google/gofuzz
|
||||
[submodule "vendor/github.com/mailru/easyjson"]
|
||||
path = vendor/github.com/mailru/easyjson
|
||||
url = https://github.com/mailru/easyjson
|
||||
[submodule "vendor/k8s.io/kube-openapi"]
|
||||
path = vendor/k8s.io/kube-openapi
|
||||
url = https://github.com/kubernetes/kube-openapi
|
||||
[submodule "vendor/golang.org/x/text"]
|
||||
path = vendor/golang.org/x/text
|
||||
url = https://go.googlesource.com/text
|
||||
[submodule "vendor/gopkg.in/yaml.v2"]
|
||||
path = vendor/gopkg.in/yaml.v2
|
||||
url = https://gopkg.in/yaml.v2
|
||||
+4
-4
@@ -3,9 +3,9 @@ package npc
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/client-go/pkg/api"
|
||||
extnapi "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||
"k8s.io/client-go/pkg/util/intstr"
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
extnapi "k8s.io/api/extensions/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
"github.com/weaveworks/weave/npc/ipset"
|
||||
)
|
||||
@@ -92,7 +92,7 @@ func (ns *ns) analysePolicy(policy *extnapi.NetworkPolicy) (
|
||||
func withNormalisedProtoAndPort(npps []extnapi.NetworkPolicyPort, f func(proto, port string)) {
|
||||
for _, npp := range npps {
|
||||
// If no proto is specified, default to TCP
|
||||
proto := string(api.ProtocolTCP)
|
||||
proto := string(apiv1.ProtocolTCP)
|
||||
if npp.Protocol != nil {
|
||||
proto = string(*npp.Protocol)
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
coreapi "k8s.io/client-go/pkg/api/v1"
|
||||
extnapi "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||
coreapi "k8s.io/api/core/v1"
|
||||
extnapi "k8s.io/api/extensions/v1beta1"
|
||||
|
||||
"github.com/weaveworks/weave/common"
|
||||
"github.com/weaveworks/weave/npc/ipset"
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/weaveworks/weave/npc/ipset"
|
||||
unversionedapi "k8s.io/client-go/pkg/api/unversioned"
|
||||
coreapi "k8s.io/client-go/pkg/api/v1"
|
||||
extnapi "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||
"k8s.io/client-go/pkg/util/intstr"
|
||||
coreapi "k8s.io/api/core/v1"
|
||||
extnapi "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
type mockSet struct {
|
||||
@@ -109,7 +109,7 @@ func TestRegressionPolicyNamespaceOrdering3059(t *testing.T) {
|
||||
// https://github.com/weaveworks/weave/issues/3059
|
||||
|
||||
sourceNamespace := &coreapi.Namespace{
|
||||
ObjectMeta: coreapi.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "source",
|
||||
Labels: map[string]string{
|
||||
"app": "source",
|
||||
@@ -118,7 +118,7 @@ func TestRegressionPolicyNamespaceOrdering3059(t *testing.T) {
|
||||
}
|
||||
|
||||
destinationNamespace := &coreapi.Namespace{
|
||||
ObjectMeta: coreapi.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "destination",
|
||||
},
|
||||
}
|
||||
@@ -126,7 +126,7 @@ func TestRegressionPolicyNamespaceOrdering3059(t *testing.T) {
|
||||
port := intstr.FromInt(12345)
|
||||
|
||||
networkPolicy := &extnapi.NetworkPolicy{
|
||||
ObjectMeta: coreapi.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "network-policy",
|
||||
Namespace: "destination",
|
||||
},
|
||||
@@ -135,7 +135,7 @@ func TestRegressionPolicyNamespaceOrdering3059(t *testing.T) {
|
||||
{
|
||||
From: []extnapi.NetworkPolicyPeer{
|
||||
{
|
||||
NamespaceSelector: &unversionedapi.LabelSelector{
|
||||
NamespaceSelector: &metav1.LabelSelector{
|
||||
MatchLabels: map[string]string{
|
||||
"app": "source",
|
||||
},
|
||||
|
||||
+6
-6
@@ -4,11 +4,11 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"k8s.io/client-go/pkg/api/unversioned"
|
||||
coreapi "k8s.io/client-go/pkg/api/v1"
|
||||
extnapi "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||
"k8s.io/client-go/pkg/types"
|
||||
"k8s.io/client-go/pkg/util/uuid"
|
||||
coreapi "k8s.io/api/core/v1"
|
||||
extnapi "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/uuid"
|
||||
|
||||
"github.com/weaveworks/weave/common"
|
||||
"github.com/weaveworks/weave/npc/ipset"
|
||||
@@ -34,7 +34,7 @@ type ns struct {
|
||||
}
|
||||
|
||||
func newNS(name, nodeName string, ipt iptables.Interface, ips ipset.Interface, nsSelectors *selectorSet) (*ns, error) {
|
||||
allPods, err := newSelectorSpec(&unversioned.LabelSelector{}, name, ipset.HashIP)
|
||||
allPods, err := newSelectorSpec(&metav1.LabelSelector{}, name, ipset.HashIP)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"k8s.io/client-go/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
||||
"github.com/weaveworks/weave/common"
|
||||
"github.com/weaveworks/weave/npc/iptables"
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package npc
|
||||
|
||||
import (
|
||||
"k8s.io/client-go/pkg/api/unversioned"
|
||||
"k8s.io/client-go/pkg/labels"
|
||||
"k8s.io/client-go/pkg/types"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
||||
"github.com/weaveworks/weave/common"
|
||||
"github.com/weaveworks/weave/npc/ipset"
|
||||
@@ -18,8 +18,8 @@ type selectorSpec struct {
|
||||
nsName string // Namespace name
|
||||
}
|
||||
|
||||
func newSelectorSpec(json *unversioned.LabelSelector, nsName string, ipsetType ipset.Type) (*selectorSpec, error) {
|
||||
selector, err := unversioned.LabelSelectorAsSelector(json)
|
||||
func newSelectorSpec(json *metav1.LabelSelector, nsName string, ipsetType ipset.Type) (*selectorSpec, error) {
|
||||
selector, err := metav1.LabelSelectorAsSelector(json)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
|
||||
api "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
api "k8s.io/client-go/pkg/api/v1"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ func getKubePeers() ([]string, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
nodeList, err := c.Nodes().List(api.ListOptions{})
|
||||
nodeList, err := c.Core().Nodes().List(api.ListOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
|
||||
"github.com/coreos/go-iptables/iptables"
|
||||
"github.com/spf13/cobra"
|
||||
coreapi "k8s.io/api/core/v1"
|
||||
extnapi "k8s.io/api/extensions/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
coreapi "k8s.io/client-go/pkg/api/v1"
|
||||
extnapi "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||
"k8s.io/client-go/pkg/fields"
|
||||
"k8s.io/client-go/pkg/runtime"
|
||||
"k8s.io/client-go/pkg/util/wait"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
|
||||
@@ -34,7 +34,7 @@ var (
|
||||
func handleError(err error) { common.CheckFatal(err) }
|
||||
|
||||
func makeController(getter cache.Getter, resource string,
|
||||
objType runtime.Object, handlers cache.ResourceEventHandlerFuncs) *cache.Controller {
|
||||
objType runtime.Object, handlers cache.ResourceEventHandlerFuncs) cache.Controller {
|
||||
listWatch := cache.NewListWatchFromClient(getter, resource, "", fields.Everything())
|
||||
_, controller := cache.NewInformer(listWatch, objType, 0, handlers)
|
||||
return controller
|
||||
|
||||
+1
Submodule vendor/github.com/PuerkitoBio/purell added at fd18e053af.
+1
Submodule vendor/github.com/PuerkitoBio/urlesc added at de5bf2ad45.
+1
Submodule vendor/github.com/emicklei/go-restful added at dc0f94ee75.
+1
Submodule vendor/github.com/go-openapi/jsonpointer added at 779f45308c.
+1
Submodule vendor/github.com/go-openapi/jsonreference added at 36d33bfe51.
+1
Submodule vendor/github.com/go-openapi/spec added at 48c2a71855.
+1
Submodule vendor/github.com/go-openapi/swag added at f3f9494671.
+1
Submodule vendor/github.com/golang/glog added at 23def4e6c1.
+1
Submodule vendor/github.com/google/gofuzz added at 24818f796f.
+1
Submodule vendor/github.com/mailru/easyjson added at 2a92e673c9.
+1
Submodule vendor/golang.org/x/text added at 825fc78a2f.
+1
Submodule vendor/gopkg.in/yaml.v2 added at eb3733d160.
+1
Submodule vendor/k8s.io/api added at 81aa34336d.
+1
Submodule vendor/k8s.io/apimachinery added at 3b05bbfa0a.
+1
-1
Submodule vendor/k8s.io/client-go updated: b22087a53b...82aa063804.
+1
Submodule vendor/k8s.io/kube-openapi added at abfc5fbe1c.
Reference in new issue
Block a user