Skip to content

Commit

Permalink
networkpolicy for training operator (kubeflow#2786)
Browse files Browse the repository at this point in the history
networkpolicy for training operator

Signed-off-by: juliusvonkohout <[email protected]>
  • Loading branch information
juliusvonkohout authored Jul 4, 2024
1 parent 37e4352 commit f3edb26
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/networkpolicies/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ resources:
- poddefaults.yaml
- pvcviewer-webhook.yaml
- seldon.yaml
- volumes-web-app.yaml
- tensorboards-web-app.yaml
- training-operator-webhook.yaml
- volumes-web-app.yaml
20 changes: 20 additions & 0 deletions common/networkpolicies/base/training-operator-webhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: training-operator-webhook
namespace: kubeflow
spec:
podSelector:
matchExpressions:
- key: control-plane
operator: In
values:
- kubeflow-training-operator
# 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:
- ports:
- protocol: TCP
port: 9443
policyTypes:
- Ingress

0 comments on commit f3edb26

Please sign in to comment.