network: support network isolate
Add new crd to convert kubesphere network policy to k8s network policy, and then other network
plugin will do the rest work.
Use cache.go from calico project's kube-controller, it aim to sync nsnp with k8s np, delete unused np, and relieve the pressure on k8s restful client.
If you want higher performance, you can implement interface NsNetworkPolicyProvider in pkg/controller/provider/namespace_np.go.
Signed-off-by: NDuan Jiong <djduanjiong@gmail.com>
Showing
build/ks-network/Dockerfile
已删除
100644 → 0
cmd/ks-network/main.go
已删除
100644 → 0
此差异已折叠。
config/webhook/nsnp.yaml
0 → 100644
... | ... | @@ -30,13 +30,12 @@ require ( |
github.com/emirpasic/gods v1.12.0 // indirect | ||
github.com/fatih/structs v1.1.0 | ||
github.com/go-ldap/ldap v3.0.3+incompatible | ||
github.com/go-logr/logr v0.1.0 | ||
github.com/go-logr/zapr v0.1.1 // indirect | ||
github.com/go-openapi/jsonreference v0.19.3 // indirect | ||
github.com/go-openapi/loads v0.19.2 | ||
github.com/go-openapi/spec v0.19.3 | ||
github.com/go-openapi/strfmt v0.19.0 | ||
github.com/go-openapi/validate v0.19.2 | ||
github.com/go-playground/universal-translator v0.16.0 // indirect | ||
github.com/go-redis/redis v6.15.2+incompatible | ||
github.com/go-sql-driver/mysql v1.4.1 | ||
github.com/gocraft/dbr v0.0.0-20180507214907-a0fd650918f6 | ||
... | ... | @@ -46,32 +45,34 @@ require ( |
github.com/google/go-cmp v0.3.0 | ||
github.com/google/go-querystring v1.0.0 // indirect | ||
github.com/google/uuid v1.1.1 | ||
github.com/gophercloud/gophercloud v0.3.0 // indirect | ||
github.com/gorilla/mux v1.7.1 // indirect | ||
github.com/gorilla/websocket v1.4.0 | ||
github.com/hashicorp/go-version v1.2.0 // indirect | ||
github.com/imdario/mergo v0.3.7 // indirect | ||
github.com/json-iterator/go v1.1.9 | ||
github.com/json-iterator/go v1.1.8 | ||
github.com/kelseyhightower/envconfig v1.4.0 // indirect | ||
github.com/kiali/kiali v0.15.1-0.20191210080139-edbbad1ef779 | ||
github.com/kubernetes-sigs/application v0.0.0-20191210100950-18cc93526ab4 | ||
github.com/kubesphere/sonargo v0.0.2 | ||
github.com/leodido/go-urn v1.1.0 // indirect | ||
github.com/lib/pq v1.2.0 // indirect | ||
github.com/mailru/easyjson v0.7.0 // indirect | ||
github.com/mattn/go-sqlite3 v1.11.0 // indirect | ||
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect | ||
github.com/onsi/ginkgo v1.12.0 | ||
github.com/onsi/gomega v1.9.0 | ||
github.com/onsi/ginkgo v1.8.0 | ||
github.com/onsi/gomega v1.5.0 | ||
github.com/open-policy-agent/opa v0.18.0 | ||
github.com/opencontainers/go-digest v1.0.0-rc1 | ||
github.com/opencontainers/image-spec v1.0.1 // indirect | ||
github.com/openshift/api v0.0.0-20180801171038-322a19404e37 // indirect | ||
github.com/opentracing/opentracing-go v1.1.0 // indirect | ||
github.com/pkg/errors v0.9.1 | ||
github.com/patrickmn/go-cache v2.1.0+incompatible | ||
github.com/pkg/errors v0.8.1 | ||
github.com/projectcalico/kube-controllers v3.8.8+incompatible | ||
github.com/projectcalico/libcalico-go v1.7.2-0.20191104213956-8f81e1e344ce | ||
github.com/prometheus/client_golang v1.0.0 | ||
github.com/prometheus/client_golang v0.9.4 | ||
github.com/prometheus/common v0.4.1 | ||
github.com/prometheus/prometheus v1.8.2 | ||
github.com/sirupsen/logrus v1.4.2 | ||
github.com/sony/sonyflake v0.0.0-20181109022403-6d5bd6181009 | ||
github.com/speps/go-hashids v2.0.0+incompatible | ||
github.com/spf13/cobra v0.0.5 | ||
... | ... | @@ -84,28 +85,27 @@ require ( |
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 | ||
google.golang.org/grpc v1.23.1 | ||
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect | ||
gopkg.in/go-playground/validator.v9 v9.29.1 // indirect | ||
gopkg.in/src-d/go-billy.v4 v4.3.0 // indirect | ||
gopkg.in/src-d/go-git.v4 v4.11.0 | ||
gopkg.in/yaml.v2 v2.2.8 | ||
gopkg.in/yaml.v2 v2.2.4 | ||
istio.io/api v0.0.0-20191111210003-35e06ef8d838 | ||
istio.io/client-go v0.0.0-20191113122552-9bd0ba57c3d2 | ||
k8s.io/api v0.17.3 | ||
k8s.io/apiextensions-apiserver v0.17.3 | ||
k8s.io/apimachinery v0.17.3 | ||
k8s.io/apiserver v0.17.3 | ||
k8s.io/client-go v0.17.3 | ||
k8s.io/code-generator v0.17.3 | ||
k8s.io/component-base v0.17.3 | ||
k8s.io/api v0.0.0-20191114100352-16d7abae0d2a | ||
k8s.io/apiextensions-apiserver v0.0.0-20191114105449-027877536833 | ||
k8s.io/apimachinery v0.0.0-20191028221656-72ed19daf4bb | ||
k8s.io/apiserver v0.0.0-20191114103151-9ca1dc586682 | ||
k8s.io/client-go v0.0.0-20191114101535-6c5935290e33 | ||
k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 | ||
k8s.io/component-base v0.0.0-20191114102325-35a9586014f7 | ||
k8s.io/gengo v0.0.0-20191120174120-e74f70b9b27e // indirect | ||
k8s.io/klog v1.0.0 | ||
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a | ||
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f // indirect | ||
kubesphere.io/im v0.1.0 // indirect | ||
openpitrix.io/iam v0.1.0 // indirect | ||
openpitrix.io/openpitrix v0.4.1-0.20190920134345-4d2be6e4965c | ||
sigs.k8s.io/controller-runtime v0.5.0 | ||
sigs.k8s.io/controller-runtime v0.4.0 | ||
sigs.k8s.io/controller-tools v0.2.4 | ||
sigs.k8s.io/kubefed v0.2.0-alpha.1 | ||
) | ||
replace ( | ||
... | ... | @@ -119,7 +119,6 @@ replace ( |
github.com/Azure/go-autorest/logger => github.com/Azure/go-autorest/logger v0.1.0 | ||
github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.5.0 | ||
github.com/BurntSushi/toml => github.com/BurntSushi/toml v0.3.1 | ||
github.com/MakeNowJust/heredoc => github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd | ||
github.com/Masterminds/semver => github.com/Masterminds/semver v1.5.0 | ||
github.com/Microsoft/go-winio => github.com/Microsoft/go-winio v0.4.12 | ||
github.com/NYTimes/gziphandler => github.com/NYTimes/gziphandler v1.1.1 | ||
... | ... | @@ -143,7 +142,6 @@ replace ( |
github.com/bmizerany/assert => github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 | ||
github.com/cenkalti/backoff => github.com/cenkalti/backoff v2.2.1+incompatible | ||
github.com/cespare/xxhash => github.com/cespare/xxhash v1.1.0 | ||
github.com/chai2010/gettext-go => github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 | ||
github.com/cheekybits/genny => github.com/cheekybits/genny v1.0.0 | ||
github.com/client9/misspell => github.com/client9/misspell v0.3.4 | ||
github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.3 | ||
... | ... | @@ -154,7 +152,6 @@ replace ( |
github.com/coreos/pkg => github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f | ||
github.com/cpuguy83/go-md2man => github.com/cpuguy83/go-md2man v1.0.10 | ||
github.com/davecgh/go-spew => github.com/davecgh/go-spew v1.1.1 | ||
github.com/daviddengcn/go-colortext => github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd | ||
github.com/deckarep/golang-set => github.com/deckarep/golang-set v1.7.1 | ||
github.com/denisenkom/go-mssqldb => github.com/denisenkom/go-mssqldb v0.0.0-20190204142019-df6d76eb9289 | ||
github.com/dgrijalva/jwt-go => github.com/dgrijalva/jwt-go v3.2.0+incompatible | ||
... | ... | @@ -176,7 +173,6 @@ replace ( |
github.com/emirpasic/gods => github.com/emirpasic/gods v1.12.0 | ||
github.com/erikstmartin/go-testdb => github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 | ||
github.com/evanphx/json-patch => github.com/evanphx/json-patch v4.5.0+incompatible | ||
github.com/exponent-io/jsonpath => github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d | ||
github.com/fatih/camelcase => github.com/fatih/camelcase v1.0.0 | ||
github.com/fatih/color => github.com/fatih/color v1.7.0 | ||
github.com/fatih/structs => github.com/fatih/structs v1.1.0 | ||
... | ... | @@ -218,9 +214,6 @@ replace ( |
github.com/golang/mock => github.com/golang/mock v1.2.0 | ||
github.com/golang/protobuf => github.com/golang/protobuf v1.3.2 | ||
github.com/golang/snappy => github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db | ||
github.com/golangplus/bytes => github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450 | ||
github.com/golangplus/fmt => github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995 | ||
github.com/golangplus/testing => github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e | ||
github.com/google/btree => github.com/google/btree v1.0.0 | ||
github.com/google/go-cmp => github.com/google/go-cmp v0.3.0 | ||
github.com/google/go-querystring => github.com/google/go-querystring v1.0.0 | ||
... | ... | @@ -271,14 +264,11 @@ replace ( |
github.com/kr/pty => github.com/kr/pty v1.1.5 | ||
github.com/kr/text => github.com/kr/text v0.1.0 | ||
github.com/kubernetes-sigs/application => github.com/kubesphere/application v0.0.0-20191210100950-18cc93526ab4 | ||
github.com/kubernetes-sigs/federation-v2 => github.com/kubernetes-sigs/federation-v2 v0.0.10 | ||
github.com/kubesphere/s2ioperator => github.com/kubesphere/s2ioperator v0.0.14 | ||
github.com/kubesphere/sonargo => github.com/kubesphere/sonargo v0.0.2 | ||
github.com/kylelemons/godebug => github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 | ||
github.com/leodido/go-urn => github.com/leodido/go-urn v1.1.0 | ||
github.com/lib/pq => github.com/lib/pq v1.2.0 | ||
github.com/liggitt/tabwriter => github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de | ||
github.com/lithammer/dedent => github.com/lithammer/dedent v1.1.0 | ||
github.com/lucas-clemente/quic-go => github.com/lucas-clemente/quic-go v0.11.1 | ||
github.com/magiconair/properties => github.com/magiconair/properties v1.8.0 | ||
github.com/mailru/easyjson => github.com/mailru/easyjson v0.7.0 | ||
... | ... | @@ -292,7 +282,6 @@ replace ( |
github.com/mholt/certmagic => github.com/mholt/certmagic v0.5.1 | ||
github.com/miekg/dns => github.com/miekg/dns v1.1.9 | ||
github.com/mitchellh/go-homedir => github.com/mitchellh/go-homedir v1.1.0 | ||
github.com/mitchellh/go-wordwrap => github.com/mitchellh/go-wordwrap v1.0.0 | ||
github.com/mitchellh/mapstructure => github.com/mitchellh/mapstructure v1.1.2 | ||
github.com/mna/pigeon => github.com/mna/pigeon v0.0.0-20180808201053-bb0192cfc2ae | ||
github.com/modern-go/concurrent => github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd | ||
... | ... | @@ -312,7 +301,6 @@ replace ( |
github.com/opencontainers/image-spec => github.com/opencontainers/image-spec v1.0.1 | ||
github.com/openshift/api => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 | ||
github.com/openshift/build-machinery-go => github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160 | ||
github.com/openshift/generic-admission-server => github.com/openshift/generic-admission-server v1.14.0 | ||
github.com/opentracing/opentracing-go => github.com/opentracing/opentracing-go v1.1.0 | ||
github.com/pborman/uuid => github.com/pborman/uuid v1.2.0 | ||
github.com/pelletier/go-buffruneio => github.com/pelletier/go-buffruneio v0.2.0 | ||
... | ... | @@ -364,7 +352,6 @@ replace ( |
github.com/urfave/cli => github.com/urfave/cli v1.20.0 | ||
github.com/xanzy/ssh-agent => github.com/xanzy/ssh-agent v0.2.1 | ||
github.com/xiang90/probing => github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 | ||
github.com/xlab/handysort => github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1 | ||
github.com/xlab/treeprint => github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6 | ||
github.com/xordataexchange/crypt => github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 | ||
github.com/yashtewari/glob-intersection => github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b | ||
... | ... | @@ -422,16 +409,12 @@ replace ( |
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20191114105449-027877536833 | ||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20191028221656-72ed19daf4bb | ||
k8s.io/apiserver => k8s.io/apiserver v0.0.0-20191114103151-9ca1dc586682 | ||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.17.3 | ||
k8s.io/client-go => k8s.io/client-go v0.0.0-20191114101535-6c5935290e33 | ||
k8s.io/cluster-registry => k8s.io/cluster-registry v0.0.6 | ||
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 | ||
k8s.io/component-base => k8s.io/component-base v0.0.0-20191114102325-35a9586014f7 | ||
k8s.io/gengo => k8s.io/gengo v0.0.0-20191120174120-e74f70b9b27e | ||
k8s.io/klog => k8s.io/klog v1.0.0 | ||
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a | ||
k8s.io/kubectl => k8s.io/kubectl v0.17.3 | ||
k8s.io/metrics => k8s.io/metrics v0.17.3 | ||
k8s.io/utils => k8s.io/utils v0.0.0-20191114184206-e782cd3c129f | ||
kubesphere.io/application => kubesphere.io/application v0.0.0-20190404151855-67ae7f915d4e | ||
kubesphere.io/im => kubesphere.io/im v0.1.0 | ||
... | ... | @@ -446,10 +429,7 @@ replace ( |
rsc.io/goversion => rsc.io/goversion v1.0.0 | ||
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.4.0 | ||
sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.2.4 | ||
sigs.k8s.io/kubefed => sigs.k8s.io/kubefed v0.2.0-alpha.1 | ||
sigs.k8s.io/kustomize => sigs.k8s.io/kustomize v2.0.3+incompatible | ||
sigs.k8s.io/structured-merge-diff => sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca | ||
sigs.k8s.io/testing_frameworks => sigs.k8s.io/testing_frameworks v0.1.2 | ||
sigs.k8s.io/yaml => sigs.k8s.io/yaml v1.1.0 | ||
vbom.ml/util => vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc | ||
) |
kustomize/network/OWNERS
已删除
100644 → 0
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
想要评论请 注册 或 登录