Skip to content

Commit eab1ce7

Browse files
Liav Weiss (EXT-Nokia)root
authored andcommitted
feat(ws): add Istio AuthorizationPolicy for nb-backend #324
Signed-off-by: Liav Weiss (EXT-Nokia) <[email protected]>
1 parent 0d7f624 commit eab1ce7

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: networking.istio.io/v1alpha3
2+
kind: DestinationRule
3+
metadata:
4+
name: backend
5+
spec:
6+
host: nb-backend.kubeflow-system.svc.cluster.local
7+
trafficPolicy:
8+
tls:
9+
mode: ISTIO_MUTUAL
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: security.istio.io/v1beta1
2+
kind: AuthorizationPolicy
3+
metadata:
4+
name: backend
5+
spec:
6+
action: ALLOW
7+
selector:
8+
matchLabels:
9+
app.kubernetes.io/name: kubeflow-notebooks
10+
app.kubernetes.io/component: backend
11+
rules:
12+
- {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namePrefix: nb-
5+
6+
resources:
7+
- istio-authorization-policy.yaml
8+
- destination-rule.yaml
9+
- virtual-service.yaml
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: networking.istio.io/v1alpha3
2+
kind: VirtualService
3+
metadata:
4+
name: backend
5+
spec:
6+
gateways:
7+
- kubeflow-gateway
8+
hosts:
9+
- '*'
10+
http:
11+
- match:
12+
- uri:
13+
prefix: /workspaces/api/
14+
route:
15+
- destination:
16+
host: nb-backend.kubeflow-system.svc.cluster.local
17+
port:
18+
number: 4000

0 commit comments

Comments
 (0)