You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "ch-lukas (via GitHub)" <gi...@apache.org> on 2026/05/08 18:13:16 UTC

[PR] kie-issues#2305: Route Kubernetes Dev Deployment fetches through cors-proxy [incubator-kie-tools]

ch-lukas opened a new pull request, #3569:
URL: https://github.com/apache/incubator-kie-tools/pull/3569

   Closes : [kie-issues#2305](https://github.com/apache/incubator-kie-issues/issues/2305)
   
   The Kubernetes Dev Deployments code path issued 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 blocked these calls and the
   deployment row stayed in an error state even when the pod was Ready.
   
   Brings the Kubernetes path to parity with the OpenShift path, which
   already routes through the cors-proxy via the existing `target-url`
   header convention (also used by `kubernetes-bridge`'s `ResourceFetcher`).
   
   **Changes**
   
   - `KieSandboxDevDeploymentsService.getHealthStatus` and the upload-status
     / upload calls in `KieSandboxDevDeploymentsUploadAppApi` now route
     through `proxyUrl` via the `target-url` header when one is configured.
   - `KieSandboxKubernetesService` is instantiated in
     `DevDeploymentsContextProvider` with `proxyUrl: env.KIE_SANDBOX_CORS_PROXY_URL`,
     matching how the OpenShift service is constructed.
   - `KubernetesService.getBaseUrl` preserves the `connection.host`
     pathname when proxying, fixing K8s API URLs that include a path
     prefix (e.g. kind's `localhost/kube-apiserver`).
   
   **Test plan**
   
   - [x] Manual: deploy a model from KIE Sandbox against a kind cluster
     whose runtime image lacks CORS headers; verify `/q/health` succeeds
     via DevTools → Network and the dropdown shows the deployment as Up.
   - [x] Verified the OpenShift code path is structurally unchanged (the
     diff in `KieSandboxOpenShiftService` is empty).
   - [ ] CI: TypeScript, ESLint, Jest, Playwright on Linux.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#2305: Route Kubernetes Dev Deployment fetches through cors-proxy [incubator-kie-tools]

Posted by "ch-lukas (via GitHub)" <gi...@apache.org>.
ch-lukas commented on PR #3569:
URL: https://github.com/apache/incubator-kie-tools/pull/3569#issuecomment-4444294797

   Thanks for the steer on the default. Pushed 616e7178ef which:
   
   - Adds a `useCorsProxy?: boolean` field on `KubernetesAuthSession`.
   - Adds a "Use CORS Proxy" checkbox to both Kubernetes connect flows
     (simple form and step-by-step wizard), with i18n in en and de.
   - Defaults new sessions to unchecked, per your call.
   - Treats legacy stored sessions (no `useCorsProxy` field) as unchecked,
     so existing setups keep working unchanged.
   - Leaves the OpenShift path alone (always proxied as before).


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#2305: Route Kubernetes Dev Deployment fetches through cors-proxy [incubator-kie-tools]

Posted by "thiagoelg (via GitHub)" <gi...@apache.org>.
thiagoelg commented on PR #3569:
URL: https://github.com/apache/incubator-kie-tools/pull/3569#issuecomment-4443164611

   Awesome, thank you @ch-lukas 
   
   > Open question: for new sessions, should the wizard default to checked or
   unchecked? Your screenshot shows checked, happy to go with that if it's
   deliberate.
   
   I would default to unchecked, as running local Kind and Minikube clusters is the most common scenario, I believe. Also, our Kind and Minikube setup instructions already set them up to allow CORS.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#2305: Route Kubernetes Dev Deployment fetches through cors-proxy [incubator-kie-tools]

Posted by "ch-lukas (via GitHub)" <gi...@apache.org>.
ch-lukas commented on PR #3569:
URL: https://github.com/apache/incubator-kie-tools/pull/3569#issuecomment-4442875804

   Thanks @thiagoelg, the checkbox makes sense.
   
   To keep scope tight I plan to:
   
   - Add the checkbox to the Kubernetes auth session wizard only. OpenShift
     stays always-proxied. OpenShift clusters are basically never local, so
     the toggle would never be unchecked there and would just add surface
     area.
   - Treat legacy stored sessions (no `useCorsProxy` field) as unchecked, so
     existing setups keep working unchanged. New sessions get the wizard.
   
   Open question: for new sessions, should the wizard default to checked or
   unchecked? Your screenshot shows checked, happy to go with that if it's
   deliberate.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#2305: Route Kubernetes Dev Deployment fetches through cors-proxy [incubator-kie-tools]

Posted by "thiagoelg (via GitHub)" <gi...@apache.org>.
thiagoelg commented on PR #3569:
URL: https://github.com/apache/incubator-kie-tools/pull/3569#issuecomment-4423741597

   Hi @ch-lukas, thank you for the PR!
   
   There's one scenario in which this change could fail: when users host their KIE Sandbox and CORS Proxy services remotely while the Kind/Minikube cluster is local.
   
   A remote CORS Proxy service can't reach and proxy requests to "localhost". 
   
   ---
   
   Having said that, not proxying requests to a Kubernetes Dev Deployment makes it impossible to use remote Kubernetes clusters.
   
   My alternative solution proposal is to have a checkbox when creating the Kubernetes Auth Session that enables all requests to it to be proxied by the CORS Proxy service, like this:
   
   <img width="1075" height="457" alt="image" src="https://github.com/user-attachments/assets/a0075e4a-ed91-44c3-bc30-aef5aafa3f84" />
   
   This way, we can support both local and remote Kubernetes clusters.
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org