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
Target ports cannot be set to range when using long syntax #504
Comments
short syntax - target: 40000
published: '40000'
protocol: 'tcp'
...
- target: 40009
published: '40009'
protocol: 'tcp' long syntax actually reflect the Moby API used to create container, while the short syntax is just syntaxic sugar |
seems this time teh long syntax isn't the way to go then. Will it be fixed ? I'd gladly help but have no knowledge of go. |
it won't be "fixed" as the role for the long syntax is to offer detail about each and every exposed port, while the short syntax is just syntactic sugar, and offers a "range" syntax for convenience. |
I like long syntax because it usually provides more features than short one and also avoid bugs in some cases (volumes for example). I find it odd that for this particular use case it is better to use the short one as it is "lacking" a feature syntax from the short syntax. (I posted on slack first then I was told that it looked like a bug and should open an issue). If I was to try to implement it and post a PR. Could it pass or would it get a refused for reasons mentioned earlier ? |
in this specific case, long syntax doesn't offer any additional option vs short one. |
Converting
to
fails with :
services.my-service.ports.[].target
: failed to cast to expected type: strconv.Atoi: parsing "20-21": invalid syntaxIt seems
published
correctly supports ranges buttarget
doesn'tThe text was updated successfully, but these errors were encountered: