mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
aws: Restrict CPMS from being created with single node clusters
Single node clusters do not need the CPMS manifests and hence adding a check to stop the creation of CPMS when the Replicas is set to anything below 1. Ideally, the replicas are set to 0 when the installer needs to create single node clusters.
This commit is contained in:
@@ -508,7 +508,7 @@ func (m *Master) Generate(dependencies asset.Parents) error {
|
||||
}
|
||||
|
||||
m.MachineFiles = make([]*asset.File, len(machines))
|
||||
if controlPlaneMachineSet != nil {
|
||||
if controlPlaneMachineSet != nil && *pool.Replicas > 1 {
|
||||
data, err := yaml.Marshal(controlPlaneMachineSet)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "marshal control plane machine set")
|
||||
|
||||
Reference in New Issue
Block a user