Skip to content

feat(helm): add autoHttps configuration for Caddy in gateway settings - #702

Merged
pikann merged 3 commits into
masterfrom
feature/add-auto-https-configuration-for-helm
Nov 4, 2026
Merged

pikann merged 3 commits into
masterfrom
feature/add-auto-https-configuration-for-helm

Conversation

@pikann

@pikann pikann commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a gateway.autoHttps Helm value (default true) so the Caddy gateway can serve plain HTTP behind external TLS termination (Istio VirtualService, Gateway API route, tunnel) without requiring a Kubernetes Ingress.

Previously paca.gatewaySiteAddress only chose :80 when ingress.enabled was true. With an HTTPS publicUrl and no Ingress, Caddy switched to automatic HTTPS and redirected HTTP requests to the origin instead of serving them. Setting gateway.autoHttps: false now selects :80 in that case. publicUrl, api.cookieSecure and all application URLs are unchanged.

Closes #690

Changes

  • templates/_helpers.tpl: paca.gatewaySiteAddress returns :80 when ingress.enabled is true or gateway.autoHttps is false. The other branches are unchanged.
  • values.yaml: new gateway.autoHttps: true with documentation.
  • values.schema.json: gateway.autoHttps must be a boolean.
  • README.md: documents the new value.

Behavior

ingress.enabled gateway.autoHttps publicUrl SITE_ADDRESS
false true (default) https://paca.example.com paca.example.com (unchanged)
false false https://paca.example.com :80
true any any :80 (unchanged)
false true empty :80 (unchanged)

Testing

Checked with helm template: the default renders paca.example.com, gateway.autoHttps=false renders :80, ingress.enabled=true renders :80, and a non-boolean gateway.autoHttps is rejected by the schema. Not tested against a live Caddy or cluster.

Type of Change

  • Other (Helm chart configuration)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

gateway.autoHttps treats an absent key as false, so helm upgrade --reuse-values from a release created by an older chart silently switches the gateway to plain HTTP and drops the Service's 443 port. A missing key should fall back to the documented true default.

Reviewed changes

  • paca.gatewaySiteAddress helper — selects :80 when ingress.enabled is true or gateway.autoHttps is false, otherwise publicUrl's host.
  • values.yaml / values.schema.json — adds gateway.autoHttps: true with documentation and boolean validation.
  • Chart README — documents the new value in the gateway configuration table.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment thread deploy/helm/paca/templates/_helpers.tpl Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Absent-key default fixed — paca.gatewaySiteAddress now guards autoHttps with hasKey, so a missing key (e.g. helm upgrade --reuse-values from an older release) falls back to the documented true default instead of silently forcing :80 and dropping the Service's 443 port. Verified with isolated helm template runs: missing/true render publicUrl's host, explicit false renders :80.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run re-reviews the delta between 0543524 and 5442d48, on top of the earlier autoHttps review.

  • kindIs "bool" guard — paca.gatewaySiteAddress now honors only a real boolean false, so null, missing, or otherwise non-boolean values keep automatic HTTPS (safe for helm upgrade --reuse-values from an older chart).
  • Gateway container port alignment — templates/gateway/deployment.yaml declares containerPort: 443 (name: https) only when SITE_ADDRESS is not :80, matching the pre-existing conditional 443 entry in templates/gateway/service.yaml so the named https target exists exactly when the Service uses it.
  • Documentation — clarified in the _helpers.tpl comment and chart README that with autoHttps: false the external proxy must terminate TLS; publicUrl and api.cookieSecure stay unchanged, so cookies remain Secure.

Verified with isolated helm template renders: default/true/null render SITE_ADDRESS = host and expose the 443 container port; autoHttps: false, ingress.enabled: true, and empty publicUrl render :80 and omit 443. No other chart files reference port 443 or the named https port.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit 6440a74 into master Nov 4, 2026
1 check passed
@pikann
pikann deleted the feature/add-auto-https-configuration-for-helm branch November 4, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] [AI-generated] Helm: decouple gateway automatic HTTPS from Ingress

1 participant