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 <45896133+juliusvonkohout@users.noreply.github.com>
Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
  • Loading branch information
juliusvonkohout authored and hansinikarunarathne committed Jul 22, 2024
1 parent 0083f24 commit 34d7c39
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 34d7c39

Please sign in to comment.