Skip to content
Open
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
2 changes: 1 addition & 1 deletion pkg/asset/machines/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ func IsFencingCredentialsFile(filepath string) (bool, error) {
// a platform.
func supportedSingleNodePlatform(bootstrapInPlace bool, platformName string) bool {
switch platformName {
case awstypes.Name, gcptypes.Name, azuretypes.Name, powervstypes.Name, nonetypes.Name, ibmcloudtypes.Name:
case awstypes.Name, gcptypes.Name, azuretypes.Name, powervstypes.Name, nonetypes.Name, ibmcloudtypes.Name, baremetaltypes.Name:
// Single node OpenShift installations supported without `bootstrapInPlace`
return true
case externaltypes.Name:
Expand Down
24 changes: 24 additions & 0 deletions pkg/asset/machines/master_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,30 @@ func TestSupportedSNOPlatforms(t *testing.T) {
machinePoolPlatform: types.MachinePoolPlatform{},
expectedError: true,
},
{
name: "Baremetal platform with bootstrapInPlace",
platform: types.Platform{
BareMetal: &baremetal.Platform{
Hosts: []*baremetal.Host{
{
Name: "master-0",
Role: "master",
BMC: baremetal.BMC{
Username: "usr-0",
Password: "pwd-0",
},
},
},
},
},
bootstrapInPlace: &types.BootstrapInPlace{
InstallationDisk: "/dev/sda",
},
machinePoolPlatform: types.MachinePoolPlatform{
BareMetal: &baremetal.MachinePool{},
},
expectedError: false,
},
{
name: "Nutanix platform",
platform: types.Platform{
Expand Down
9 changes: 0 additions & 9 deletions pkg/types/validation/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,6 @@ func ValidateInstallConfig(c *types.InstallConfig, usingAgentMethod bool) field.
allErrs = append(allErrs, field.Required(field.NewPath("controlPlane"), "controlPlane is required"))
}

if c.BootstrapInPlace != nil && c.ControlPlane.Replicas != nil &&
*c.ControlPlane.Replicas == 1 && c.Platform.Name() == baremetal.Name {
allErrs = append(allErrs, field.Invalid(
field.NewPath("bootstrapInPlace"),
"",
"Single Node OpenShift is not supported on the baremetal platform",
))
}

if c.Arbiter != nil {
allErrs = append(allErrs, validateArbiter(&c.Platform, c.Arbiter, c.ControlPlane, field.NewPath("arbiter"))...)
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/types/validation/installconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3088,7 +3088,7 @@ func TestValidateInstallConfig(t *testing.T) {
expectedError: "osImageStream: Unsupported value: \"invalid\": supported values: \"rhel-9\", \"rhel-10\"",
},
{
name: "sno on baremetal not supported",
name: "sno on baremetal",
installConfig: func() *types.InstallConfig {
c := validInstallConfig()
c.Platform = types.Platform{
Expand All @@ -3099,7 +3099,6 @@ func TestValidateInstallConfig(t *testing.T) {
}
return c
}(),
expectedError: `^bootstrapInPlace: Invalid value: "": Single Node OpenShift is not supported on the baremetal platform$`,
},
}
for _, tc := range cases {
Expand Down