Repository navigation
Description
AI-generated: This change request was prepared and submitted by an AI coding assistant at the user's explicit request. Evidence below distinguishes executed local checks from a later live functional check. Cluster-level routing and Argo operation status were not independently verified. Hostnames in examples are anonymized.
Summary
Allow the Helm chart's Caddy gateway to serve an HTTP origin behind external TLS termination while retaining an HTTPS publicUrl, without requiring a Kubernetes Ingress.
Proposed option: gateway.autoHttps, defaulting to true for compatibility. Set it to false when an Istio VirtualService, Gateway API route, tunnel or another external proxy already handles public HTTPS.
Problem
The chart currently couples two independent decisions: creating a Kubernetes Ingress and enabling Caddy automatic HTTPS.
In paca.gatewaySiteAddress at master commit 50463901, the helper returns:
:80wheningress.enabledis true;- the hostname from
publicUrlwhen Ingress is disabled and the URL is set; :80when neither is configured.
Consequently, a deployment with an HTTPS public URL but an HTTP origin cannot disable Kubernetes Ingress without switching Caddy to automatic HTTPS. An HTTP request to that origin redirects instead of serving the requested content.
This affects native Istio routing, where a VirtualService already routes the public hostname to the gateway Service. Creating an Ingress solely to select an HTTP listener introduces an unnecessary resource and lifecycle dependency. In the motivating deployment, the Istio ClusterIP Ingress had no load-balancer address, and Argo CD 3.5.6 kept a sync operation waiting for Ingress health, preventing PostSync hooks. Changing Argo's health evaluator is not the desired solution; the chart should express the actual deployment topology.
Clearing or downgrading publicUrl is also unsuitable: the public URL must remain HTTPS for API/public URLs, storage URLs and realtime CORS. Secure cookies must remain enabled.
Proposed Direction
Add this default under the existing gateway values:
gateway:
autoHttps: trueAdd a boolean property to values.schema.json. Change only the listener-selection condition in paca.gatewaySiteAddress:
-{{- if .Values.ingress.enabled -}}
+{{- if or .Values.ingress.enabled (not .Values.gateway.autoHttps) -}}
:80Keep the remaining helper branches unchanged. Document that false selects plain HTTP on the gateway behind external TLS termination; it does not change publicUrl, cookie security or application URLs. With ingress.enabled: true, HTTP remains selected regardless of the new option.
The resulting native-route configuration is:
publicUrl: https://paca.example.com
api:
cookieSecure: true
ingress:
enabled: false
gateway:
autoHttps: falseThe native route sends unchanged paths to the existing gateway's HTTP Service port. Caddy continues to own API, realtime, storage, plugin and runner routing. No Caddyfile replacement, application-image changes or Argo health customization is required.
Scope
- Helm values, boolean schema, the existing gateway helper and configuration documentation.
- Preserve default standalone automatic HTTPS and existing Kubernetes Ingress behavior.
- Keep application public URLs, Secure cookies, gateway routes and storage declarations unchanged.
Additional Context
Versions and reproduction
Runtime checks used the published OCI chart oci://ghcr.io/paca-ai/charts/paca:0.19.2, digest:
sha256:e4b3950d9f55dda2932e59f27e09f1663221788ff048453a7e653c2f35607973
The same coupling remains in master at the linked commit. Runtime checks did not test the newer v0.20.0-rc.1 prerelease.
Starting with otherwise valid chart values, including the required Secret configuration, use this overlay as http-origin-values.yaml:
publicUrl: https://paca.example.com
api:
cookieSecure: true
ingress:
enabled: falsehelm template paca oci://ghcr.io/paca-ai/charts/paca \
--version 0.19.2 --namespace paca \
-f existing-values.yaml -f http-origin-values.yamlInspect the gateway Deployment's SITE_ADDRESS: the helper selects the public hostname, not :80. The public URL and cookie setting above are intentionally retained.
Executed evidence
A local regression rendered the original chart and a minimally patched copy with Helm 4.2.1. It loaded each rendered gateway ConfigMap and environment into real Caddy 2.11.7, running in Podman with --network=none. A fixture file containing Paca gateway origin\n was mounted at /var/www/plugins/origin.txt. The check requested /plugins/origin.txt on 127.0.0.1:80 inside the container with a Host header matching the configured public URL.
All scenarios retained the HTTPS public URL:
| Chart / mode | ingress.enabled | gateway.autoHttps | Observed result |
|---|---|---|---|
| Original 0.19.2 / HTTP origin | false | Not supported | HTTP 308; expected asset delivery failed |
| Patched / native HTTP origin | false | false | HTTP 200, exact fixture contents |
| Patched / standalone | false | true | HTTPS redirect to the configured public URL and requested path |
| Patched / Kubernetes Ingress | true | true | HTTP 200, exact fixture contents |
Additional executed checks:
- Helm rejected a non-boolean
gateway.autoHttpsvalue. - Rendered application images, PVC/StatefulSet storage declarations and API/realtime/agent-runner environments were unchanged.
- Native mode rendered no Kubernetes Ingress; the gateway Service retained ports 80 and 8080.
- Istio 1.31.3 offline analysis of the rendered resources, native VirtualService and existing Gateway reported no validation issues.
Limits of the local checks: These establish the listener behavior and rendered configuration, not ACME issuance, live Istio dataplane behavior or cluster server dry-run success. The subsequent live checks below have a separate, narrower verification boundary.
Follow-up: live functional validation — 2026-11-02
The patched 0.19.2 chart and native-route configuration above were merged into the deployment's GitOps repository. The operator subsequently reported that deployment was working. An authenticated headless Chromium check against the live public HTTPS endpoint then confirmed:
/api/healthzreturned{"status":"ok"}.- The published demo plugin's remote entry was served from the public
/plugins/...route, and its personal, project and administration forms loaded in the real Paca UI. The API reported demo plugin version1.0.0registered and enabled. - In each form, changing the greeting and enabled checkbox, saving, and performing a full page reload retained both values. Changing one scope left the other two unchanged.
- Anonymous reads of all three settings endpoints returned HTTP
401. No browser runtime errors were captured during this check. - All original settings values were restored and read back after the check. No production restart or redeployment was performed for this smoke test.
Separate deployment correction: After the routing cutover, our custom PostSync installer also exposed an unrelated ownership mismatch: it ran as UID/GID 1000:1000, while Paca 0.19.2's API entrypoint owns its plugin directories as app (100:101) with mode 0755. Matching the non-root installer's UID/GID to the API resolved that failure without changing application images or widening directory permissions. An isolated regression using the real API entrypoint and published installer reproduced the original EACCES rename, then passed installation, API restart and reinstallation with settings preserved after the identity correction. This is downstream installer configuration, not an additional requirement of this gateway request.
Live-check limits: This was one authenticated user and one project; it did not test cross-user or cross-project isolation. It confirms live HTTPS UI/API/plugin functionality, but not which Istio resource handled the traffic. Live resource state, removal of the old Ingress, Argo's final operation phase and server dry-run were not independently inspected. ACME, object-storage uploads, realtime and runner routes were not exercised by this follow-up. The original chart's incorrect HTTP-origin redirect and the patched listener behavior remain established by the local real-Caddy regression above.
Suggested acceptance checks
- With HTTPS
publicUrl, Ingress disabled andgateway.autoHttps: false, the gateway serves HTTP content without a redirect and renders no Ingress. - With the new option omitted/defaulted to true, existing standalone behavior is unchanged.
- With Ingress enabled, the gateway continues to serve HTTP.
- Empty
publicUrlretains the existing HTTP fallback. Invalid non-boolean option values fail schema validation. - Public URL propagation, Secure cookies and existing Caddy routing remain unchanged.
Related: #478 discusses external infrastructure for Docker Compose. This request is specifically about Helm gateway listener selection; it does not require broader external-gateway support.
Activity
pullfrog commentedon Nov 2, 2026
pikann commentedon Nov 4, 2026
Thank you for the suggestion! We'll look into implementing this soon