Closed chris-free closed 5 years ago
If "node_count" is an acceptable name I can make a PR
Yes it is, a PR would be great.
Hi pstadler,
I have started doing the 0.12 upgrade change: https://github.com/chris-free/provisioning/commit/86c2404c803659ef0cbdb9c34eb946ca55f6fde6
So far:
I will continue doing some more tomorrow, I was wondering in the mean time if you could assist me on what this does:
locals {
etcd_hostnames = "${slice(var.hostnames, 0, var.node_count)}"
etcd_vpn_ips = "${slice(var.vpn_ips, 0, var.node_count)}"
}
In 'service/etcd/main.tf' now throws this error:
Error: Invalid function argument
on service/etcd/main.tf line 20, in locals:
20: etcd_hostnames = "${slice(var.hostnames, 0, var.node_count)}"
|----------------
| var.node_count is 3
Invalid value for "end_index" parameter: end index must not be greater than
the length of the list.
Error: Invalid function argument
on service/etcd/main.tf line 21, in locals:
21: etcd_vpn_ips = "${slice(var.vpn_ips, 0, var.node_count)}"
|----------------
| var.node_count is 3
Invalid value for "end_index" parameter: end index must not be greater than
the length of the list.
I couldn't find any documenation on what this is doing, is this a type conversion of some sort?
Number of hosts running etcd is configurable and can be less than the actual k8s node count. This was probably a bug, handled nicely by Terraform < 0.12. Try node_count - 1
. Thanks for your effort!
By the way, feel free to open a WIP PR already.
This has been fixed with https://github.com/hobby-kube/provisioning/pull/48
If "node_count" is an acceptable name I can make a PR