From 87d29aff50024d3d237693d935858ebfd3dfb0db Mon Sep 17 00:00:00 2001 From: John Fortin Date: Mon, 18 Sep 2023 12:34:50 +0200 Subject: [PATCH] =?UTF-8?q?for=20vsphere=20ipi=20add=20cluster=20domain=20?= =?UTF-8?q?to=20the=20uploaded=20vm=20configs=20so=20that=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … 30-local-dns-prepender can use it Due to changes in FCOS 35 /etc/nsswitch.conf, we need to move the name resolution of api-int. to systemd-resolved. The way we do this is by adding a Domain attribute to /etc/systemd/resolved.conf.d/60-kni.conf. Since we are using a slightly different prepender than the masters and workers the domain is not being discovered automatically. To address this we are adding the domain in data/data/vsphere/bootstrap/main.tf which gets uploaded to the bootstrap instance on creation. 30-local-dns-prepender then downloads this information and adds it to /etc/systemd/resolved.conf.d/60-kni.conf Note that we check for a non-empty domain before writing /etc/systemd/resolved.conf.d/60-kni.conf. Fixes okd-project/okd#1182 Signed-off-by: John Fortin --- data/data/vsphere/bootstrap/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/data/data/vsphere/bootstrap/main.tf b/data/data/vsphere/bootstrap/main.tf index 0cd3ed2d9ed..2f03eb7e93d 100644 --- a/data/data/vsphere/bootstrap/main.tf +++ b/data/data/vsphere/bootstrap/main.tf @@ -45,6 +45,7 @@ resource "vsphere_virtual_machine" "vm_bootstrap" { "guestinfo.ignition.config.data" = base64encode(var.ignition_bootstrap) "guestinfo.ignition.config.data.encoding" = "base64" "guestinfo.hostname" = "${var.cluster_id}-bootstrap" + "guestinfo.domain" = "${var.cluster_domain}" "stealclock.enable" = "TRUE" }