Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ then

bootkube_podman_run \
--volume "$PWD:/assets:z" \
{{- if .ClusterProfile}}
--env CLUSTER_PROFILE="{{.ClusterProfile}}" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is still somewhat experimental, let's omit the environment variable in the CVO pod unless the user has set the cluster profile.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

{{- end}}
"${RELEASE_IMAGE_DIGEST}" \
render \
--output-dir=/assets/cvo-bootstrap \
Expand Down
9 changes: 9 additions & 0 deletions pkg/asset/ignition/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type bootstrapTemplateData struct {
EtcdCluster string
PullSecret string
ReleaseImage string
ClusterProfile string
Proxy *configv1.ProxyStatus
Registries []sysregistriesv2.Registry
BootImage string
Expand Down Expand Up @@ -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,
Expand All @@ -269,6 +277,7 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig, releaseI
Registries: registries,
BootImage: string(*rhcosImage),
PlatformData: platformData,
ClusterProfile: clusterProfile,
}, nil
}

Expand Down