From 8a7d8763ee32522c50736b9bbb4c1f1795ec5ee8 Mon Sep 17 00:00:00 2001 From: Neeraj Mishra Date: Tue, 19 May 2026 21:49:56 +0530 Subject: [PATCH] Enable external platform support for s390x and ppc64le architectures This change allows the external platform type to be used with s390x and ppc64le architectures, which previously only supported the 'none' platform. Changes: - Updated GetActualCreateClusterPlatformParams to allow external platform for s390x and ppc64le in addition to the existing 'none' platform - Added logic to preserve external platform configuration when specified - User-managed networking remains mandatory for these architectures Fixes the error: 'Can't set external platform on s390x architecture' Signed-off-by: Neeraj Mishra --- internal/provider/platform.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/provider/platform.go b/internal/provider/platform.go index efa78f06e397..b46de9b2d2f9 100644 --- a/internal/provider/platform.go +++ b/internal/provider/platform.go @@ -307,9 +307,13 @@ func GetActualCreateClusterPlatformParams(platform *models.Platform, userManaged if cpuArchitecture == models.ClusterCPUArchitectureS390x || cpuArchitecture == models.ClusterCPUArchitecturePpc64le { if userManagedNetworking != nil && !*userManagedNetworking { return nil, nil, common.NewApiError(http.StatusBadRequest, errors.Errorf("Can't disable User Managed Networking on %s architecture", cpuArchitecture)) - } else if platform != nil && !isPlatformNone(platform) { + } else if platform != nil && !isPlatformNone(platform) && !common.IsPlatformExternal(platform) { return nil, nil, common.NewApiError(http.StatusBadRequest, errors.Errorf("Can't set %s platform on %s architecture", *platform.Type, cpuArchitecture)) } + // If platform is external, keep it; otherwise default to none + if platform != nil && common.IsPlatformExternal(platform) { + return platform, swag.Bool(true), nil + } return createPlatformFromType(models.PlatformTypeNone), swag.Bool(true), nil }