7272
7373$MY_PATH /deploy.cma.sh
7474
75- # Install KServe stack
76- if [ " $1 " != " raw" ]; then
75+ # Add CA certificate extraction for raw deployments
76+ if [[ " $1 " =~ raw ]]; then
77+ echo " ⏳ Extracting OpenShift CA certificates for raw deployment"
78+ # Get comprehensive CA bundle including both cluster and service CAs
79+ {
80+ # Cluster root CA bundle
81+ oc get configmap kube-root-ca.crt -o jsonpath=' {.data.ca\.crt}' 2> /dev/null && echo " "
82+
83+ # OpenShift service CA
84+ oc get configmap openshift-service-ca.crt -n openshift-config-managed -o jsonpath=' {.data.service-ca\.crt}' 2> /dev/null || \
85+ oc get secret service-ca -n openshift-service-ca -o jsonpath=' {.data.service-ca\.crt}' 2> /dev/null | base64 -d || true
86+ } > /tmp/ca.crt
87+
88+ # Verify we got a valid CA bundle
89+ if [ -s " /tmp/ca.crt" ] && grep -q " BEGIN CERTIFICATE" " /tmp/ca.crt" ; then
90+ echo " ✅ CA certificate bundle extracted ($( grep -c " BEGIN CERTIFICATE" /tmp/ca.crt) certificates)"
91+ else
92+ echo " ❌ Failed to extract CA certificates"
93+ fi
94+ fi
95+
96+ # Install KServe stack - skip serverless for raw and graph deployments
97+ if [[ ! " $1 " =~ raw && ! " $1 " =~ graph ]]; then
7798 echo " Installing OSSM"
7899 $MY_PATH /deploy.ossm.sh
79100 echo " Installing Serverless"
@@ -94,32 +115,30 @@ kustomize build $PROJECT_ROOT/config/overlays/test |
94115 oc apply --server-side=true -f -
95116
96117# Install DSC/DSCI for test. (sometimes there is timing issue when it is under the same kustomization so it is separated)
97- oc create -f config/overlays/test/dsci.yaml
98- oc create -f config/overlays/test/dsc.yaml
118+ oc apply -f config/overlays/test/dsci.yaml
119+ oc apply -f config/overlays/test/dsc.yaml
99120
100121# Patch the inferenceservice-config ConfigMap, when running RawDeployment tests
101- if [ " $1 " == " raw" ]; then
122+ if [[ " $1 " =~ raw || " $1 " =~ graph ]]; then
123+ echo " Patching RAW/Graph deployment, markers: $1 "
102124 export OPENSHIFT_INGRESS_DOMAIN=$( oc get ingresses.config cluster -o jsonpath=' {.spec.domain}' )
103125 oc patch configmap inferenceservice-config -n kserve --patch-file <( cat config/overlays/test/configmap/inferenceservice-openshift-ci-raw.yaml | envsubst)
104126 oc delete pod -n kserve -l control-plane=kserve-controller-manager
105127
106128 oc patch DataScienceCluster test-dsc --type=' json' -p=' [{"op": "replace", "path": "/spec/components/kserve/defaultDeploymentMode", "value": "RawDeployment"}]'
107129else
108130 export OPENSHIFT_INGRESS_DOMAIN=$( oc get ingresses.config cluster -o jsonpath=' {.spec.domain}' )
109- if [ " $1 " == " graph" ]; then
110- oc patch configmap inferenceservice-config -n kserve --patch-file <( cat config/overlays/test/configmap/inferenceservice-openshift-ci-serverless.yaml | envsubst)
111- else
112- oc patch configmap inferenceservice-config -n kserve --patch-file <( cat config/overlays/test/configmap/inferenceservice-openshift-ci-serverless-predictor.yaml | envsubst)
113- fi
131+ oc patch configmap inferenceservice-config -n kserve --patch-file <( cat config/overlays/test/configmap/inferenceservice-openshift-ci-serverless-predictor.yaml | envsubst)
114132fi
115133
116134# Wait until KServe starts
135+ echo " waiting kserve-controller get ready..."
117136oc wait --for=condition=ready pod -l control-plane=kserve-controller-manager -n kserve --timeout=300s
118137
119- if [ " $1 " != " raw" ]; then
138+ if [[ ! " $1 " =~ raw && ! " $1 " =~ graph ] ]; then
120139 echo " Installing authorino and kserve gateways"
121140 # authorino
122- curl -sL https://raw.githubusercontent.com/Kuadrant/authorino-operator/main/utils/install.sh | sed " s|kubectl|oc|" |
141+ curl -sL https://raw.githubusercontent.com/Kuadrant/authorino-operator/main/utils/install.sh | sed " s|kubectl|oc|" |
123142 bash -s -- -v 0.16.0
124143
125144fi
@@ -190,7 +209,7 @@ metadata:
190209 name: kserve-ci-e2e-test
191210EOF
192211
193- if [ " $1 " != " raw" ]; then
212+ if [[ ! " $1 " =~ raw && ! " $1 " =~ graph ] ]; then
194213 cat << EOF | oc apply -f -
195214apiVersion: maistra.io/v1
196215kind: ServiceMeshMember
@@ -214,7 +233,7 @@ kustomize build $PROJECT_ROOT/config/overlays/test/clusterresources |
214233
215234# Add the enablePassthrough annotation to the ServingRuntimes, to let Knative to
216235# generate passthrough routes.
217- if [ " $1 " != " raw" ]; then
236+ if [[ ! " $1 " =~ raw && ! " $1 " =~ graph ] ]; then
218237 oc annotate servingruntimes -n kserve-ci-e2e-test --all serving.knative.openshift.io/enablePassthrough=true
219238fi
220239
0 commit comments