From ee0abd91f8692c9d39fbf84df1fc841f577fc7e6 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 1 Feb 2024 09:38:10 +0100 Subject: [PATCH] CKS: fix creation on shared network if HA is enabled --- .../cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java index 19c66c1ba0b8..755cc567de92 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java +++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java @@ -737,7 +737,7 @@ private void validateKubernetesClusterCreateParameters(final CreateKubernetesClu if (network == null) { throw new InvalidParameterValueException(String.format("%s parameter must be specified along with %s parameter", ApiConstants.EXTERNAL_LOAD_BALANCER_IP_ADDRESS, ApiConstants.NETWORK_ID)); } - if (Network.GuestType.Shared.equals(network.getGuestType())) { + if (!Network.GuestType.Shared.equals(network.getGuestType())) { throw new InvalidParameterValueException(String.format("%s parameter must be specified along with %s type of network", ApiConstants.EXTERNAL_LOAD_BALANCER_IP_ADDRESS, Network.GuestType.Shared.toString())); } }