weizhouapache commented on code in PR #9223: URL: https://github.com/apache/cloudstack/pull/9223#discussion_r1636554494
########## 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: @GaOrtiga this code snippet checks if there are firewall rules conflicting with the kubernetes API (tcp/6443) and node ssh (tcp/2222, tcp/2223, etc). IMHO, if firewall rules do not use TCP protocol, the ports check can be skipped. for instance udp/6443 has no conflicts with tcp/6443. I can create another pr for it. never mind. -- 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