ch-lukas opened a new issue, #2305:
URL: https://github.com/apache/incubator-kie-issues/issues/2305
When using KIE Sandbox with a Kubernetes (non-OpenShift) Dev Deployments
authentication session, the deployment row displays a persistent error
icon in the dropdown even when the deployed pod is Ready, and the
browser console shows CORS errors against the runtime's ingress URL:
```
Access to fetch at 'https://<runtime-host>/q/health' from origin
'<sandbox-origin>' has been blocked by CORS policy: No
'Access-Control-Allow-Origin' header is present on the requested resource.
```
The Kubernetes code path issues browser→runtime fetches directly,
bypassing the configured cors-proxy. Because the dev-deployment runtime
image does not configure CORS headers for cross-origin requests, the
browser rejects these calls. The OpenShift code path is unaffected
because it already passes `proxyUrl` to its service and routes through
the proxy via the existing `target-url` header convention (also used by
`kubernetes-bridge`'s `ResourceFetcher`).
**Steps to Reproduce**
1. Run KIE Sandbox locally (`pnpm -F online-editor start`) so the
cors-proxy is reachable at `KIE_SANDBOX_CORS_PROXY_URL`.
2. Configure a Kubernetes Dev Deployments auth session against a
cluster whose runtime image does not ship CORS headers (e.g. a kind
cluster running the upstream `dev-deployment-quarkus-blank-app`
image).
3. Deploy a model from the Sandbox.
4. Once the pod is Ready (`kubectl get pods` shows `1/1 Running`),
open DevTools → Network. The fetch to the runtime's `/q/health`
endpoint fails with the CORS error above.
5. Observe the deployment row in the dropdown shows an error icon
despite the pod being healthy.
**Expected Behavior**
When `KIE_SANDBOX_CORS_PROXY_URL` is configured, every browser→runtime
fetch from the Kubernetes Dev Deployments code path should route
through the cors-proxy via the `target-url` header convention,
matching the OpenShift code path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]