kinvolk / lokomotive

🪦 DISCONTINUED Further Lokomotive development has been discontinued. Lokomotive is a 100% open-source, easy to use and secure Kubernetes distribution from the volks at Kinvolk
https://kinvolk.io/lokomotive-kubernetes/
Apache License 2.0
320 stars 49 forks source link

Improve handling load balancers on AWS #1248

Open invidian opened 3 years ago

invidian commented 3 years ago

In #839 we found some limitations of our existing way we set up LBs for Ingress on AWS, which we should address.

See also #372.

surajssd commented 3 years ago

I think this is a bug.

surajssd commented 3 years ago

Description

Not able to create an AWS cluster with multiple worker pools. It fails with error as follows:

Unique ports required; 'worker_pool.wp2.lb_http_port' collides with 'worker_pool.wp1.lb_http_port'  args="[]" command="lokoctl cluster apply"

Environment and steps to reproduce

  1. Set-up:

Create a lokocfg file with following contents:

cluster "aws" {
  asset_dir    = "./assets"
  cluster_name = "foobar"
  dns_zone     = "foobar"
  dns_zone_id  = "foobar"
  ssh_pubkeys  = ["foo", "bar"]

  worker_pool "wp1" {
    count       = 1
    ssh_pubkeys = ["foo", "bar"]
  }

  worker_pool "wp2" {
    count       = 1
    ssh_pubkeys = ["foo", "bar"]
  }

  worker_pool "wp3" {
    count       = 1
    ssh_pubkeys = ["foo", "bar"]
  }
}
  1. Task:
$ lokoctl cluster apply
ERRO[0000] <nil>: Unique ports required; 'worker_pool.wp2.lb_http_port' collides with 'worker_pool.wp1.lb_http_port'  args="[]" command="lokoctl cluster apply"
ERRO[0000] <nil>: Unique ports required; 'worker_pool.wp2.lb_https_port' collides with 'worker_pool.wp1.lb_https_port'  args="[]" command="lokoctl cluster apply"
ERRO[0000] <nil>: Unique ports required; 'worker_pool.wp3.lb_http_port' collides with 'worker_pool.wp2.lb_http_port'  args="[]" command="lokoctl cluster apply"
ERRO[0000] <nil>: Unique ports required; 'worker_pool.wp3.lb_https_port' collides with 'worker_pool.wp2.lb_https_port'  args="[]" command="lokoctl cluster apply"
FATA[0000] Applying cluster failed: initializing: loading platform configuration  args="[]" command="lokoctl cluster apply"

Expected behavior

I expect either these variables be marked as compulsory in the code or in the docs. Also the error is not helpful not sure what is colliding with what, when I haven't provided anything.

Additional information

This is an error on current master and in last release (0.6.1).

invidian commented 3 years ago

@surajssd error message says which fields collide. If you look up default values for them, you see that they will collide. They are not compulsory if you have just one worker pool.

It's not a great UX as stated in this issue.