Skip to content

Commit f893bd4

Browse files
committed
Use value from NetUtils
1 parent b3be45e commit f893bd4

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ protected void validateIsolatedNetworkIpRules(long ipId, FirewallRule.Purpose pu
386386
List<FirewallRuleVO> rules = firewallRulesDao.listByIpPurposeProtocolAndNotRevoked(ipId, purpose, NetUtils.TCP_PROTO);
387387
for (FirewallRuleVO rule : rules) {
388388
int startPort = ObjectUtils.defaultIfNull(rule.getSourcePortStart(), 1);
389-
int endPort = ObjectUtils.defaultIfNull(rule.getSourcePortEnd(), KubernetesClusterActionWorker.MAX_PORT);
389+
int endPort = ObjectUtils.defaultIfNull(rule.getSourcePortEnd(), NetUtils.PORT_RANGE_MAX);
390390
if (logger.isDebugEnabled()) {
391391
logger.debug(String.format("Validating rule with purpose: %s for network: %s with ports: %d-%d", purpose.toString(), network.getUuid(), startPort, endPort));
392392
}

plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public class KubernetesClusterActionWorker {
106106
public static final int DEFAULT_SSH_PORT = 22;
107107
public static final int CLUSTER_NODES_DEFAULT_START_SSH_PORT = 2222;
108108
public static final int CLUSTER_NODES_DEFAULT_SSH_PORT_SG = DEFAULT_SSH_PORT;
109-
public static final int MAX_PORT = 65535;
110109

111110
public static final String CKS_CLUSTER_SECURITY_GROUP_NAME = "CKSSecurityGroup";
112111
public static final String CKS_SECURITY_GROUP_DESCRIPTION = "Security group for CKS nodes";

0 commit comments

Comments
 (0)