diff --git a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template index 91bb31587b5..08f1839093c 100755 --- a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template +++ b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template @@ -55,6 +55,9 @@ then bootkube_podman_run \ --volume "$PWD:/assets:z" \ +{{- if .ClusterProfile}} + --env CLUSTER_PROFILE="{{.ClusterProfile}}" \ +{{- end}} "${RELEASE_IMAGE_DIGEST}" \ render \ --output-dir=/assets/cvo-bootstrap \ diff --git a/pkg/asset/ignition/bootstrap/bootstrap.go b/pkg/asset/ignition/bootstrap/bootstrap.go index 106dbe0502b..0c40e84a1ff 100644 --- a/pkg/asset/ignition/bootstrap/bootstrap.go +++ b/pkg/asset/ignition/bootstrap/bootstrap.go @@ -54,6 +54,7 @@ type bootstrapTemplateData struct { EtcdCluster string PullSecret string ReleaseImage string + ClusterProfile string Proxy *configv1.ProxyStatus Registries []sysregistriesv2.Registry BootImage string @@ -259,6 +260,13 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig, releaseI platformData.VSphere = vsphere.GetTemplateData(installConfig.Platform.VSphere) } + // Set cluster profile + clusterProfile := "" + if cp := os.Getenv("OPENSHIFT_INSTALL_EXPERIMENTAL_CLUSTER_PROFILE"); cp != "" { + logrus.Warnf("Found override for Cluster Profile: %q", cp) + clusterProfile = cp + } + return &bootstrapTemplateData{ AdditionalTrustBundle: installConfig.AdditionalTrustBundle, FIPS: installConfig.FIPS, @@ -269,6 +277,7 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig, releaseI Registries: registries, BootImage: string(*rhcosImage), PlatformData: platformData, + ClusterProfile: clusterProfile, }, nil }