diff --git a/config/overlays/odh/inferenceservice-config-patch.yaml b/config/overlays/odh/inferenceservice-config-patch.yaml new file mode 100644 index 00000000000..e40682fd0cc --- /dev/null +++ b/config/overlays/odh/inferenceservice-config-patch.yaml @@ -0,0 +1,70 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: inferenceservice-config + namespace: kserve +data: + explainers: "{}" + storageInitializer: |- + { + "image" : "$(kserve-storage-initializer)", + "memoryRequest": "100Mi", + "memoryLimit": "1Gi", + "cpuRequest": "100m", + "cpuLimit": "1", + "enableDirectPvcVolumeMount": false + } + ingress: |- + { + "ingressGateway" : "knative-serving/knative-ingress-gateway", + "ingressService" : "istio-ingressgateway.istio-system.svc.cluster.local", + "localGateway" : "knative-serving/knative-local-gateway", + "localGatewayService" : "knative-local-gateway.istio-system.svc.cluster.local", + "ingressDomain" : "example.com", + "ingressClassName" : "istio", + "domainTemplate": "{{ .Name }}-{{ .Namespace }}.{{ .IngressDomain }}", + "urlScheme": "https", + "disableIstioVirtualHost": true + } + logger: |- + { + "image" : "$(kserve-agent)", + "memoryRequest": "100Mi", + "memoryLimit": "1Gi", + "cpuRequest": "100m", + "cpuLimit": "1", + "defaultUrl": "http://default-broker" + } + batcher: |- + { + "image" : "$(kserve-agent)", + "memoryRequest": "1Gi", + "memoryLimit": "1Gi", + "cpuRequest": "1", + "cpuLimit": "1" + } + agent: |- + { + "image" : "$(kserve-agent)", + "memoryRequest": "100Mi", + "memoryLimit": "1Gi", + "cpuRequest": "100m", + "cpuLimit": "1" + } + router: |- + { + "image" : "$(kserve-router)", + "memoryRequest": "100Mi", + "memoryLimit": "1Gi", + "cpuRequest": "100m", + "cpuLimit": "1" + } + deploy: |- + { + "defaultDeploymentMode": "Serverless" + } + metricsAggregator: |- + { + "enableMetricAggregation": "false", + "enablePrometheusScraping" : "false" + } diff --git a/config/overlays/odh/kustomization.yaml b/config/overlays/odh/kustomization.yaml index 87ae27f946f..b6ec0336989 100644 --- a/config/overlays/odh/kustomization.yaml +++ b/config/overlays/odh/kustomization.yaml @@ -5,5 +5,55 @@ resources: - ../../default - user-cluster-roles.yaml -patchesStrategicMerge: -- remove-namespace.yaml +namespace: opendatahub + +patches: +- path: remove-namespace.yaml +- path: inferenceservice-config-patch.yaml + +replacements: +- source: + kind: ConfigMap + name: kserve-parameters + fieldpath: data.kserve-controller + targets: + - select: + kind: Deployment + name: kserve-controller-manager + fieldPaths: + - spec.template.spec.containers.[name=manager].image + +configMapGenerator: +- envs: + - params.env + name: kserve-parameters + +generatorOptions: + disableNameSuffixHash: true + +vars: +- fieldref: + fieldpath: data.kserve-storage-initializer + name: kserve-storage-initializer + objref: + apiVersion: v1 + kind: ConfigMap + name: kserve-parameters +- fieldref: + fieldpath: data.kserve-agent + name: kserve-agent + objref: + apiVersion: v1 + kind: ConfigMap + name: kserve-parameters +- fieldref: + fieldpath: data.kserve-router + name: kserve-router + objref: + apiVersion: v1 + kind: ConfigMap + name: kserve-parameters + +configurations: + - params.yaml + diff --git a/config/overlays/odh/params.env b/config/overlays/odh/params.env new file mode 100644 index 00000000000..f4233dc6a6e --- /dev/null +++ b/config/overlays/odh/params.env @@ -0,0 +1,4 @@ +kserve-controller=quay.io/opendatahub/kserve-controller:latest +kserve-agent=quay.io/opendatahub/kserve-agent:latest +kserve-router=quay.io/opendatahub/kserve-router:latest +kserve-storage-initializer=quay.io/opendatahub/kserve-storage-initializer:latest diff --git a/config/overlays/odh/params.yaml b/config/overlays/odh/params.yaml new file mode 100644 index 00000000000..dc7f5878ccf --- /dev/null +++ b/config/overlays/odh/params.yaml @@ -0,0 +1,5 @@ +varReference: + - path: spec/template/spec/containers/image + kind: Deployment + - path: data + kind: ConfigMap diff --git a/test/scripts/openshift-ci/deploy.serverless.sh b/test/scripts/openshift-ci/deploy.serverless.sh index 9c66d85eeb6..93e4d1c60a1 100755 --- a/test/scripts/openshift-ci/deploy.serverless.sh +++ b/test/scripts/openshift-ci/deploy.serverless.sh @@ -98,6 +98,12 @@ spec: enabled: true EOF +# Apparently, as part of KNative installation, deployments can be restarted because +# of configuration changes, leading to waitpodready to fail sometimes. +# Let's sleep 2minutes to let the KNative operator to stabilize the installation before +# checking for the readiness of KNative stack. +sleep 120 + waitpodready "knative-serving" "app=controller" waitpodready "knative-serving" "app=net-istio-controller" waitpodready "knative-serving" "app=net-istio-webhook"