You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
logAndThrow(Level.WARN, String.format("Kubernetes cluster cannot be scaled down for service offering. Service offering : %s offers lesser resources as compared to service offering : %s of Kubernetes cluster : %s",
@@ -1446,6 +1442,33 @@ private Long getExistingServiceOfferingIdForNodeType(String key, KubernetesClust
1446
1442
returnkubernetesCluster.getServiceOfferingId();
1447
1443
}
1448
1444
1445
+
// Resolves the offering backing a node type, falling back to the legacy cluster-wide offering; null if the cluster has no nodes of this type.
thrownewInvalidParameterValueException(String.format("Custom service offerings are not supported for Kubernetes clusters. Kubernetes cluster : %s, service offering : %s", kubernetesCluster.getName(), serviceOffering.getName()));
if (CollectionUtils.isEmpty(effectiveServiceOfferings)) {
1515
1538
thrownewCloudRuntimeException(String.format("Invalid service offering associated with Kubernetes cluster : %s", kubernetesCluster.getName()));
1516
1539
}
1517
-
if (serviceOffering.getCpu() < upgradeVersion.getMinimumCpu()) {
1518
-
thrownewInvalidParameterValueException(String.format("Kubernetes cluster : %s cannot be upgraded with Kubernetes version : %s which needs minimum %d vCPUs while associated service offering : %s offers only %d vCPUs",
if (serviceOffering.getRamSize() < upgradeVersion.getMinimumRamSize()) {
1522
-
thrownewInvalidParameterValueException(String.format("Kubernetes cluster : %s cannot be upgraded with Kubernetes version : %s which needs minimum %d MB RAM while associated service offering : %s offers only %d MB RAM",
for (ServiceOfferingserviceOffering : effectiveServiceOfferings) {
1541
+
if (serviceOffering.getCpu() < upgradeVersion.getMinimumCpu()) {
1542
+
thrownewInvalidParameterValueException(String.format("Kubernetes cluster : %s cannot be upgraded with Kubernetes version : %s which needs minimum %d vCPUs while associated service offering : %s offers only %d vCPUs",
if (serviceOffering.getRamSize() < upgradeVersion.getMinimumRamSize()) {
1546
+
thrownewInvalidParameterValueException(String.format("Kubernetes cluster : %s cannot be upgraded with Kubernetes version : %s which needs minimum %d MB RAM while associated service offering : %s offers only %d MB RAM",
0 commit comments