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>
25 lines
631 B
YAML
25 lines
631 B
YAML
apiVersion: admissionregistration.k8s.io/v1beta1
|
|
kind: ValidatingWebhookConfiguration
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: kubesphere-nsnp-validate-service
|
|
webhooks:
|
|
- clientConfig:
|
|
caBundle: <caBundle>
|
|
service:
|
|
name: kubesphere-controller-manager-service
|
|
namespace: kubesphere-system
|
|
path: /validate-service-nsnp-kubesphere-io-v1alpha1-network
|
|
failurePolicy: Fail
|
|
name: validate.nsnp.kubesphere.io
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
apiVersions:
|
|
- v1
|
|
operations:
|
|
- CREATE
|
|
- UPDATE
|
|
resources:
|
|
- services
|