|
9 | 9 | - tests/kserve/** |
10 | 10 | - tests/kserve_test.sh |
11 | 11 | - tests/kserve_install.sh |
12 | | - - tests/kserve_jwt_authentication_test.sh |
13 | 12 | - common/istio*/** |
14 | 13 | - common/oauth2-proxy/** |
15 | 14 | - tests/oauth2-proxy_install.sh |
16 | 15 | - common/cert-manager/** |
17 | 16 | - tests/istio* |
18 | 17 | - common/knative/** |
19 | 18 | - tests/knative_install.sh |
20 | | - - tests/*authentication*test.sh |
21 | | - - tests/final_validation.sh |
22 | 19 |
|
23 | 20 | permissions: |
24 | 21 | contents: read |
25 | 22 | actions: read |
26 | 23 |
|
27 | 24 | jobs: |
28 | | - test-basic-kserve: |
| 25 | + test-kserve: |
29 | 26 | runs-on: ubuntu-latest |
30 | 27 | steps: |
31 | 28 | - name: Checkout |
@@ -72,165 +69,13 @@ jobs: |
72 | 69 | - name: Port forward |
73 | 70 | run: ./tests/port_forward_gateway.sh |
74 | 71 |
|
75 | | - - name: Run KServe tests |
76 | | - run: ./tests/kserve_test.sh kubeflow-user-example-com |
77 | | - |
78 | | - - name: Detailed KServe Access Diagnostics |
79 | | - run: | |
80 | | - export KSERVE_INGRESS_HOST_PORT=localhost:8080 |
81 | | - export KSERVE_M2M_TOKEN="$(kubectl -n kubeflow-user-example-com create token default-editor)" |
82 | | -
|
83 | | - echo "=== AuthorizationPolicy Details ===" |
84 | | - kubectl get authorizationpolicy -n kubeflow-user-example-com -o yaml |
85 | | -
|
86 | | - echo "=== Detailed Curl Test ===" |
87 | | - curl -vv \ |
88 | | - -H "Host: isvc-sklearn.kubeflow-user-example-com.example.com" \ |
89 | | - -H "Authorization: Bearer ${KSERVE_M2M_TOKEN}" \ |
90 | | - -H "Content-Type: application/json" \ |
91 | | - "http://${KSERVE_INGRESS_HOST_PORT}/v1/models/isvc-sklearn:predict" \ |
92 | | - -d '{"instances": [[6.8, 2.8, 4.8, 1.4], [6.0, 3.4, 4.5, 1.6]]}' |
93 | | -
|
94 | | - - name: Run kserve models webapp test |
95 | | - run: | |
96 | | - kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app |
97 | | -
|
98 | | - - name: Apply Pod Security Standards restricted levels |
99 | | - run: ./tests/PSS_enable.sh |
100 | | - |
101 | | - test-jwt-authentication: |
102 | | - runs-on: ubuntu-latest |
103 | | - steps: |
104 | | - - name: Checkout |
105 | | - uses: actions/checkout@v4 |
106 | | - |
107 | | - - name: Install KinD, Create KinD cluster and Install kustomize |
108 | | - run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh |
109 | | - |
110 | | - - name: Install kubectl |
111 | | - run: ./tests/kubectl_install.sh |
112 | | - |
113 | | - - name: Create kubeflow namespace |
114 | | - run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - |
115 | | - |
116 | | - - name: Install Istio CNI |
117 | | - run: ./tests/istio-cni_install.sh |
118 | | - |
119 | | - - name: Install oauth2-proxy |
120 | | - run: ./tests/oauth2-proxy_install.sh |
121 | | - |
122 | | - - name: Install knative CNI with secure cluster-local-gateway |
123 | | - run: ./tests/knative_install.sh |
124 | | - |
125 | | - - name: Verify secure cluster-local-gateway configuration |
126 | | - run: | |
127 | | - kubectl get authorizationpolicy,requestauthentication -n istio-system | grep cluster-local-gateway |
128 | | - kubectl get requestauthentication cluster-local-gateway-jwt -n istio-system -o yaml |
129 | | - kubectl get authorizationpolicy cluster-local-gateway -n istio-system -o yaml |
130 | | - kubectl get authorizationpolicy cluster-local-gateway-require-jwt -n istio-system -o yaml |
131 | | -
|
132 | | - - name: Setup python 3.12 |
133 | | - uses: actions/setup-python@v4 |
134 | | - with: |
135 | | - python-version: 3.12 |
136 | | - |
137 | | - - name: Port forward |
138 | | - run: ./tests/port_forward_gateway.sh |
139 | | - |
140 | | - - name: Wait for cluster-local-gateway to be ready |
| 72 | + - name: Wait for Istio configurations to propagate |
141 | 73 | run: | |
142 | 74 | kubectl wait --for=condition=Available --timeout=120s deployment/cluster-local-gateway -n istio-system |
143 | | - sleep 100 |
144 | | -
|
145 | | - - name: Run Basic JWT Authentication Tests |
146 | | - run: | |
147 | | - export KSERVE_INGRESS_HOST_PORT=localhost:8080 |
148 | | - curl -s -o /dev/null -w "%{http_code}" -H "Host: test.example.com" "http://localhost:8080/" | grep -q "403" |
149 | | -
|
150 | | - - name: Run Knative Service JWT Authentication Tests |
151 | | - run: | |
152 | | - export KSERVE_INGRESS_HOST_PORT=localhost:8080 |
153 | | - ./tests/knative_authentication_test.sh |
| 75 | + sleep 60 |
154 | 76 |
|
155 | | - - name: Test External Access Configuration |
156 | | - run: | |
157 | | - export KSERVE_INGRESS_HOST_PORT=localhost:8080 |
158 | | - ./tests/kserve_setup_external_access.sh kubeflow-user-example-com secure-model-predictor |
159 | | - # Test external access pattern |
160 | | - TOKEN=$(kubectl -n kubeflow-user-example-com create token default-editor) |
161 | | - RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \ |
162 | | - -H "Authorization: Bearer $TOKEN" \ |
163 | | - -H "Content-Type: application/json" \ |
164 | | - "http://localhost:8080/kserve/kubeflow-user-example-com/secure-model-predictor/" \ |
165 | | - 2>/dev/null || echo "404") |
166 | | - if [ "$RESPONSE" != "404" ] && [ "$RESPONSE" != "200" ] && [ "$RESPONSE" != "503" ]; then |
167 | | - exit 1 |
168 | | - fi |
169 | | -
|
170 | | - - name: Apply Pod Security Standards restricted levels |
171 | | - run: ./tests/PSS_enable.sh |
172 | | - |
173 | | - test-secure-authentication: |
174 | | - runs-on: ubuntu-latest |
175 | | - steps: |
176 | | - - name: Checkout |
177 | | - uses: actions/checkout@v4 |
178 | | - |
179 | | - - name: Install KinD, Create KinD cluster and Install kustomize |
180 | | - run: ./tests/install_KinD_create_KinD_cluster_install_kustomize.sh |
181 | | - |
182 | | - - name: Install kubectl |
183 | | - run: ./tests/kubectl_install.sh |
184 | | - |
185 | | - - name: Create kubeflow namespace |
186 | | - run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - |
187 | | - |
188 | | - - name: Install Istio CNI |
189 | | - run: ./tests/istio-cni_install.sh |
190 | | - |
191 | | - - name: Install oauth2-proxy |
192 | | - run: ./tests/oauth2-proxy_install.sh |
193 | | - |
194 | | - - name: Install cert-manager |
195 | | - run: ./tests/cert_manager_install.sh |
196 | | - |
197 | | - - name: Install knative CNI (with secure cluster-local-gateway) |
198 | | - run: ./tests/knative_install.sh |
199 | | - |
200 | | - - name: Install KServe |
201 | | - run: ./tests/kserve_install.sh |
202 | | - |
203 | | - - name: Install KF Multi Tenancy |
204 | | - run: ./tests/multi_tenancy_install.sh |
205 | | - |
206 | | - - name: Install kubeflow-istio-resources |
207 | | - run: kustomize build common/istio/kubeflow-istio-resources/base | kubectl apply -f - |
208 | | - |
209 | | - - name: Create KF Profile |
210 | | - run: ./tests/kubeflow_profile_install.sh |
211 | | - |
212 | | - - name: Setup python 3.12 |
213 | | - uses: actions/setup-python@v4 |
214 | | - with: |
215 | | - python-version: 3.12 |
216 | | - |
217 | | - - name: Port forward |
218 | | - run: ./tests/port_forward_gateway.sh |
219 | | - |
220 | | - - name: Verify JWT authentication policies are applied |
221 | | - run: | |
222 | | - kubectl get authorizationpolicy cluster-local-gateway-require-jwt -n istio-system |
223 | | - kubectl get requestauthentication cluster-local-gateway-jwt -n istio-system |
224 | | - kubectl get authorizationpolicy cluster-local-gateway -n istio-system |
225 | | - kubectl get deployment cluster-local-gateway -n istio-system |
226 | | - kubectl wait --for=condition=Available deployment/cluster-local-gateway -n istio-system --timeout=120s |
227 | | - kubectl get pods -n istio-system -l app=cluster-jwks-proxy | grep -q Running || kubectl get pods -n istio-system -l app=cluster-jwks-proxy |
228 | | -
|
229 | | - - name: Wait for configurations to propagate |
230 | | - run: sleep 60 |
231 | | - |
232 | | - - name: Run KServe secure authentication tests |
233 | | - run: ./tests/kserve_jwt_authentication_test.sh kubeflow-user-example-com |
| 77 | + - name: Run KServe tests |
| 78 | + run: ./tests/kserve_test.sh kubeflow-user-example-com |
234 | 79 |
|
235 | 80 | - name: Apply Pod Security Standards restricted levels |
236 | 81 | run: ./tests/PSS_enable.sh |
0 commit comments