GaOrtiga commented on code in PR #9223:
URL: https://github.com/apache/cloudstack/pull/9223#discussion_r1636740222


##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java:
##########
@@ -379,8 +380,8 @@ public VMTemplateVO getKubernetesServiceTemplate(DataCenter 
dataCenter, Hypervis
     protected void validateIsolatedNetworkIpRules(long ipId, 
FirewallRule.Purpose purpose, Network network, int clusterTotalNodeCount) {
         List<FirewallRuleVO> rules = 
firewallRulesDao.listByIpAndPurposeAndNotRevoked(ipId, purpose);
         for (FirewallRuleVO rule : rules) {
-            Integer startPort = rule.getSourcePortStart();
-            Integer endPort = rule.getSourcePortEnd();
+            int startPort = 
ObjectUtils.defaultIfNull(rule.getSourcePortStart(), 1);
+            int endPort = ObjectUtils.defaultIfNull(rule.getSourcePortEnd(), 
KubernetesClusterActionWorker.MAX_PORT);

Review Comment:
   @weizhouapache Thank you for the clarification.
   
   Yes, I believe you are correct, they should be skipped. I can make the 
adjustment in this PR, no need for a new one. 
   



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