GaOrtiga commented on code in PR #9223:
URL: https://github.com/apache/cloudstack/pull/9223#discussion_r1636324016
##########
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:
Thank you @weizhouapache.
Can you further explain this comment?
As it stands this PR maintains the current behaviour of validating rule
conflicts for rules with every protocol, without any differentiation between
TCP, UDP and ICMP. I have, however, run tests using all three protocols, and
all of them shared the same results.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]