Skip to content

chore: remove AWSServiceLBNetworkSecurityGroup feature gate references - #500

Open
damdo wants to merge 1 commit into
openshift:mainfrom
damdo:chore-remove-aws-service-lb-network-security-group-featuregate
Open

chore: remove AWSServiceLBNetworkSecurityGroup feature gate references#500
damdo wants to merge 1 commit into
openshift:mainfrom
damdo:chore-remove-aws-service-lb-network-security-group-featuregate

Conversation

@damdo

@damdo damdo commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove the AWSServiceLBNetworkSecurityGroup feature gate check from the AWS cloud config transformer — NLBSecurityGroupMode=Managed is now set unconditionally
  • Remove the isFeatureGateEnabled helper function (no longer used)
  • Clean up tests: remove feature-gate-specific test cases, skip logic, and hardcoded feature gate references
  • Update docs and README to remove feature gate references
  • Test names containing [OCPFeatureGate:AWSServiceLBNetworkSecurityGroup] are preserved for component readiness reporting stability

Test plan

  • go test ./pkg/cloud/aws/... passes
  • go build ./pkg/... compiles successfully
  • No functional references to AWSServiceLBNetworkSecurityGroup remain (only test names and their constant)

Related

Summary by CodeRabbit

  • New Features

    • Network Load Balancer security groups are now always managed automatically.
  • Bug Fixes

    • Removed feature-gate dependencies that could prevent NLB security-group configuration.
    • Updated cloud configuration handling to consistently apply managed NLB security groups.
  • Documentation

    • Updated test instructions and feature-gate references to reflect the generally available NLB security-group behavior.

The AWSServiceLBNetworkSecurityGroup feature gate has been promoted to
GA and is always enabled. Remove the feature gate check from the AWS
cloud config transformer so NLBSecurityGroupMode=Managed is set
unconditionally, and clean up related tests and docs.

Test names containing the feature gate are preserved for component
readiness reporting stability.
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 10, 2026
@openshift-ci

openshift-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign racheljpg for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Walkthrough

Managed NLB security groups are now always configured in Managed mode. NLB tests no longer depend on the related feature gate. Test helpers, controller fixtures, README content, and developer instructions were updated.

Changes

Managed NLB security groups

Layer / File(s) Summary
Unconditional NLB mode enforcement
pkg/cloud/aws/aws_config_transformer.go, pkg/cloud/aws/aws_config_transformer_test.go
Configuration defaults now enforce NLBSecurityGroupMode = Managed. Transformer tests remove feature-gate cases and update expected configurations.
NLB test and helper cleanup
openshift-tests/ccm-aws-tests/e2e/aws/*, openshift-tests/ccm-aws-tests/e2e/common/helper.go, docs/dev/e2e-ote-ccm-aws.md, openshift-tests/README.md
NLB security-group tests no longer check the feature gate. The deprecated helper and related feature-gate documentation are removed or updated.
Controller test feature-gate updates
pkg/controllers/cloud_config_sync_controller_test.go
Controller test setups no longer enable AWSServiceLBNetworkSecurityGroup.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: mtulio


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error Removing the feature-gate skip makes existing framework.Logf calls emit lbDNS hostnames and security-group IDs unconditionally; lbDNS may expose internal infrastructure names. Redact or omit lbDNS and security-group identifiers from test logs, including helper error and polling messages, before making these tests unconditional.
Test Structure And Quality ⚠️ Warning The NLB cleanup test creates a Service and AWS load balancer but registers no AfterEach/DeferCleanup; any failed assertion before manual deletion leaks cluster and AWS resources. Register idempotent cleanup immediately after createServiceNLB, including when metadata lookup or later assertions fail; retain explicit deletion verification in the test.
✅ Passed checks (13 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The changed Ginkgo suite uses compile-time constants for its Describe title and static literals for all It titles; no pod, node, namespace, IP, timestamp, or random value appears in a title.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only edits existing NLB tests and removes feature-gate skip calls, so this check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The commit adds no Ginkgo e2e tests; the existing loadbalancer.go has the same seven Describe/It declarations as its parent, so SNO compatibility review is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The patch changes AWS cloud-config defaults, feature-gate checks, tests, and documentation; it adds no deployments, replicas, affinity, tolerations, node selectors, topology spread, or PDB constrai...
Ote Binary Stdout Contract ✅ Passed OTE mains use stderr-backed loggers; OTE Ginkgo setup assigns GinkgoWriter to os.Stderr, and changed first-party code adds no process-level stdout writes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The patch adds no Ginkgo tests or networking logic; it only removes feature-gate checks and comments from existing NLB tests.
No-Weak-Crypto ✅ Passed The PR adds no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or secret-comparison code; changed files contain no crypto APIs or imports.
Container-Privileges ✅ Passed The patch changes only documentation and Go files. It adds no privileged settings, and the existing AWS hostNetwork setting is unchanged.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: removing references to the AWSServiceLBNetworkSecurityGroup feature gate.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@damdo

damdo commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

/hold

@damdo
damdo marked this pull request as ready for review August 10, 2026 22:13
@openshift-ci openshift-ci Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Aug 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/cloud/aws/aws_config_transformer_test.go (1)

53-54: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for an existing non-Managed mode.

All current inputs omit NLBSecurityGroupMode, so these cases exercise only the empty-value path. Add a fixture with a non-Managed value and assert that the serialized output is NLBSecurityGroupMode = Managed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/cloud/aws/aws_config_transformer_test.go` around lines 53 - 54, Extend
the AWS CloudConfig transformation test fixtures to include an explicit
non-Managed NLBSecurityGroupMode input, and assert that serialization outputs
NLBSecurityGroupMode = Managed. Preserve the existing empty-value cases while
adding coverage for this normalization behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openshift-tests/ccm-aws-tests/e2e/aws/loadbalancer.go`:
- Around line 48-51: Update the assertion description for the
NLBSecurityGroupMode test to remove the outdated feature-gate condition and
state only that NLBSecurityGroupMode must be set to “Managed” in cloud-config.
Keep the test behavior unchanged.

---

Nitpick comments:
In `@pkg/cloud/aws/aws_config_transformer_test.go`:
- Around line 53-54: Extend the AWS CloudConfig transformation test fixtures to
include an explicit non-Managed NLBSecurityGroupMode input, and assert that
serialization outputs NLBSecurityGroupMode = Managed. Preserve the existing
empty-value cases while adding coverage for this normalization behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6acfa20b-1be5-4ea8-b293-308346418160

📥 Commits

Reviewing files that changed from the base of the PR and between bc52198 and 93759df.

📒 Files selected for processing (8)
  • docs/dev/e2e-ote-ccm-aws.md
  • openshift-tests/README.md
  • openshift-tests/ccm-aws-tests/e2e/aws/helper.go
  • openshift-tests/ccm-aws-tests/e2e/aws/loadbalancer.go
  • openshift-tests/ccm-aws-tests/e2e/common/helper.go
  • pkg/cloud/aws/aws_config_transformer.go
  • pkg/cloud/aws/aws_config_transformer_test.go
  • pkg/controllers/cloud_config_sync_controller_test.go
💤 Files with no reviewable changes (2)
  • openshift-tests/README.md
  • openshift-tests/ccm-aws-tests/e2e/aws/helper.go

Comment on lines 48 to 51
// Test: [cloud-provider-aws-e2e-openshift] loadbalancer NLB [OCPFeatureGate:AWSServiceLBNetworkSecurityGroup] should have NLBSecurityGroupMode with 'Managed' value in cloud-config
//
// Validates that the cloud controller manager's configuration contains the proper NLBSecurityGroupMode setting
// when the AWSServiceLBNetworkSecurityGroup feature gate is enabled.
//
// Prerequisites:
// - AWSServiceLBNetworkSecurityGroup feature gate is enabled
//
// Expected Results:
// - ConfigMap exists and contains cloud.conf key
// - Configuration includes: NLBSecurityGroupMode set to 'Managed'
// - The test must fail if the feature gate is enabled and the configuration does not include NLBSecurityGroupMode set to 'Managed'
// - The test must skip if the feature gate is not enabled
// Validates that the cloud controller manager's configuration contains NLBSecurityGroupMode set to 'Managed'.
It("should have NLBSecurityGroupMode with 'Managed value in cloud-config", func(ctx context.Context) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the assertion message for unconditional behavior.

The test no longer checks AWSServiceLBNetworkSecurityGroup. The assertion at Line 62 still says when feature gate is enabled. Change it to state that NLBSecurityGroupMode must be Managed in cloud-config.

Proposed wording
-            "NLBSecurityGroupMode must be set to 'Managed' in cloud-config when feature gate is enabled")
+            "NLBSecurityGroupMode must be set to 'Managed' in cloud-config")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openshift-tests/ccm-aws-tests/e2e/aws/loadbalancer.go` around lines 48 - 51,
Update the assertion description for the NLBSecurityGroupMode test to remove the
outdated feature-gate condition and state only that NLBSecurityGroupMode must be
set to “Managed” in cloud-config. Keep the test behavior unchanged.

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@damdo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/level0-clusterinfra-azure-ipi-proxy-tests 93759df link false /test level0-clusterinfra-azure-ipi-proxy-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant