Skip to content

Fix K8s scaling and deletion issue if firewall rule is for ALL ports#12806

Draft
Pearl1594 wants to merge 1 commit into4.20from
ghi11758-k8s-fw-rules-all
Draft

Fix K8s scaling and deletion issue if firewall rule is for ALL ports#12806
Pearl1594 wants to merge 1 commit into4.20from
ghi11758-k8s-fw-rules-all

Conversation

@Pearl1594
Copy link
Contributor

Description

This PR fixes: #11758

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.25%. Comparing base (56dc119) to head (2311950).

Files with missing lines Patch % Lines
...er/actionworkers/KubernetesClusterScaleWorker.java 0.00% 4 Missing ⚠️
...KubernetesClusterResourceModifierActionWorker.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12806      +/-   ##
============================================
- Coverage     16.25%   16.25%   -0.01%     
+ Complexity    13425    13424       -1     
============================================
  Files          5662     5662              
  Lines        500167   500169       +2     
  Branches      60740    60740              
============================================
  Hits          81318    81318              
- Misses       409763   409765       +2     
  Partials       9086     9086              
Flag Coverage Δ
uitests 4.15% <ø> (ø)
unittests 17.11% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 125 to 133
// Remove existing SSH firewall rules
FirewallRule firewallRule = removeSshFirewallRule(publicIp);
int existingFirewallRuleSourcePortEnd;
if (firewallRule == null) {
throw new ManagementServerException("Firewall rule for node SSH access can't be provisioned");
logger.warn("SSH firewall rule not found for Kubernetes cluster: {}. It may have been manually deleted or modified.", kubernetesCluster.getName());
existingFirewallRuleSourcePortEnd = CLUSTER_NODES_DEFAULT_START_SSH_PORT + clusterVMIds.size() - 1;
} else {
existingFirewallRuleSourcePortEnd = firewallRule.getSourcePortEnd();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new method?

@sonarqubecloud
Copy link

@kiranchavala
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants