From 23359cdb652e36badb0ce7ff52d26a089e4f6e16 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 12 Nov 2021 12:35:02 -0500 Subject: [PATCH] Have the MCO manage the master ignition stub config on baremetal Since https://github.com/openshift/machine-config-operator/pull/2827, the MCO creates managed master and worker ignition stub configs to ensure they always use the latest version of the ignition format. While currently we don't have an automated way of recreating master nodes, on the baremetal platform we now ship an up-to-date image as part of the release payload, and it would be expected that any reprovisioning of Machines would use this image. Therefore, on the baremetal platform, create new master Machines using the master-user-data-managed Secret, and install the initial user data in this Secret instead of the old master-user-data Secret. This is the part of the installer changes for the enhancement: https://github.com/openshift/enhancements/blob/master/enhancements/machine-config/user-data-secret-managed.md A previous version of this patch (but for both masters and workers, on all platforms) was previously committed in 8d278d258f9eb16788cc8c4bda842018e28625d7, but later reverted by 3920ae4a6bbe0690b1b23c603220257abe69a664. --- pkg/asset/machines/master.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/asset/machines/master.go b/pkg/asset/machines/master.go index da03266516d..313965f8045 100644 --- a/pkg/asset/machines/master.go +++ b/pkg/asset/machines/master.go @@ -359,6 +359,9 @@ func (m *Master) Generate(dependencies asset.Parents) error { mpool.Set(pool.Platform.BareMetal) pool.Platform.BareMetal = &mpool + // Use managed user data secret, since we always have up to date images + // available in the cluster + masterUserDataSecretName = "master-user-data-managed" machines, err = baremetal.Machines(clusterID.InfraID, ic, &pool, "master", masterUserDataSecretName) if err != nil { return errors.Wrap(err, "failed to create master machine objects")