Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refactor istio virtualservice to support routes for REST internal and external routing, and gRPC internal routing #2

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions manifests/kustomize/base/model-registry-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ spec:
component: model-registry-server
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels:
component: model-registry-server
spec:
Expand Down
2 changes: 2 additions & 0 deletions manifests/kustomize/base/model-registry-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ spec:
ports:
- port: 8080
protocol: TCP
appProtocol: http
name: http-api
- port: 9090
protocol: TCP
appProtocol: grpc
name: grpc-api
21 changes: 11 additions & 10 deletions manifests/kustomize/options/istio/virtual-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ spec:
- '*'
http:
- match:
- uri:
prefix: /model-registry/
rewrite:
uri: /
- uri:
prefix: /api/model_registry/
route:
- destination:
host: model-registry-service.kubeflow.svc.cluster.local
port:
number: 8080
tcp:
- match:
- port: 9090
- port: 9090
- authority:
regex: model-registry-service(\..+)?(:9090)?
- uri:
prefix: /ml_metadata.MetadataStoreService/
route:
- destination:
host: model-registry-service.kubeflow.svc.cluster.local
port:
number: 9090
- destination:
host: model-registry-service.kubeflow.svc.cluster.local
port:
number: 9090
7 changes: 7 additions & 0 deletions manifests/kustomize/overlays/db/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ vars:
apiVersion: v1
kind: Service
name: model-registry-db
- name: MYSQL_PORT
objref:
kind: ConfigMap
name: model-registry-db-parameters
apiVersion: v1
fieldref:
fieldpath: data.MYSQL_PORT
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: model-registry-deployment
spec:
template:
metadata:
annotations:
# db doesn't use istio
traffic.sidecar.istio.io/excludeOutboundPorts: $(MYSQL_PORT)
spec:
containers:
- name: rest-container
Expand Down
7 changes: 7 additions & 0 deletions manifests/kustomize/overlays/postgres/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ vars:
apiVersion: v1
fieldref:
fieldpath: metadata.name
- name: POSTGRES_PORT
objref:
kind: ConfigMap
name: model-registry-db-parameters
apiVersion: v1
fieldref:
fieldpath: data.POSTGRES_PORT
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: model-registry-deployment
spec:
template:
metadata:
annotations:
# db doesn't use istio
traffic.sidecar.istio.io/excludeOutboundPorts: $(POSTGRES_PORT)
spec:
containers:
- name: grpc-container
Expand Down