From deb3a942bc228d01cddfd4e9fe01ca6f3936287c Mon Sep 17 00:00:00 2001 From: trown Date: Fri, 12 Jul 2019 11:05:22 -0400 Subject: [PATCH] openstack: get ignition via IP For platforms without a DNS as a Service available, there is a chicken/egg scenario. This is because we cannot setup our own DNS solution on the nodes before they are booted via ignition. Instead, we get the ignition config via a virtual IP that is conifgured and maintained by keepalived. The setup of keepalived will be done via machine-config-operator, so it is not part of this patch. This patch only sets up the plumbing so that we can merge the keepalived work while keeping CI green. Then we can put up a patch that will switch to actually using this functionality. This patch also adds an interface for other platforms that need this functionality to work from. Specifically, these PRs can be rebased on this work: https://github.com/openshift/installer/pull/1873 https://github.com/openshift/installer/pull/1948 --- data/data/openstack/main.tf | 4 +++ data/data/openstack/masters/main.tf | 2 ++ data/data/openstack/masters/variables.tf | 8 +++++ .../openstack/topology/private-network.tf | 16 ++++++++++ data/data/openstack/topology/variables.tf | 8 +++++ data/data/openstack/variables-openstack.tf | 10 +++++++ pkg/asset/cluster/tfvars.go | 2 ++ pkg/asset/ignition/machine/node.go | 6 ++++ pkg/asset/tls/mcscertkey.go | 4 +++ pkg/tfvars/openstack/openstack.go | 6 +++- pkg/types/defaults/installconfig.go | 2 +- pkg/types/defaults/installconfig_test.go | 2 +- pkg/types/openstack/defaults/platform.go | 30 ++++++++++++++++++- pkg/types/openstack/platform.go | 8 +++++ 14 files changed, 104 insertions(+), 4 deletions(-) diff --git a/data/data/openstack/main.tf b/data/data/openstack/main.tf index 2f4e1cb840c..12546955a26 100644 --- a/data/data/openstack/main.tf +++ b/data/data/openstack/main.tf @@ -67,6 +67,8 @@ module "masters" { master_port_names = module.topology.master_port_names user_data_ign = var.ignition_master service_vm_fixed_ip = module.topology.service_vm_fixed_ip + api_int_ip = var.openstack_api_int_ip + node_dns_ip = var.openstack_node_dns_ip master_sg_ids = concat( var.openstack_master_extra_sg_ids, [module.topology.master_sg_id], @@ -84,6 +86,8 @@ module "topology" { external_network_id = var.openstack_external_network_id masters_count = var.master_count lb_floating_ip = var.openstack_lb_floating_ip + api_int_ip = var.openstack_api_int_ip + node_dns_ip = var.openstack_node_dns_ip trunk_support = var.openstack_trunk_support } diff --git a/data/data/openstack/masters/main.tf b/data/data/openstack/masters/main.tf index 624ec41ee45..85ca44a707f 100644 --- a/data/data/openstack/masters/main.tf +++ b/data/data/openstack/masters/main.tf @@ -28,6 +28,8 @@ data "ignition_file" "clustervars" { content { content = <