Skip to content

Commit 3c8e9ef

Browse files
committed
Adding s390x plaform validation in install config
1 parent b5656d3 commit 3c8e9ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/asset/agent/installconfig.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ func (a *OptionalInstallConfig) validateSupportedPlatforms(installConfig *types.
102102
if installConfig.Platform.Name() != none.Name && installConfig.ControlPlane.Architecture == types.ArchitecturePPC64LE {
103103
allErrs = append(allErrs, field.Invalid(fieldPath, installConfig.Platform.Name(), fmt.Sprintf("CPU architecture \"%s\" only supports platform \"%s\".", types.ArchitecturePPC64LE, none.Name)))
104104
}
105+
if installConfig.Platform.Name() != none.Name && installConfig.ControlPlane.Architecture == types.ArchitectureS390X {
106+
allErrs = append(allErrs, field.Invalid(fieldPath, installConfig.Platform.Name(), fmt.Sprintf("CPU architecture \"%s\" only supports platform \"%s\".", types.ArchitectureS390X, none.Name)))
107+
}
105108
if installConfig.Platform.Name() == external.Name {
106109
if installConfig.Platform.External.PlatformName != string(models.PlatformTypeOci) {
107110
fieldPath = field.NewPath("Platform", "External", "PlatformName")

0 commit comments

Comments
 (0)