Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARO-13921 Add cluster subnets' network security groups to List Cluster Azure Resources output if cluster uses preconfiguredNSG #4099

Merged
merged 6 commits into from
Feb 13, 2025

Conversation

aasserzo
Copy link
Collaborator

Which issue this PR addresses:

Fixes ARO-13921

What this PR does / why we need it:

Currently the List Cluster Azure Resources admin endpoint lists all resources within the managed resource group.
BYO NSGs, that some customers might have configured, belong to different resource groups, and are therefore omitted from this endpoint's output.
This change checks whether a subnet has an NSG that belongs to a different RG, and appends it to the Cluster Resources list.

Test plan for issue:

The test mocks two subnets, one containing a managed NSG, the other containing a BYO NSG, then runs WriteToStream().
That, in turn, calls appendAzureNetworkResources().
The expected result is for both of them to be present in the resulting list.

Is there any documentation that needs to be updated for this PR?

No documentation exists for this functionality.

How do you know this will function as expected in production?

TBD

@aasserzo aasserzo added good first issue Good for newcomers work-in-progress go Pull requests that update Go code labels Feb 12, 2025
@aasserzo aasserzo changed the title ARO-13921 ARO-13921 Add cluster subnets' network security groups to List Cluster Azure Resources output if cluster uses preconfiguredNSG Feb 12, 2025
@aasserzo aasserzo marked this pull request as draft February 12, 2025 17:38
@aasserzo aasserzo marked this pull request as ready for review February 13, 2025 11:15
@aasserzo aasserzo self-assigned this Feb 13, 2025
Copy link
Collaborator

@mrWinston mrWinston left a comment

Choose a reason for hiding this comment

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

Looking really good! I mostly have minor comments regarding style. the only important thing for me would be the nil check for snet.Properties.NetworkSecurityGroup.

pkg/frontend/adminactions/resources_list.go Outdated Show resolved Hide resolved
pkg/frontend/adminactions/resources_list.go Outdated Show resolved Hide resolved
pkg/frontend/adminactions/resources_list.go Outdated Show resolved Hide resolved
pkg/frontend/adminactions/resources_list.go Outdated Show resolved Hide resolved
@aasserzo aasserzo requested a review from mrWinston February 13, 2025 14:22
@kimorris27 kimorris27 merged commit 1e45ba4 into master Feb 13, 2025
22 checks passed
@kimorris27 kimorris27 deleted the aasserzo/ARO-13921 branch February 13, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants