Open invidian opened 3 years ago
I think this is a bug.
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
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"]
}
}
$ 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
).
@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.
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.