Skip to content

Commit

Permalink
Merge pull request #4444 from ravidbro/add_cluster_profile
Browse files Browse the repository at this point in the history
Pass CLUSTER_PROFILE env var to CVO render
  • Loading branch information
openshift-merge-robot committed Dec 4, 2020
2 parents 268a56a + 102c615 commit 08b1013
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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}}" \
{{- 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

0 comments on commit 08b1013

Please sign in to comment.