only accept validated cidr.
And fix the error handle when network-isotate is diabled.
And remove the useless crd.
Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
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>
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>
1. refactor kubesphere dependency service client creation, we can
disable dependency by config
2. dependencies can be configured by configuration file
3. refactor cmd package using cobra.Command, so we can use hypersphere
to invoke command sepearately. Later we only need to build one image to
contains all kubesphere core components. One command to rule them all!
4. live reloading configuration currently not implemented