Skip to content

Commit 71ea0ee

Browse files
authored
Update kubeflow/model-registry manifests from 5d8ed91 (#2973)
* Update kubeflow/model-registry manifests from 5d8ed91 Signed-off-by: tarilabs <[email protected]> * gha: have more descriptive logs Signed-off-by: tarilabs <[email protected]> * gha: apply per kubeflow/model-registry#267 see details in kubeflow/model-registry#267 (comment) Signed-off-by: tarilabs <[email protected]> --------- Signed-off-by: tarilabs <[email protected]>
1 parent 59d1312 commit 71ea0ee

22 files changed

+347
-6
lines changed

.github/workflows/model_registry_test.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
1919
- name: Install KinD, Create KinD cluster and Install kustomize
2020
run: ./tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh
2121

22+
- name: Remove AppArmor profile for mysql in KinD on GHA # https://github.com/kubeflow/manifests/issues/2507
23+
run: |
24+
set -x
25+
sudo apt-get install apparmor-profiles
26+
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
27+
2228
- name: Install kubectl
2329
run: ./tests/gh-actions/install_kubectl.sh
2430

@@ -45,7 +51,12 @@ jobs:
4551
- name: Test KF Model Registry deployment
4652
run: |
4753
echo "Waiting for all Model Registry Pods to become ready..."
48-
kubectl wait --for=condition=available -n kubeflow deployment/model-registry-db --timeout=600s
54+
if ! kubectl wait --for=condition=available -n kubeflow deployment/model-registry-db --timeout=600s ; then
55+
kubectl events -A
56+
kubectl describe deployment/model-registry-db -n kubeflow
57+
kubectl logs deployment/model-registry-db -n kubeflow
58+
exit 1
59+
fi
4960
kubectl wait --for=condition=available -n kubeflow deployment/model-registry-deployment --timeout=600s
5061
5162
- name: Dry-run KF Model Registry API directly

apps/model-registry/upstream/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ curl -sX 'GET' \
4040
-H 'accept: application/json' | jq
4141
```
4242

43+
### UI Installation
44+
45+
There are two main ways to deploy the Model Registry UI:
46+
47+
1. Standalone mode - Use this if you are using Model Registry without the Kubeflow Platform
48+
49+
2. Integrated mode - Use this if you are deploying Model Registry in Kubeflow
50+
51+
For a standalone install run the following command:
52+
53+
```bash
54+
kubectl apply -k options/ui/overlays/standalone -n kubeflow
55+
```
56+
57+
For an integrated install use the istio UI overlay:
58+
59+
```bash
60+
kubectl apply -k options/ui/overlays/istio -n kubeflow
61+
```
62+
4363
## Usage
4464

4565
For a basic usage of the Kubeflow Model Registry, follow the [Kubeflow Model Registry getting started documentation](https://www.kubeflow.org/docs/components/model-registry/getting-started/)

apps/model-registry/upstream/base/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ resources:
88
images:
99
- name: kubeflow/model-registry
1010
newName: kubeflow/model-registry
11-
newTag: v0.2.12
11+
newTag: v0.2.13

apps/model-registry/upstream/options/csi/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ resources:
77
images:
88
- name: kubeflow/model-registry-storage-initializer
99
newName: kubeflow/model-registry-storage-initializer
10-
newTag: v0.2.12
10+
newTag: v0.2.13
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- model-registry-ui-role.yaml
6+
- model-registry-ui-service.yaml
7+
- model-registry-ui-deployment.yaml
8+
- model-registry-ui-service-account.yaml
9+
10+
images:
11+
- name: model-registry-ui-image
12+
newName: docker.io/kubeflow/model-registry-ui
13+
newTag: latest
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: model-registry-ui
5+
labels:
6+
app: model-registry-ui
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: model-registry-ui
12+
template:
13+
metadata:
14+
labels:
15+
app: model-registry-ui
16+
spec:
17+
serviceAccountName: model-registry-ui
18+
containers:
19+
- name: model-registry-ui
20+
image: model-registry-ui-image
21+
imagePullPolicy: Always
22+
livenessProbe:
23+
tcpSocket:
24+
port: 8080
25+
initialDelaySeconds: 30
26+
timeoutSeconds: 15
27+
periodSeconds: 30
28+
successThreshold: 1
29+
failureThreshold: 3
30+
readinessProbe:
31+
httpGet:
32+
path: /api/v1/healthcheck
33+
port: 8080
34+
scheme: HTTP
35+
httpHeaders:
36+
- name: kubeflow-userid
37+
38+
initialDelaySeconds: 15
39+
timeoutSeconds: 15
40+
periodSeconds: 30
41+
successThreshold: 1
42+
failureThreshold: 3
43+
resources:
44+
limits:
45+
cpu: 500m
46+
memory: 2Gi
47+
requests:
48+
cpu: 500m
49+
memory: 2Gi
50+
ports:
51+
- containerPort: 8080
52+
args:
53+
- "--port=8080"
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
kind: ClusterRole
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: model-registry-ui-services-reader
6+
rules:
7+
- apiGroups:
8+
- ''
9+
resources:
10+
- services
11+
verbs:
12+
- get
13+
- list
14+
- watch
15+
---
16+
apiVersion: rbac.authorization.k8s.io/v1
17+
kind: ClusterRoleBinding
18+
metadata:
19+
name: model-registry-ui-services-reader-binding
20+
subjects:
21+
- kind: ServiceAccount
22+
name: model-registry-ui
23+
roleRef:
24+
kind: ClusterRole
25+
name: model-registry-ui-services-reader
26+
apiGroup: rbac.authorization.k8s.io
27+
---
28+
apiVersion: rbac.authorization.k8s.io/v1
29+
kind: ClusterRole
30+
metadata:
31+
name: model-registry-retrieve-clusterrolebindings
32+
rules:
33+
- apiGroups:
34+
- rbac.authorization.k8s.io
35+
resources:
36+
- clusterrolebindings
37+
verbs:
38+
- get
39+
- list
40+
- watch
41+
---
42+
apiVersion: rbac.authorization.k8s.io/v1
43+
kind: ClusterRoleBinding
44+
metadata:
45+
name: model-registry-retrieve-clusterrolebindings-binding
46+
roleRef:
47+
apiGroup: rbac.authorization.k8s.io
48+
kind: ClusterRole
49+
name: model-registry-retrieve-clusterrolebindings
50+
subjects:
51+
- kind: ServiceAccount
52+
name: model-registry-ui
53+
---
54+
apiVersion: rbac.authorization.k8s.io/v1
55+
kind: ClusterRole
56+
metadata:
57+
name: model-registry-create-sars
58+
rules:
59+
- apiGroups:
60+
- authorization.k8s.io
61+
resources:
62+
- subjectaccessreviews
63+
verbs:
64+
- create
65+
---
66+
apiVersion: rbac.authorization.k8s.io/v1
67+
kind: ClusterRoleBinding
68+
metadata:
69+
name: model-registry-create-sars-binding
70+
roleRef:
71+
apiGroup: rbac.authorization.k8s.io
72+
kind: ClusterRole
73+
name: model-registry-create-sars
74+
subjects:
75+
- kind: ServiceAccount
76+
name: model-registry-ui
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
kind: ServiceAccount
3+
apiVersion: v1
4+
metadata:
5+
name: model-registry-ui
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: model-registry-ui-service
5+
labels:
6+
app: model-registry-ui
7+
run: model-registry-ui
8+
spec:
9+
selector:
10+
app: model-registry-ui
11+
ports:
12+
- name: http
13+
port: 8080
14+
protocol: TCP
15+
targetPort: 8080
16+
type: ClusterIP
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../../base
6+
7+
patches:
8+
- path: model-registry-ui-deployment.yaml
9+
target:
10+
group: apps
11+
version: v1
12+
kind: Deployment
13+
name: model-registry-ui
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- op: add
2+
path: /spec/template/spec/containers/0/args
3+
value:
4+
- "--standalone-mode=false"
5+
- "--port=8080"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: security.istio.io/v1beta1
2+
kind: AuthorizationPolicy
3+
metadata:
4+
name: model-registry-ui
5+
labels:
6+
app: model-registry-ui
7+
spec:
8+
action: ALLOW
9+
rules:
10+
- from:
11+
- source:
12+
principals:
13+
- cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account
14+
selector:
15+
matchLabels:
16+
app: model-registry-ui
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: networking.istio.io/v1alpha3
2+
kind: DestinationRule
3+
metadata:
4+
name: model-registry-ui
5+
labels:
6+
app: model-registry-ui
7+
spec:
8+
host: model-registry-ui-service.kubeflow.svc.cluster.local
9+
trafficPolicy:
10+
tls:
11+
mode: ISTIO_MUTUAL
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../integrated
6+
- virtual-service.yaml
7+
- destination-rule-ui.yaml
8+
- authorization-policy-ui.yaml
9+
10+
patches:
11+
- path: model-registry-ui-service.yaml
12+
target:
13+
version: v1
14+
kind: Service
15+
name: model-registry-ui-service
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- op: replace
2+
path: /spec/ports/0/port
3+
value: 80
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: networking.istio.io/v1alpha3
2+
kind: VirtualService
3+
metadata:
4+
name: model-registry-ui
5+
labels:
6+
app: model-registry-ui
7+
spec:
8+
gateways:
9+
- kubeflow-gateway
10+
hosts:
11+
- '*'
12+
http:
13+
- headers:
14+
request:
15+
add:
16+
x-forwarded-prefix: /model-registry
17+
match:
18+
- uri:
19+
prefix: /model-registry/
20+
rewrite:
21+
uri: /
22+
route:
23+
- destination:
24+
host: model-registry-ui-service.kubeflow.svc.cluster.local
25+
port:
26+
number: 80
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
kind: ClusterRole
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: model-registry-ui-namespaces-reader
6+
rules:
7+
- apiGroups:
8+
- ''
9+
resources:
10+
- namespaces
11+
verbs:
12+
- get
13+
- list
14+
- watch
15+
---
16+
apiVersion: rbac.authorization.k8s.io/v1
17+
kind: ClusterRoleBinding
18+
metadata:
19+
name: model-registry-ui-namespaces-reader-binding
20+
subjects:
21+
- kind: ServiceAccount
22+
name: model-registry-ui
23+
roleRef:
24+
kind: ClusterRole
25+
name: model-registry-ui-namespaces-reader
26+
apiGroup: rbac.authorization.k8s.io
27+
---
28+
apiVersion: rbac.authorization.k8s.io/v1
29+
kind: ClusterRoleBinding
30+
metadata:
31+
name: service-access-cluster-binding
32+
subjects:
33+
- kind: User
34+
35+
apiGroup: rbac.authorization.k8s.io
36+
roleRef:
37+
kind: ClusterRole
38+
name: cluster-admin
39+
apiGroup: rbac.authorization.k8s.io
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../../base
6+
- kubeflow-dashboard-rbac.yaml
7+
8+
patches:
9+
- path: model-registry-ui-deployment.yaml
10+
target:
11+
group: apps
12+
kind: Deployment
13+
name: model-registry-ui
14+
version: v1
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- op: add
2+
path: /spec/template/spec/containers/0/args
3+
value:
4+
- "--standalone-mode=true"
5+
- "--port=8080"

apps/model-registry/upstream/overlays/db/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ generatorOptions:
2626
images:
2727
- name: mysql
2828
newName: mysql
29-
newTag: 8.0.3
29+
newTag: 8.0.39
3030

3131
vars:
3232
- fieldref:

0 commit comments

Comments
 (0)