Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying multiple hosts for kamal-proxy via an array #1000

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

kpumuk
Copy link
Contributor

@kpumuk kpumuk commented Sep 29, 2024

Currently, the way to specify multiple hosts for kamal-proxy is via the comma-separated value passed to host argument:

host: foo.example.com,bar.example.com

This leads to frustration when users accidentally enter hosts via more idiomatic array. This MR allows to use both host and hosts, where the latter accepts an array.

hosts:
  - foo.example.com
  - bar.example.com

Note

This matches the approach taken for accessory hosts: https://kamal-deploy.org/docs/configuration/accessories/#accessory-hosts

Edit: Example of such feedback here.

@kpumuk kpumuk changed the title Allow specifying multiple hosts for kamal proxy via an array Allow specifying multiple hosts for kamal-proxy via an array Sep 29, 2024
Copy link
Contributor

@igor-alexandrov igor-alexandrov left a comment

Choose a reason for hiding this comment

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

I think it will be good to deprecate host and remove it in 2.1 release. No reason to support both config options.

Everything else looks great. Thank you!

Copy link
Collaborator

@djmb djmb left a comment

Choose a reason for hiding this comment

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

Thanks for this @kpumuk!

We'd added support for multiple hosts in kamal-proxy before the release but hadn't had time to get them into the gem before the release of 2.0.

Just one change to pass the hosts as an array and we should be good to go 👍

lib/kamal/configuration/proxy.rb Outdated Show resolved Hide resolved
@djmb djmb merged commit b4bcf35 into basecamp:main Sep 30, 2024
6 checks passed
@kpumuk kpumuk deleted the hosts branch September 30, 2024 14:51
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.

3 participants