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

[BUG] node filter is required for ports when it seems like it isn't #380

Closed
ibuildthecloud opened this issue Oct 17, 2020 · 3 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ibuildthecloud
Copy link
Contributor

What did you do

The following fails

$ k3d cluster create -p 9443:443
FATA[0000] Malformed portmapping '9443:443' lacks a node filter, but there is more than one node (including the loadbalancer, if there is any). 

The help says the node filter is optional, which it is, only if you run --no-lb but if you run --no-lb you get the following warning.

$ k3d cluster create -p 9443:443 --no-lb
WARN[0000] No node filter specified      

It would be more straight forward it seems that if no nodefilter is specified it will default to @server[0] regardless of the configuration and not warn or fail. An INFO message saying which container the port was added to seems appropriate.

Which version of k3d

$ k3d version
k3d version v3.1.3
k3s version v1.18.9-k3s1 (default)
@ibuildthecloud ibuildthecloud added the bug Something isn't working label Oct 17, 2020
@iwilltry42 iwilltry42 self-assigned this Oct 19, 2020
@iwilltry42
Copy link
Member

Thanks for opening this issue @ibuildthecloud ! :)
I'm not sure, if defaulting to server-0 would be the most straightforward/expected way 🤔
Personally, I'd prefer to default to the loadbalancer, if there is any.
I think "urging" the user to explicitly specify a target node could result in less human errors, while I agree that we could default to a chosen node instead of erroring out.

@iwilltry42
Copy link
Member

Hi @ibuildthecloud any other thoughts on this? 👍

@iwilltry42 iwilltry42 added this to the Backlog milestone Feb 5, 2021
@ericis
Copy link

ericis commented Jul 29, 2021

@iwilltry42 I agree with both of you. I think it might be best to default to @server[0] when --no-lb is passed and @loadbalancer when it is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants