Skip to content

Commit

Permalink
Restore MR E2Es
Browse files Browse the repository at this point in the history
Signed-off-by: Edgar Hernández <[email protected]>
  • Loading branch information
israel-hdez committed Dec 12, 2024
1 parent 7f3a438 commit 0490edd
Show file tree
Hide file tree
Showing 10 changed files with 959 additions and 58 deletions.
14 changes: 14 additions & 0 deletions test/config/kind-e2e-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 31090
hostPort: 31090
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0"
protocol: tcp # Optional, defaults to tcp
- containerPort: 31080
hostPort: 31080
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0"
protocol: tcp # Optional, defaults to tcp
- role: worker
18 changes: 18 additions & 0 deletions test/data/deploy/inference-service-to-delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: dummy-inference-service
namespace: default
labels:
"modelregistry.opendatahub.io/inference-service-id": "4"
finalizers:
- modelregistry.opendatahub.io/finalizer
spec:
predictor:
model:
modelFormat:
name: onnx
runtime: ovms-1.x
storage:
key: testkey
path: /testpath/test
17 changes: 17 additions & 0 deletions test/data/deploy/inference-service-with-model-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: dummy-inference-service
namespace: default
labels:
"modelregistry.opendatahub.io/registered-model-id": "1"
"modelregistry.opendatahub.io/model-version-id": "2"
spec:
predictor:
model:
modelFormat:
name: onnx
runtime: ovms-1.x
storage:
key: testkey
path: /testpath/test
16 changes: 16 additions & 0 deletions test/data/deploy/inference-service-without-model-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: dummy-inference-service
namespace: default
labels:
"modelregistry.opendatahub.io/registered-model-id": "1"
spec:
predictor:
model:
modelFormat:
name: onnx
runtime: ovms-1.x
storage:
key: testkey
path: /testpath/test
16 changes: 16 additions & 0 deletions test/data/deploy/inference-service-without-registered-model.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: dummy-inference-service
namespace: default
labels:
"modelregistry.opendatahub.io/model-version-id": "2"
spec:
predictor:
model:
modelFormat:
name: onnx
runtime: ovms-1.x
storage:
key: testkey
path: /testpath/test
42 changes: 42 additions & 0 deletions test/data/deploy/kserve-openvino-serving-runtime-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: serving.kserve.io/v1alpha1
kind: ServingRuntime
metadata:
name: ovms-1.x
namespace: default
spec:
supportedModelFormats:
- name: openvino_ir
version: opset1
autoSelect: true
- name: onnx
version: "1"
autoSelect: true
protocolVersions:
- grpc-v1
grpcEndpoint: "port:8085"
grpcDataEndpoint: "port:8001"
containers:
- name: ovms
image: quay.io/modh/odh-openvino-servingruntime-container:v1.19.0-18
args:
- --port=8001
- --rest_port=8888
# must match the default value in the ovms adapter server
- --config_path=/models/model_config_list.json
# the adapter will call `/v1/config/reload` to trigger reloads
- --file_system_poll_wait_seconds=0
# bind to localhost only to constrain requests to containers in the pod
- --grpc_bind_address=127.0.0.1
- --rest_bind_address=127.0.0.1
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 5
memory: 1Gi
builtInAdapter:
serverType: ovms
runtimeManagementPort: 8888
memBufferBytes: 134217728
modelLoadingTimeoutMillis: 90000
114 changes: 114 additions & 0 deletions test/data/model-registry/database_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
template.openshift.io/expose-uri: postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\postgresql\)].port}
name: model-registry-db
spec:
ports:
- name: postgresql
nodePort: 0
port: 5432
protocol: TCP
targetPort: 5432
selector:
name: model-registry-db
sessionAffinity: None
type: ClusterIP
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: model-registry-db
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 512Mi
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
name: model-registry-db
spec:
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
name: model-registry-db
strategy:
type: Recreate
template:
metadata:
labels:
name: model-registry-db
spec:
containers:
- env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
key: database-user
name: model-registry-db
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: model-registry-db
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
key: database-name
name: model-registry-db
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
image: postgres:16
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
command:
- /usr/bin/pg_isready
initialDelaySeconds: 30
timeoutSeconds: 2
name: postgresql
ports:
- containerPort: 5432
protocol: TCP
readinessProbe:
exec:
command:
- bash
- "-c"
- "psql -w -U $POSTGRES_USER -d $POSTGRES_DB -c 'SELECT 1'"
initialDelaySeconds: 10
timeoutSeconds: 5
securityContext:
capabilities: {}
privileged: false
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: model-registry-db-data
dnsPolicy: ClusterFirst
restartPolicy: Always
volumes:
- name: model-registry-db-data
persistentVolumeClaim:
claimName: model-registry-db
- apiVersion: v1
kind: Secret
metadata:
annotations:
template.openshift.io/expose-database_name: '{.data[''database-name'']}'
template.openshift.io/expose-password: '{.data[''database-password'']}'
template.openshift.io/expose-username: '{.data[''database-user'']}'
name: model-registry-db
stringData:
database-name: "model-registry"
database-password: "TheBlurstOfTimes"
database-user: "mlmduser"
kind: List
metadata: {}
Loading

0 comments on commit 0490edd

Please sign in to comment.