@@ -173,6 +173,18 @@ func (m *Master) Generate(ctx context.Context, dependencies asset.Parents) error
173
173
var ipClaims []ipamv1.IPAddressClaim
174
174
var ipAddrs []ipamv1.IPAddress
175
175
var controlPlaneMachineSet * machinev1.ControlPlaneMachineSet
176
+
177
+ // Check if SNO topology is supported on this platform
178
+ if pool .Replicas != nil && * pool .Replicas == 1 {
179
+ bootstrapInPlace := false
180
+ if ic .BootstrapInPlace != nil {
181
+ bootstrapInPlace = true
182
+ }
183
+ if ! supportedSingleNodePlatform (bootstrapInPlace , ic .Platform .Name ()) {
184
+ return fmt .Errorf ("this install method does not support Single Node installation on platform %s" , ic .Platform .Name ())
185
+ }
186
+ }
187
+
176
188
switch ic .Platform .Name () {
177
189
case awstypes .Name :
178
190
subnets , err := aws .MachineSubnetsByZones (ctx , installConfig , awstypes .ClusterNodeSubnetRole )
@@ -888,3 +900,18 @@ func createAssetFiles(objects []interface{}, fileName string) ([]*asset.File, er
888
900
889
901
return assetFiles , nil
890
902
}
903
+
904
+ // supportedSingleNodePlatform indicates if the IPI Installer can be used to install SNO on
905
+ // a platform.
906
+ func supportedSingleNodePlatform (bootstrapInPlace bool , platformName string ) bool {
907
+ switch platformName {
908
+ case awstypes .Name , gcptypes .Name , azuretypes .Name , powervstypes .Name :
909
+ // Single node OpenShift installations supported without `bootstrapInPlace`
910
+ return true
911
+ case nonetypes .Name , externaltypes .Name :
912
+ // Single node OpenShift installations supported with `bootstrapInPlace`
913
+ return bootstrapInPlace
914
+ default :
915
+ return false
916
+ }
917
+ }
0 commit comments