Skip to content

Commit 7f5f983

Browse files
Merge pull request opendatahub-io#190 from DharmitD/mlmd-nw-policy
Add MLMD components to Network Policy
2 parents 543be92 + 907dd3b commit 7f5f983

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
kind: NetworkPolicy
2+
apiVersion: networking.k8s.io/v1
3+
metadata:
4+
name: ds-pipelines-envoy-{{ .Name }}
5+
namespace: {{ .Namespace }}
6+
spec:
7+
podSelector:
8+
matchLabels:
9+
app: ds-pipeline-metadata-envoy-{{ .Name }}
10+
component: data-science-pipelines
11+
ingress:
12+
- ports:
13+
- protocol: TCP
14+
port: 9090
15+
from:
16+
- podSelector:
17+
matchLabels:
18+
app: odh-dashboard
19+
namespaceSelector: {}
20+
- podSelector:
21+
matchLabels:
22+
component: data-science-pipelines
23+
policyTypes:
24+
- Ingress

config/internal/common/policy.yaml.tmpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ spec:
4545
matchLabels:
4646
app: ds-pipeline-scheduledworkflow-{{.Name}}
4747
component: data-science-pipelines
48+
- podSelector:
49+
matchLabels:
50+
app: ds-pipeline-metadata-envoy-{{.Name}}
51+
component: data-science-pipelines
52+
- podSelector:
53+
matchLabels:
54+
app: ds-pipeline-metadata-grpc-{{.Name}}
55+
component: data-science-pipelines
56+
- podSelector:
57+
matchLabels:
58+
app: ds-pipeline-metadata-writer-{{.Name}}
59+
component: data-science-pipelines
4860
ports:
4961
- protocol: TCP
5062
port: 8888

controllers/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121

2222
var commonTemplates = []string{
2323
"common/policy.yaml.tmpl",
24+
"common/mlmd-envoy-dashboard-access-policy.yaml.tmpl",
2425
}
2526

2627
const commonCusterRolebindingTemplate = "common/clusterrolebinding.yaml.tmpl"

0 commit comments

Comments
 (0)