@@ -185,6 +185,17 @@ func (m *Master) Generate(ctx context.Context, dependencies asset.Parents) error
185
185
var ipClaims []ipamv1.IPAddressClaim
186
186
var ipAddrs []ipamv1.IPAddress
187
187
var controlPlaneMachineSet * machinev1.ControlPlaneMachineSet
188
+
189
+ // Check if SNO topology is supported on this platform
190
+ if pool .Replicas != nil && * pool .Replicas == 1 {
191
+ bootstrapInPlace := false
192
+ if ic .BootstrapInPlace != nil {
193
+ bootstrapInPlace = true
194
+ }
195
+ if ! supportedSingleNodePlatform (bootstrapInPlace , ic .Platform .Name ()) {
196
+ return fmt .Errorf ("this install method does not support Single Node installation on platform %s" , ic .Platform .Name ())
197
+ }
198
+ }
188
199
switch ic .Platform .Name () {
189
200
case awstypes .Name :
190
201
subnets , err := aws .MachineSubnetsByZones (ctx , installConfig , awstypes .ClusterNodeSubnetRole )
@@ -967,6 +978,20 @@ func IsFencingCredentialsFile(filepath string) (bool, error) {
967
978
if err != nil {
968
979
return false , err
969
980
}
970
-
971
981
return match , nil
972
982
}
983
+
984
+ // supportedSingleNodePlatform indicates if the IPI Installer can be used to install SNO on
985
+ // a platform.
986
+ func supportedSingleNodePlatform (bootstrapInPlace bool , platformName string ) bool {
987
+ switch platformName {
988
+ case awstypes .Name , gcptypes .Name , azuretypes .Name , powervstypes .Name :
989
+ // Single node OpenShift installations supported without `bootstrapInPlace`
990
+ return true
991
+ case nonetypes .Name , externaltypes .Name :
992
+ // Single node OpenShift installations supported with `bootstrapInPlace`
993
+ return bootstrapInPlace
994
+ default :
995
+ return false
996
+ }
997
+ }
0 commit comments