File tree Expand file tree Collapse file tree 4 files changed +54
-0
lines changed
Expand file tree Collapse file tree 4 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ namespace: opendatahub
1313# 2. Import base configuration
1414resources :
1515 - ../../default # Inherits everything from config/default/
16+ - networkpolicy.yaml
1617
1718# 3. Delete the Namespace resource (ODH operator manages it)
1819patches :
Original file line number Diff line number Diff line change 1+ apiVersion : networking.k8s.io/v1
2+ kind : NetworkPolicy
3+ metadata :
4+ name : spark-operator-allow-internal
5+ spec :
6+ # This targets the Spark Pods themselves
7+ podSelector :
8+ matchLabels :
9+ sparkoperator.k8s.io/launched-by-spark-operator : " true"
10+ policyTypes :
11+ - Ingress
12+ ingress :
13+ - ports :
14+ - port : 7078 # driver-rpc
15+ protocol : TCP
16+ - port : 7079 # blockmanager
17+ protocol : TCP
18+ - port : 4040 # spark-ui
19+ protocol : TCP
20+ from :
21+ # Allow traffic from ANY pod in the same namespace (matching Dashboard style)
22+ - podSelector : {}
23+ # OPTIONAL: Add OpenShift Ingress if you want the Spark UI accessible from outside
24+ - namespaceSelector :
25+ matchLabels :
26+ network.openshift.io/policy-group : ingress
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ namespace: redhat-ods-applications
1313# 2. Import base configuration
1414resources :
1515 - ../../default # Inherits everything from config/default/
16+ - networkpolicy.yaml
1617
1718# 3. Delete the Namespace resource (RHOAI operator manages it)
1819patches :
Original file line number Diff line number Diff line change 1+ apiVersion : networking.k8s.io/v1
2+ kind : NetworkPolicy
3+ metadata :
4+ name : spark-operator-allow-internal
5+ spec :
6+ # This targets the Spark Pods themselves
7+ podSelector :
8+ matchLabels :
9+ sparkoperator.k8s.io/launched-by-spark-operator : " true"
10+ policyTypes :
11+ - Ingress
12+ ingress :
13+ - ports :
14+ - port : 7078 # driver-rpc
15+ protocol : TCP
16+ - port : 7079 # blockmanager
17+ protocol : TCP
18+ - port : 4040 # spark-ui
19+ protocol : TCP
20+ from :
21+ # Allow traffic from ANY pod in the same namespace (matching Dashboard style)
22+ - podSelector : {}
23+ # OPTIONAL: Add OpenShift Ingress if you want the Spark UI accessible from outside
24+ - namespaceSelector :
25+ matchLabels :
26+ network.openshift.io/policy-group : ingress
You can’t perform that action at this time.
0 commit comments