Commit Graph

8 Commits

Author SHA1 Message Date
Duan Jiong
3c21a21bd7 rename nsnp controller
Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
2020-06-08 22:36:49 +08:00
Duan Jiong
e922a85dec fix namespace networkpolicy
add prefix when set key, otherwise the k8s rule will not be deleted
don't append ingress when ingress is empty, otherwise all ingress traffic will be allowed.

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
2020-06-03 12:08:30 +08:00
Duan Jiong
7a0b18315f fix namespace networkpolicy
add filter on namespace event func
delete the code which do same work with namespace controller

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
2020-05-21 11:02:34 +08:00
Duan Jiong
4e45d659c0 fix namespace networkpolicy
1. allow egress when isolate is enabled
2. add nsnp prefix "nsnp-"
3. remove some useless log

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
2020-05-18 09:10:33 +08:00
Duan Jiong
4fb9d84fea allow dns traffic and host node traffic
Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
2020-04-28 10:21:58 +08:00
Duan Jiong
1ab7d67e51 allow ip/port in service when config service nsnp
Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
2020-04-28 10:21:58 +08:00
Duan Jiong
d3bdcd0465 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: Duan Jiong <djduanjiong@gmail.com>
2020-04-28 10:21:50 +08:00
magicsong
90fa38851f add ns networkpolicy 2019-08-08 18:39:00 +08:00