diff --git a/manifests/kustomize/base/model-registry-deployment.yaml b/manifests/kustomize/base/model-registry-deployment.yaml index 206cae4d0..8a5bbfbf2 100644 --- a/manifests/kustomize/base/model-registry-deployment.yaml +++ b/manifests/kustomize/base/model-registry-deployment.yaml @@ -11,6 +11,8 @@ spec: component: model-registry-server template: metadata: + annotations: + sidecar.istio.io/inject: "true" labels: component: model-registry-server spec: diff --git a/manifests/kustomize/base/model-registry-service.yaml b/manifests/kustomize/base/model-registry-service.yaml index d7d362c3f..33a4215d6 100644 --- a/manifests/kustomize/base/model-registry-service.yaml +++ b/manifests/kustomize/base/model-registry-service.yaml @@ -11,7 +11,9 @@ spec: ports: - port: 8080 protocol: TCP + appProtocol: http name: http-api - port: 9090 protocol: TCP + appProtocol: grpc name: grpc-api diff --git a/manifests/kustomize/options/istio/virtual-service.yaml b/manifests/kustomize/options/istio/virtual-service.yaml index e410e6c94..576c02086 100644 --- a/manifests/kustomize/options/istio/virtual-service.yaml +++ b/manifests/kustomize/options/istio/virtual-service.yaml @@ -7,18 +7,23 @@ spec: - kubeflow-gateway hosts: - '*' - tcp: + http: - match: - - port: 8080 + - uri: + prefix: /api/model_registry/ route: - destination: host: model-registry-service.kubeflow.svc.cluster.local port: number: 8080 - 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 diff --git a/manifests/kustomize/overlays/db/kustomization.yaml b/manifests/kustomize/overlays/db/kustomization.yaml index 42fea9f09..947c7a985 100644 --- a/manifests/kustomize/overlays/db/kustomization.yaml +++ b/manifests/kustomize/overlays/db/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml b/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml index 5d788ed76..e9a8e0c32 100644 --- a/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml +++ b/manifests/kustomize/overlays/db/patches/model-registry-deployment.yaml @@ -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 diff --git a/manifests/kustomize/overlays/postgres/kustomization.yaml b/manifests/kustomize/overlays/postgres/kustomization.yaml index facbb163f..e52acd8e9 100644 --- a/manifests/kustomize/overlays/postgres/kustomization.yaml +++ b/manifests/kustomize/overlays/postgres/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml b/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml index a97fc2a99..0f8fdbd09 100644 --- a/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml +++ b/manifests/kustomize/overlays/postgres/patches/model-registry-deployment.yaml @@ -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