Skip to content

Commit ee9a859

Browse files
authored
Merge pull request #1087 from dseevr-dev/switch_client_go
Update client-go to 1.8.2 from upstream instead of using our fork
2 parents 915bd8e + 4873108 commit ee9a859

File tree

1,267 files changed

+239417
-330368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,267 files changed

+239417
-330368
lines changed

Godeps/Godeps.json

Lines changed: 557 additions & 601 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netmaster/k8snetwork/networkpolicy.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ package networkpolicy
33
import (
44
"encoding/json"
55
"fmt"
6-
log "github.com/Sirupsen/logrus"
7-
"github.com/contiv/client-go/kubernetes"
8-
"github.com/contiv/client-go/pkg/api/v1"
9-
"github.com/contiv/client-go/pkg/apis/extensions/v1beta1"
10-
"github.com/contiv/client-go/pkg/watch"
11-
"github.com/contiv/netplugin/contivmodel/client"
12-
"github.com/contiv/netplugin/utils/k8sutils"
136
"reflect"
147
"strings"
158
"time"
9+
10+
log "github.com/Sirupsen/logrus"
11+
"github.com/contiv/netplugin/contivmodel/client"
12+
"github.com/contiv/netplugin/utils/k8sutils"
13+
"k8s.io/api/networking/v1"
14+
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
15+
"k8s.io/apimachinery/pkg/watch"
16+
"k8s.io/client-go/kubernetes"
1617
)
1718

1819
const defaultTenantName = "default"
@@ -311,7 +312,7 @@ func (k8sNet *k8sContext) deleteDefaultIngressPolicy(ns string) {
311312
}
312313
}
313314

314-
func (k8sNet *k8sContext) processK8sNetworkPolicy(opCode watch.EventType, np *v1beta1.NetworkPolicy) {
315+
func (k8sNet *k8sContext) processK8sNetworkPolicy(opCode watch.EventType, np *v1.NetworkPolicy) {
315316
if np.Namespace == "kube-system" { // not applicable for system namespace
316317
return
317318
}
@@ -330,7 +331,7 @@ func (k8sNet *k8sContext) processK8sEvent(opCode watch.EventType, eventObj inter
330331
}
331332
switch objType := eventObj.(type) {
332333

333-
case *v1beta1.NetworkPolicy:
334+
case *v1.NetworkPolicy:
334335
k8sNet.processK8sNetworkPolicy(opCode, objType)
335336
}
336337
}
@@ -343,7 +344,7 @@ func (k8sNet *k8sContext) watchK8sEvents(errChan chan error) {
343344
time.Sleep(time.Millisecond * 100)
344345
}
345346

346-
npWatch, err := k8sNet.k8sClientSet.ExtensionsV1beta1().NetworkPolicies("").Watch(v1.ListOptions{})
347+
npWatch, err := k8sNet.k8sClientSet.Networking().NetworkPolicies("").Watch(meta_v1.ListOptions{})
347348
if err != nil {
348349
errChan <- fmt.Errorf("failed to watch network policy, %s", err)
349350
return

utils/k8sutils/k8sutils.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package k8sutils
33
import (
44
"encoding/json"
55
"fmt"
6-
log "github.com/Sirupsen/logrus"
7-
"github.com/contiv/client-go/kubernetes"
8-
k8sRest "github.com/contiv/client-go/rest"
96
"io/ioutil"
107
"strings"
8+
9+
log "github.com/Sirupsen/logrus"
10+
"k8s.io/client-go/kubernetes"
11+
k8sRest "k8s.io/client-go/rest"
1112
)
1213

1314
// ContivConfig holds information passed via config file during cluster set up

vendor/cloud.google.com/go/AUTHORS

Lines changed: 0 additions & 15 deletions
This file was deleted.

vendor/cloud.google.com/go/CONTRIBUTORS

Lines changed: 0 additions & 37 deletions
This file was deleted.

vendor/cloud.google.com/go/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)