shwstppr commented on code in PR #9183:
URL: https://github.com/apache/cloudstack/pull/9183#discussion_r1629283890


##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterHelperImpl.java:
##########
@@ -58,6 +58,9 @@ public void checkVmCanBeDestroyed(UserVm userVm) {
         KubernetesCluster kubernetesCluster = 
kubernetesClusterDao.findById(vmMapVO.getClusterId());
         String msg = "Instance is a part of a Kubernetes cluster";
         if (kubernetesCluster != null) {
+            if 
(kubernetesCluster.getClusterType().equals(KubernetesCluster.ClusterType.ExternalManaged))
 {

Review Comment:
   ```suggestion
               if 
(KubernetesCluster.ClusterType.ExternalManaged.equals(kubernetesCluster.getClusterType()))
 {
   ```
   check should be safer other way around



-- 
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

Reply via email to