weizhouapache commented on code in PR #10946: URL: https://github.com/apache/cloudstack/pull/10946#discussion_r2206247924
########## plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java: ########## @@ -1331,6 +1335,21 @@ public KubernetesClusterVO doInTransaction(TransactionStatus status) { return cluster; } + private void compareKubernetesIsoArchToSelectedTemplateArch(KubernetesSupportedVersion clusterKubernetesVersion, VMTemplateVO finalTemplate) { + VMTemplateVO cksIso = templateDao.findById(clusterKubernetesVersion.getIsoId()); + if (cksIso == null) { + String err = String.format("Cannot find Kubernetes ISO associated to the Kubernetes version %s (id=%s)", + clusterKubernetesVersion.getName(), clusterKubernetesVersion.getUuid()); + throw new CloudRuntimeException(err); + } + if (!cksIso.getArch().equals(finalTemplate.getArch())) { + String err = String.format("The selected Kubernetes ISO %s arch (%s) doesn't match the template %s arch (%s) " + + "to deploy the Kubernetes cluster", + clusterKubernetesVersion.getName(), cksIso.getArch(), finalTemplate.getName(), finalTemplate.getArch()); + throw new CloudRuntimeException(err); Review Comment: Should we consider the arch of cks iso before preferred arch of zone ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org