Skip to content
Merged
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
13 changes: 1 addition & 12 deletions pkg/asset/agent/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,6 @@ func (a *OptionalInstallConfig) validateTNAConfiguration(installConfig *types.In
allErrs = append(allErrs, field.Invalid(fieldPath, installConfig.Arbiter.Replicas,
"TNA (Two Node with Arbiter) configuration requires exactly 1 arbiter replica"))
}
// At this point we know: 2 replicas + arbiter configured
// Check if TNA feature gate is enabled
if !installConfig.Enabled(features.FeatureGateHighlyAvailableArbiter) {
fieldPath := field.NewPath("arbiter")
allErrs = append(allErrs, field.Invalid(fieldPath, "configured",
"arbiter configuration requires FeatureGateHighlyAvailableArbiter to be enabled"))
}

return allErrs
}

Expand Down Expand Up @@ -302,10 +294,7 @@ func (a *OptionalInstallConfig) validateControlPlaneConfiguration(installConfig
// Basic boundary check for control plane replicas
if *installConfig.ControlPlane.Replicas < 1 || *installConfig.ControlPlane.Replicas > 5 {
fieldPath = field.NewPath("controlPlane", "replicas")
supportedControlPlaneRange := []string{"3", "1", "4", "5"}
if installConfig.Enabled(features.FeatureGateHighlyAvailableArbiter) {
supportedControlPlaneRange = append(supportedControlPlaneRange, "2 (with arbiter)")
}
supportedControlPlaneRange := []string{"3", "1", "4", "5", "2 (with arbiter)"}
if installConfig.Enabled(features.FeatureGateDualReplica) {
supportedControlPlaneRange = append(supportedControlPlaneRange, "2 (with fencing)")
}
Expand Down
7 changes: 1 addition & 6 deletions pkg/types/validation/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
utilsnet "k8s.io/utils/net"

configv1 "github.com/openshift/api/config/v1"
"github.com/openshift/api/features"
operv1 "github.com/openshift/api/operator/v1"
"github.com/openshift/installer/pkg/hostcrypt"
"github.com/openshift/installer/pkg/ipnet"
Expand Down Expand Up @@ -150,11 +149,7 @@ func ValidateInstallConfig(c *types.InstallConfig, usingAgentMethod bool) field.
}

if c.Arbiter != nil {
if c.Enabled(features.FeatureGateHighlyAvailableArbiter) {
allErrs = append(allErrs, validateArbiter(&c.Platform, c.Arbiter, c.ControlPlane, field.NewPath("arbiter"))...)
} else {
allErrs = append(allErrs, field.Forbidden(field.NewPath("arbiter"), fmt.Sprintf("%s feature must be enabled in order to use arbiter cluster deployment", features.FeatureGateHighlyAvailableArbiter)))
}
allErrs = append(allErrs, validateArbiter(&c.Platform, c.Arbiter, c.ControlPlane, field.NewPath("arbiter"))...)
}
allErrs = append(allErrs, validateCompute(&c.Platform, c.ControlPlane, c.Compute, field.NewPath("compute"))...)

Expand Down