mirror of
https://github.com/openshift/installer.git
synced 2026-02-07 03:47:13 +01:00
Without this, round-robin clients will fail when they hit the
bootstrap DNS entry (after the bootstrap node stops serving its
control plane).
The implementation is a bit awkward; I'd have preferred the AWS
approach, with:
resource "aws_lb_target_group_attachment" "bootstrap" {
count = "${var.target_group_arns_length}"
target_group_arn = "${var.target_group_arns[count.index]}"
target_id = "${aws_instance.bootstrap.private_ip}"
}
in the bootstrap module. But the libvirt host entries are only
available as a subsection of a libvirt_network resource (because the
whole network is defined in a single XML object, including the DNS
entries [1]). So instead I've added an additional variable which we
can tweak to disable the bootstrap entry. The default value for the
new variable includes the bootstrap entry for the initial cluster
'apply' call; on destry I override it via an *.auto.tfvars file (which
Terraform loads automatically [2]) to remove the bootstrap entry.
[1]: https://libvirt.org/formatnetwork.html#elementsAddress
[2]: https://www.terraform.io/docs/configuration/variables.html