From 4cdaf1b441fa1dae0f43eeffd9c92e43fb1a2dff Mon Sep 17 00:00:00 2001 From: Kyle Bai Date: Wed, 23 Jan 2019 17:20:42 +0800 Subject: [PATCH] Update golang packages and fix travis build (#12) * Update go packages * Fix travis release build * Remove UpdateNamespace field * Update README.md --- .travis.yml | 2 +- Gopkg.lock | 24 ++++++++++++------------ Gopkg.toml | 6 +++++- README.md | 15 +++++++++++++++ pkg/k8sutil/ip.go | 3 +-- pkg/operator/service/controller_test.go | 3 +-- 6 files changed, 35 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3efe5f7..ff35c6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ script: after_success: - bash <(curl -s https://codecov.io/bash) - | - if [[ "$TRAVIS_BRANCH" == "master" ]]; then + if [[ "$TRAVIS_BRANCH" == release-* ]]; then # Log into Docker Hub. docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD" make build_image diff --git a/Gopkg.lock b/Gopkg.lock index de633ed..e28a7fb 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -117,7 +117,7 @@ version = "v0.3.6" [[projects]] - digest = "1:32e6a0b26c52758390a72be9e2a0606ec142a0cefcce74d7b62e00a6d2ff3179" + digest = "1:8ee586a23a1d8c39d8e0e31c92b222968ed1e5431c5328be358371f9b5e8fc65" name = "github.com/inwinstack/blended" packages = [ "apis/inwinstack", @@ -129,8 +129,8 @@ "client/clientset/versioned/typed/inwinstack/v1/fake", ] pruneopts = "UT" - revision = "792180b3d77b89a66627003e5a12a57c1fa1c3f2" - version = "v0.5.2" + revision = "2fbd03d59d533599f216cba59ad57de37f34648b" + version = "v0.6.0" [[projects]] branch = "v1.11.0" @@ -205,12 +205,12 @@ version = "v1.0.3" [[projects]] - digest = "1:18752d0b95816a1b777505a97f71c7467a8445b8ffb55631a7bf779f6ba4fa83" + digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759" name = "github.com/stretchr/testify" packages = ["assert"] pruneopts = "UT" - revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" - version = "v1.2.2" + revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" + version = "v1.3.0" [[projects]] digest = "1:d1816f8f4877e87cf0a80a25fbc0e7c7a6937bd728ccbf85e2c151c792445a1b" @@ -226,11 +226,11 @@ name = "golang.org/x/crypto" packages = ["ssh/terminal"] pruneopts = "UT" - revision = "505ab145d0a99da450461ae2c1a9f6cd10d1f447" + revision = "057139ce5d2bdbe6fe73c53679e24e9cf007f637" [[projects]] branch = "master" - digest = "1:b6bbc489acd7bf1d4c6782138ffb75f46634007713795667ed7ad287fd80c070" + digest = "1:e480830d20470d74d24bc36a52d4152c420c2cab67503e54f8f08e2db52579c5" name = "golang.org/x/net" packages = [ "http/httpguts", @@ -239,18 +239,18 @@ "idna", ] pruneopts = "UT" - revision = "927f97764cc334a6575f4b7a1584a147864d5723" + revision = "ed066c81e75eba56dd9bd2139ade88125b855585" [[projects]] branch = "master" - digest = "1:10405139b45e3a97a3842c93984710e30466eb933545f219ad3f5e45246973b4" + digest = "1:bb644db32f5bc1e327a0f748ec871edc4dc46f19b4fbbc15bfd95b1460646537" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "UT" - revision = "9a3f9b0469bbc6b8802087ae5c0af9f61502de01" + revision = "c6b37f3e92850b723493d63fd35aad34e19e048d" [[projects]] digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18" @@ -507,7 +507,7 @@ name = "k8s.io/kube-openapi" packages = ["pkg/util/proto"] pruneopts = "UT" - revision = "0317810137be915b9cf888946c6e115c1bfac693" + revision = "ced9eb3070a5f1c548ef46e8dfe2a97c208d9f03" [solve-meta] analyzer-name = "dep" diff --git a/Gopkg.toml b/Gopkg.toml index 4ff672f..e320cea 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -19,9 +19,13 @@ name = "github.com/inwinstack/operator-kit" branch = "v1.11.0" +[[constraint]] + name = "github.com/stretchr/testify" + version = "1.3.0" + [[constraint]] name = "github.com/inwinstack/blended" - version = "v0.5.2" + version = "v0.6.0" [prune] go-tests = true diff --git a/README.md b/README.md index e87c725..c154ae1 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,21 @@ # PA Kubernetes Service Syncker The PA Service Syncker for Kubernetes provides automation synchronizing definitions for Kubernetes services to set the PA NAT, Security, and Service. +### Requirements +The PA Service Syncker depend on [IPAM](https://github.com/inwinstack/ipam) and [PA Controller](https://github.com/inwinstack/pa-controller). + +#### Compatibility Matrix + +| PA Controller version | 0.6.x | 0.5.x | +|-----------------------|-------|-------| +| 0.6.x | Y | Y | +| 0.5.x | Y | Y | + +| IPAM version | 0.6.x | 0.5.x | +|--------------|-------|-------| +| 0.6.x | Y | Y | +| 0.5.x | Y | Y | + ## Building from Source Clone repo into your go path under `$GOPATH/src`: ```sh diff --git a/pkg/k8sutil/ip.go b/pkg/k8sutil/ip.go index 19e02dc..4ba7c08 100644 --- a/pkg/k8sutil/ip.go +++ b/pkg/k8sutil/ip.go @@ -36,8 +36,7 @@ func newIP(name, namespace, poolName string) *inwinv1.IP { Namespace: namespace, }, Spec: inwinv1.IPSpec{ - PoolName: poolName, - UpdateNamespace: false, + PoolName: poolName, }, } } diff --git a/pkg/operator/service/controller_test.go b/pkg/operator/service/controller_test.go index 5c4df0e..f3681d7 100644 --- a/pkg/operator/service/controller_test.go +++ b/pkg/operator/service/controller_test.go @@ -46,8 +46,7 @@ func TestController(t *testing.T) { Namespace: "default", }, Spec: inwinv1.IPSpec{ - PoolName: "internet", - UpdateNamespace: false, + PoolName: "internet", }, Status: inwinv1.IPStatus{ Phase: inwinv1.IPActive,