Skip to content

Conversation

@zijun726911
Copy link
Contributor

@zijun726911 zijun726911 commented Sep 18, 2023

Changes

  • Add a helper resourceMapper.policyToTargetRefObj() so that both VpcAssociationPolicyToGateway() and TargetGroupPolicyToService could leverage it
  • Mimic Refactor event handling and remove service reconciler #360, Add the vpcAssociationPolicyEventHandler.MapToGateway() method
  • Make gateway_controller optionally watches the VpcAssociationPolicy

What type of PR is this? Prepare for SNVA Security Group Api support #199

What does this PR do / Why do we need it: Prepare for SNVA Security Group Api support

Testing done on this change:

  • More unit test for mapper.go
  • Manual test done: kubectl apply -f examples/vpc-association-policy.yaml could enter the gatewayReconciler.Reconcile() method if targetRef gateway exists
  • E2E test all pass
Ran 31 of 31 Specs in 2006.710 seconds
SUCCESS! -- 31 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestIntegration (2007.08s)
PASS

Will this PR introduce any new dependencies?: No

Will this break upgrades or downgrades. Has updating a running cluster been tested?: No

Does this PR introduce any user-facing change?: No


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@zijun726911 zijun726911 force-pushed the security-group-api-support-1 branch from f361809 to c65e977 Compare September 18, 2023 21:43
- Add vpcAssociationPolicyEventHandler.MapToGateway() method
- Make gateway_controller optionally watches the `VpcAssociationPolicy`
@zijun726911 zijun726911 force-pushed the security-group-api-support-1 branch from c65e977 to aaffb2a Compare September 18, 2023 21:55
@coveralls
Copy link

coveralls commented Sep 19, 2023

Pull Request Test Coverage Report for Build 6240134816

  • 42 of 84 (50.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.002%) to 38.666%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/eventhandlers/vpcAssociationPolicy.go 0 11 0.0%
controllers/eventhandlers/mapper.go 42 57 73.68%
controllers/gateway_controller.go 0 16 0.0%
Files with Coverage Reduction New Missed Lines %
controllers/eventhandlers/mapper.go 1 72.66%
Totals Coverage Status
Change from base Build 6227070936: 0.002%
Covered Lines: 3966
Relevant Lines: 10257

💛 - Coveralls

@scottlaiaws scottlaiaws self-requested a review September 19, 2023 17:37
Copy link
Contributor

@scottlaiaws scottlaiaws left a comment

Choose a reason for hiding this comment

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

LGTM!

@zijun726911 zijun726911 merged commit 3f89fd8 into aws:main Sep 20, 2023
@zijun726911 zijun726911 deleted the security-group-api-support-1 branch November 2, 2023 22:35
@zijun726911 zijun726911 restored the security-group-api-support-1 branch May 18, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants