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

Add NSG extension to merge SecurityRules #3121

Merged
merged 5 commits into from
Jul 11, 2023
Merged

Add NSG extension to merge SecurityRules #3121

merged 5 commits into from
Jul 11, 2023

Conversation

super-harsh
Copy link
Collaborator

Closes #3050

What this PR does / why we need it:

This PR includes an extension to merge NSGSecurityRules into NSG resources. Also, as part of this PR had to add SecurityRules as an embedded resource within NSG to make sure the merge is possible.

If applicable:

  • this PR contains tests

v2/azure-arm.yaml Outdated Show resolved Hide resolved
@theunrepentantgeek theunrepentantgeek changed the title Add NSG extention to merge SecurityRules Add NSG extension to merge SecurityRules Jul 3, 2023
inboundNatRuleSlice = reflect.Append(inboundNatRuleSlice, reflect.Indirect(embeddedInboundNatRule))
}

// Now do the assignment. We do it differently here, as we need to make sure to retain current/updated/deleted InboundNatRules present on the LoadBalancer.
Copy link
Member

Choose a reason for hiding this comment

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

Was this preserved?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it is here

@codecov-commenter
Copy link

Codecov Report

Merging #3121 (df083f1) into main (7131774) will increase coverage by 0.03%.
The diff coverage is 64.17%.

@@            Coverage Diff             @@
##             main    #3121      +/-   ##
==========================================
+ Coverage   54.14%   54.18%   +0.03%     
==========================================
  Files        1418     1419       +1     
  Lines      608196   608049     -147     
==========================================
+ Hits       329328   329450     +122     
+ Misses     224867   224607     -260     
+ Partials    54001    53992       -9     
Impacted Files Coverage Δ
...01101/network_security_group_spec_arm_types_gen.go 33.33% <ø> (ø)
.../v1api20201101/network_security_group_types_gen.go 59.35% <ø> (-0.47%) ⬇️
...ecurity_groups_security_rule_spec_arm_types_gen.go 33.33% <ø> (ø)
...0201101storage/network_security_group_types_gen.go 55.17% <ø> (ø)
...01101/network_security_group_spec_arm_types_gen.go 33.33% <ø> (ø)
...v1beta20201101/network_security_group_types_gen.go 56.52% <ø> (-0.63%) ⬇️
...ecurity_groups_security_rule_spec_arm_types_gen.go 33.33% <ø> (ø)
...0201101storage/network_security_group_types_gen.go 52.98% <ø> (-1.65%) ⬇️
...customizations/network_security_group_extension.go 53.57% <53.57%> (ø)
...twork/customizations/virtual_network_extensions.go 57.69% <63.33%> (+3.84%) ⬆️
... and 5 more

... and 33 files with indirect coverage changes

@super-harsh super-harsh merged commit b43cf6e into main Jul 11, 2023
8 checks passed
@super-harsh super-harsh deleted the fix/nsg branch July 11, 2023 22:05
@theunrepentantgeek theunrepentantgeek added this to the v2.2.0 milestone Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Bug: Network Security Group rules cleared once an hour
4 participants