-
Notifications
You must be signed in to change notification settings - Fork 482
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
false
boolean proxy option errors out in in Kamal 2
#956
Comments
false
boolean proxy option errors out in in Kamal 2 beta
false
boolean proxy option errors out in in Kamal 2 betafalse
boolean proxy option errors out in in Kamal 2
@jeromedalbert To ensure the Proxy works correctly, the flag has to be specified as Given this, it will probably have to be fixed on the Kamal, not the Proxy side. Unfortunately, I’m not very familiar with Ruby, so I can’t provide more specific details in this context. However, since I encountered a similar issue with Go's Cobra, I wanted to share this insight in case it helps. |
When configuring Kamal 2's
deploy.yml
with afalse
boolean option in the proxy section,kamal-proxy
errors out during deploy.Steps to repro
Deploy a Rails main app (8.0.0.alpha) with the following in
config/deploy.yml
:Expected behavior
Deploy is successful.
Actual behavior
Deploy fails for the following step:
docker exec kamal-proxy kamal-proxy deploy myapp-web-production --target "44d4737d819c:80" --tls "false" --deploy-timeout "30s" --drain-timeout "30s" --buffer-requests --buffer-responses --log-request-header "Cache-Control" --log-request-header "Last-Modified" --log-request-header "User-Agent"
The error is:
Error: accepts 1 arg(s), received 2
.Details
The error happens because
--tls "false"
(or--tls false
) can't be parsed bykamal-proxy
. It seems to be currently set up to only accept--tls
alone, meaning that TLS is true. If you don't want TLS, it seems like--tls
should be skipped altogether.I don't know enough Go and Cobra to know whether
kamal-proxy
itself can (or should) be fixed to somehow understand--tls false
.Otherwise the fix would be on the Kamal side. Looks like
lib/kamal/commands/app/proxy.rb
callsdeploy_command_args
which optionizes thedeploy_options
. The wayoptionize
is currently implemented forfalse
booleans is incompatible withkamal-proxy
's expected boolean options.Workaround
Comment out
ssl: false
inconfig/deploy.yml
.The text was updated successfully, but these errors were encountered: