Skip to content

feat(proxy): expose tls-staging and reader/writer-affinity deploy flags in deploy.yml - #20

Merged
mhenrixon merged 1 commit into
dashfrom
feat/expose-proxy-deploy-flags
Jul 13, 2026
Merged

mhenrixon merged 1 commit into
dashfrom
feat/expose-proxy-deploy-flags

Conversation

@mhenrixon

Copy link
Copy Markdown
Collaborator

Summary

  • New optional deploy.yml keys under proxy: — ssl_staging, read_targets, read_target_websockets, writer_affinity_timeout — mapped to kamal-proxy's --tls-staging, --read-target, --read-target-websockets, --writer-affinity-timeout in Proxy#deploy_options
  • ssl_staging follows the ssl_redirect -> --tls-redirect naming precedent; writer_affinity_timeout takes seconds and emits <n>s
  • Documented in lib/kamal/configuration/docs/proxy.yml (which also drives schema/type validation — no custom validator rules needed)
  • All flags exist verbatim in upstream kamal-proxy, so the branch is rooted on main and stays upstream-PR-able
  • dash bonus: the flags propagate to the loadbalancer tier automatically via the Proxy#deploy_options reuse from fix(loadbalancer): propagate full proxy deploy options to the LB #14 — ssl_staging reaching the LB is the P0 piece for safe cert-cutover rehearsal

Fixes #5

Test plan

  • RED first: all new tests fail with unknown-key schema errors before implementation
  • Flag emission, absence-when-unset, false-boolean, command-args and type-rejection tests
  • bundle exec rubocop --parallel — no offenses
  • Full unit suite: 842 runs, only the two known Apple-Silicon builder failures

…gs in deploy.yml

## Summary
kamal-proxy supports --tls-staging, --read-target, --read-target-websockets
and --writer-affinity-timeout on deploy, but none had a deploy.yml surface.
Add proxy.ssl_staging (named after the ssl_redirect -> --tls-redirect
precedent), read_targets, read_target_websockets and writer_affinity_timeout,
emitted via Proxy#deploy_options. All keys optional; nothing is emitted when
unset, so existing configs are unchanged.

## Test Coverage
- all four flags emitted (repeated --read-target, s-suffixed duration)
- absent when unset; false booleans emit no flag (proxy defaults)
- --read-target present in deploy_command_args output
- type rejections via the docs schema (bool/array/integer)

## Verification
- [x] bundle exec rubocop --parallel passes
- [x] unit suite: 842 runs, only the two known Apple-Silicon builder failures

Fixes #5
@mhenrixon
mhenrixon merged commit 1fbf430 into dash Jul 13, 2026
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.

R1: Expose --tls-staging and --read-target/writer-affinity in deploy.yml

1 participant