Skip to content
Closed
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: 2 additions & 1 deletion data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ then
"${RELEASE_IMAGE_DIGEST}" \
render \
--output-dir=/assets/cvo-bootstrap \
--release-image="${RELEASE_IMAGE_DIGEST}"
--release-image="${RELEASE_IMAGE_DIGEST}" \
--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.

The CVO render gets cluster-profile parameter?
I thought it get it as env - openshift/cluster-version-operator#483 (comment)


cp cvo-bootstrap/bootstrap/* bootstrap-manifests/
cp cvo-bootstrap/manifests/* manifests/
Expand Down
4 changes: 4 additions & 0 deletions data/data/install.openshift.io_installconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ spec:
description: BaseDomain is the base domain to which the cluster should
belong.
type: string
clusterProfile:
default: default
description: ClusterProfile is used to select the deployment model
type: string
compute:
description: Compute is the configuration for the machines that comprise
the compute nodes.
Expand Down
2 changes: 2 additions & 0 deletions pkg/asset/ignition/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type bootstrapTemplateData struct {
BootImage string
ClusterDomain string
PlatformData platformTemplateData
ClusterProfile string
}

// platformTemplateData is the data to use to replace values in bootstrap
Expand Down Expand Up @@ -261,6 +262,7 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig, releaseI
BootImage: string(*rhcosImage),
ClusterDomain: installConfig.ClusterDomain(),
PlatformData: platformData,
ClusterProfile: installConfig.ClusterProfile,
}, nil
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/types/defaults/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var (
defaultClusterNetwork = ipnet.MustParseCIDR("10.128.0.0/14")
defaultHostPrefix = 23
defaultNetworkType = "OpenShiftSDN"
defaultClusterProfile = "default"
)

// SetInstallConfigDefaults sets the defaults for the install config.
Expand Down Expand Up @@ -87,4 +88,7 @@ func SetInstallConfigDefaults(c *types.InstallConfig) {
case c.Platform.None != nil:
nonedefaults.SetPlatformDefaults(c.Platform.None)
}
if c.ClusterProfile == "" {
c.ClusterProfile = defaultClusterProfile
}
}
6 changes: 6 additions & 0 deletions pkg/types/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ type InstallConfig struct {
// GCP: "mint", "passthrough"
// +optional
CredentialsMode CredentialsMode `json:"credentialsMode,omitempty"`

// ClusterProfile is used to select the deployment model
//
// +kubebuilder:default=default
// +optional
ClusterProfile string `json:"clusterProfile,omitempty"`
}

// ClusterDomain returns the DNS domain that all records for a cluster must belong to.
Expand Down