diff --git a/contrib/networkpolicies/OWNERS b/common/networkpolicies/OWNERS similarity index 81% rename from contrib/networkpolicies/OWNERS rename to common/networkpolicies/OWNERS index 59958350de..cb90378292 100644 --- a/contrib/networkpolicies/OWNERS +++ b/common/networkpolicies/OWNERS @@ -3,3 +3,4 @@ approvers: reviewers: - juliusvonkohout - kimwnasptd + - TobiasGoerke diff --git a/contrib/networkpolicies/README.md b/common/networkpolicies/README.md similarity index 100% rename from contrib/networkpolicies/README.md rename to common/networkpolicies/README.md diff --git a/contrib/networkpolicies/cache-server.yaml b/common/networkpolicies/base/cache-server.yaml similarity index 99% rename from contrib/networkpolicies/cache-server.yaml rename to common/networkpolicies/base/cache-server.yaml index a4b546f866..326153e708 100644 --- a/contrib/networkpolicies/cache-server.yaml +++ b/common/networkpolicies/base/cache-server.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: cache-server namespace: kubeflow @@ -18,4 +18,3 @@ spec: port: 8443 policyTypes: - Ingress - diff --git a/contrib/networkpolicies/centraldashboard.yaml b/common/networkpolicies/base/centraldashboard.yaml similarity index 100% rename from contrib/networkpolicies/centraldashboard.yaml rename to common/networkpolicies/base/centraldashboard.yaml index e75c40b865..425487cea5 100644 --- a/contrib/networkpolicies/centraldashboard.yaml +++ b/common/networkpolicies/base/centraldashboard.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: centraldashboard namespace: kubeflow diff --git a/contrib/networkpolicies/default-allow-same-namespace.yaml b/common/networkpolicies/base/default-allow-same-namespace.yaml similarity index 100% rename from contrib/networkpolicies/default-allow-same-namespace.yaml rename to common/networkpolicies/base/default-allow-same-namespace.yaml index b36f0a3b15..91ba34c619 100644 --- a/contrib/networkpolicies/default-allow-same-namespace.yaml +++ b/common/networkpolicies/base/default-allow-same-namespace.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: default-allow-same-namespace namespace: kubeflow diff --git a/contrib/networkpolicies/jupyter-web-app.yaml b/common/networkpolicies/base/jupyter-web-app.yaml similarity index 100% rename from contrib/networkpolicies/jupyter-web-app.yaml rename to common/networkpolicies/base/jupyter-web-app.yaml index 7f78b31a47..8befae9a9c 100644 --- a/contrib/networkpolicies/jupyter-web-app.yaml +++ b/common/networkpolicies/base/jupyter-web-app.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: jupyter-web-app namespace: kubeflow diff --git a/contrib/networkpolicies/katib-controller.yaml b/common/networkpolicies/base/katib-controller.yaml similarity index 87% rename from contrib/networkpolicies/katib-controller.yaml rename to common/networkpolicies/base/katib-controller.yaml index 9b9e2c0bfa..74a91b289f 100644 --- a/contrib/networkpolicies/katib-controller.yaml +++ b/common/networkpolicies/base/katib-controller.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: katib-controller namespace: kubeflow @@ -16,8 +16,8 @@ spec: - ports: # webhook - protocol: TCP port: 8443 -# - ports: # metrics -# - protocol: TCP -# port: 8080 + # - ports: # metrics + # - protocol: TCP + # port: 8080 policyTypes: - Ingress diff --git a/contrib/networkpolicies/katib-db-manager.yaml b/common/networkpolicies/base/katib-db-manager.yaml similarity index 100% rename from contrib/networkpolicies/katib-db-manager.yaml rename to common/networkpolicies/base/katib-db-manager.yaml index 62089c4556..2ae8f7c960 100644 --- a/contrib/networkpolicies/katib-db-manager.yaml +++ b/common/networkpolicies/base/katib-db-manager.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: katib-db-manager namespace: kubeflow diff --git a/contrib/networkpolicies/katib-ui.yaml b/common/networkpolicies/base/katib-ui.yaml similarity index 100% rename from contrib/networkpolicies/katib-ui.yaml rename to common/networkpolicies/base/katib-ui.yaml index bce1307034..b1eded662e 100644 --- a/contrib/networkpolicies/katib-ui.yaml +++ b/common/networkpolicies/base/katib-ui.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: katib-ui namespace: kubeflow diff --git a/contrib/networkpolicies/kserve-models-web-app.yaml b/common/networkpolicies/base/kserve-models-web-app.yaml similarity index 100% rename from contrib/networkpolicies/kserve-models-web-app.yaml rename to common/networkpolicies/base/kserve-models-web-app.yaml index d3ece6e6e9..65fa87f540 100644 --- a/contrib/networkpolicies/kserve-models-web-app.yaml +++ b/common/networkpolicies/base/kserve-models-web-app.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: kserve-models-web-app namespace: kubeflow diff --git a/contrib/networkpolicies/kserve.yaml b/common/networkpolicies/base/kserve.yaml similarity index 99% rename from contrib/networkpolicies/kserve.yaml rename to common/networkpolicies/base/kserve.yaml index 9ce467f472..b2dfd193ed 100644 --- a/contrib/networkpolicies/kserve.yaml +++ b/common/networkpolicies/base/kserve.yaml @@ -1,6 +1,5 @@ - -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: kserve namespace: kubeflow diff --git a/contrib/networkpolicies/kustomization.yaml b/common/networkpolicies/base/kustomization.yaml similarity index 95% rename from contrib/networkpolicies/kustomization.yaml rename to common/networkpolicies/base/kustomization.yaml index 427f469ccf..3592bc9a2b 100644 --- a/contrib/networkpolicies/kustomization.yaml +++ b/common/networkpolicies/base/kustomization.yaml @@ -14,7 +14,7 @@ resources: - metadata-envoy.yaml - metadata-grpc-server.yaml - minio.yaml - - ml-pipeline-ui.yaml + - ml-pipeline-ui.yaml - ml-pipeline.yaml - poddefaults.yaml - pvcviewer-webhook.yaml diff --git a/contrib/networkpolicies/metadata-envoy.yaml b/common/networkpolicies/base/metadata-envoy.yaml similarity index 99% rename from contrib/networkpolicies/metadata-envoy.yaml rename to common/networkpolicies/base/metadata-envoy.yaml index 3ec8f2e318..18fe9f17cf 100644 --- a/contrib/networkpolicies/metadata-envoy.yaml +++ b/common/networkpolicies/base/metadata-envoy.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: metatada-envoy namespace: kubeflow @@ -21,4 +21,3 @@ spec: - podSelector: {} policyTypes: - Ingress - diff --git a/contrib/networkpolicies/metadata-grpc-server.yaml b/common/networkpolicies/base/metadata-grpc-server.yaml similarity index 99% rename from contrib/networkpolicies/metadata-grpc-server.yaml rename to common/networkpolicies/base/metadata-grpc-server.yaml index 589207efdf..d00a8d6693 100644 --- a/contrib/networkpolicies/metadata-grpc-server.yaml +++ b/common/networkpolicies/base/metadata-grpc-server.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: metadata-grpc-server namespace: kubeflow @@ -21,4 +21,3 @@ spec: - podSelector: {} # allow all pods from the same namespace policyTypes: - Ingress - diff --git a/contrib/networkpolicies/minio.yaml b/common/networkpolicies/base/minio.yaml similarity index 94% rename from contrib/networkpolicies/minio.yaml rename to common/networkpolicies/base/minio.yaml index b307814773..1007629ca2 100644 --- a/contrib/networkpolicies/minio.yaml +++ b/common/networkpolicies/base/minio.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: minio namespace: kubeflow @@ -9,7 +9,7 @@ spec: - key: app operator: In values: - - minio # artifact storage + - minio # artifact storage ingress: - from: - namespaceSelector: diff --git a/contrib/networkpolicies/ml-pipeline-ui.yaml b/common/networkpolicies/base/ml-pipeline-ui.yaml similarity index 100% rename from contrib/networkpolicies/ml-pipeline-ui.yaml rename to common/networkpolicies/base/ml-pipeline-ui.yaml index 855e22c036..b31be3211e 100644 --- a/contrib/networkpolicies/ml-pipeline-ui.yaml +++ b/common/networkpolicies/base/ml-pipeline-ui.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: ml-pipeline-ui namespace: kubeflow diff --git a/contrib/networkpolicies/ml-pipeline.yaml b/common/networkpolicies/base/ml-pipeline.yaml similarity index 100% rename from contrib/networkpolicies/ml-pipeline.yaml rename to common/networkpolicies/base/ml-pipeline.yaml index 3b43547e2a..f8f57d1775 100644 --- a/contrib/networkpolicies/ml-pipeline.yaml +++ b/common/networkpolicies/base/ml-pipeline.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: ml-pipeline namespace: kubeflow diff --git a/contrib/networkpolicies/poddefaults.yaml b/common/networkpolicies/base/poddefaults.yaml similarity index 90% rename from contrib/networkpolicies/poddefaults.yaml rename to common/networkpolicies/base/poddefaults.yaml index 7105f8d51c..449b839a78 100644 --- a/contrib/networkpolicies/poddefaults.yaml +++ b/common/networkpolicies/base/poddefaults.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: poddefaults namespace: kubeflow @@ -9,7 +9,7 @@ spec: - key: app operator: In values: - - poddefaults # mutating webhook + - poddefaults # mutating webhook # https://www.elastic.co/guide/en/cloud-on-k8s/1.1/k8s-webhook-network-policies.html # The kubernetes api server must reach the webhook ingress: diff --git a/contrib/networkpolicies/pvcviewer-webhook.yaml b/common/networkpolicies/base/pvcviewer-webhook.yaml similarity index 100% rename from contrib/networkpolicies/pvcviewer-webhook.yaml rename to common/networkpolicies/base/pvcviewer-webhook.yaml diff --git a/contrib/networkpolicies/seldon.yaml b/common/networkpolicies/base/seldon.yaml similarity index 99% rename from contrib/networkpolicies/seldon.yaml rename to common/networkpolicies/base/seldon.yaml index 75845c35c0..92daf3dd67 100644 --- a/contrib/networkpolicies/seldon.yaml +++ b/common/networkpolicies/base/seldon.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: seldon namespace: kubeflow @@ -18,4 +18,3 @@ spec: port: 4443 policyTypes: - Ingress - diff --git a/contrib/networkpolicies/tensorboards-web-app.yaml b/common/networkpolicies/base/tensorboards-web-app.yaml similarity index 100% rename from contrib/networkpolicies/tensorboards-web-app.yaml rename to common/networkpolicies/base/tensorboards-web-app.yaml index 54f912916f..59a442907d 100644 --- a/contrib/networkpolicies/tensorboards-web-app.yaml +++ b/common/networkpolicies/base/tensorboards-web-app.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: tensorboards-web-app namespace: kubeflow diff --git a/contrib/networkpolicies/volumes-web-app.yaml b/common/networkpolicies/base/volumes-web-app.yaml similarity index 100% rename from contrib/networkpolicies/volumes-web-app.yaml rename to common/networkpolicies/base/volumes-web-app.yaml index 50c11c1bda..2360f16c54 100644 --- a/contrib/networkpolicies/volumes-web-app.yaml +++ b/common/networkpolicies/base/volumes-web-app.yaml @@ -1,5 +1,5 @@ -kind: NetworkPolicy apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy metadata: name: volumes-web-app namespace: kubeflow diff --git a/contrib/networkpolicies/.gitkeep b/contrib/networkpolicies/.gitkeep deleted file mode 100644 index 8b13789179..0000000000 --- a/contrib/networkpolicies/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/example/kustomization.yaml b/example/kustomization.yaml index 12836943d5..c00819031d 100644 --- a/example/kustomization.yaml +++ b/example/kustomization.yaml @@ -12,6 +12,7 @@ sortOptions: - MutatingWebhookConfiguration - ServiceAccount - PodSecurityPolicy + - NetworkPolicy - Role - ClusterRole - RoleBinding @@ -49,6 +50,8 @@ resources: - ../common/istio-1-17/cluster-local-gateway/base # Kubeflow namespace - ../common/kubeflow-namespace/base +# NetworkPolicies +- ../common/networkpolicies/base # Kubeflow Roles - ../common/kubeflow-roles/base # Kubeflow Istio Resources