-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Edgar Hernández <[email protected]>
- Loading branch information
1 parent
7f3a438
commit 0490edd
Showing
10 changed files
with
959 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
17
test/data/deploy/inference-service-with-model-version.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
test/data/deploy/inference-service-without-model-version.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
test/data/deploy/inference-service-without-registered-model.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {} |
Oops, something went wrong.