Skip to content

Commit

Permalink
Have the MCO manage the master ignition stub config on baremetal
Browse files Browse the repository at this point in the history
Since openshift/machine-config-operator#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
8d278d2, but later reverted by
3920ae4.
  • Loading branch information
zaneb committed Dec 16, 2021
1 parent 7354d0a commit d6ae97b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/asset/machines/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d6ae97b

Please sign in to comment.