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

feat: backendTLSPolicy controller #6712

Merged
merged 5 commits into from
Nov 29, 2024
Merged

feat: backendTLSPolicy controller #6712

merged 5 commits into from
Nov 29, 2024

Conversation

mlavacca
Copy link
Member

@mlavacca mlavacca commented Nov 22, 2024

What this PR does / why we need it:

This PR introduces the BackendTLSPolicy controller that does the following:

  • get the BackendTLSPolicy that triggered the reconciliation loop
  • fetches all the gateways that are affected by such policy
  • if some affected gateways are managed by KIC, update the BackendTLSPolicy object in the internal cache

Which issue this PR fixes:

Part of #6631

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 49.54955% with 168 lines in your changes missing coverage. Please review.

Project coverage is 77.7%. Comparing base (f187f31) to head (805281f).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...controllers/gateway/backendtlspolicy_controller.go 39.0% 89 Missing and 17 partials ⚠️
...rnal/controllers/gateway/backendtlspolicy_utils.go 55.2% 45 Missing and 6 partials ⚠️
internal/store/fake_store.go 25.0% 5 Missing and 1 partial ⚠️
internal/manager/scheme/scheme.go 0.0% 2 Missing and 1 partial ⚠️
internal/store/store.go 0.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #6712     +/-   ##
=======================================
- Coverage   77.8%   77.7%   -0.2%     
=======================================
  Files        204     206      +2     
  Lines      23870   24302    +432     
=======================================
+ Hits       18590   18889    +299     
- Misses      4337    4441    +104     
- Partials     943     972     +29     

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

@pull-request-size pull-request-size bot added size/L and removed size/M labels Nov 22, 2024
@mlavacca mlavacca force-pushed the implement-backendTLSPolicy branch 3 times, most recently from bca6175 to 08ea766 Compare November 27, 2024 17:43
@mlavacca mlavacca force-pushed the implement-backendTLSPolicy branch 2 times, most recently from ed849f6 to 92d4676 Compare November 28, 2024 10:20
@mlavacca mlavacca marked this pull request as ready for review November 28, 2024 11:14
@mlavacca mlavacca requested a review from a team as a code owner November 28, 2024 11:14
Copy link
Contributor

@randmonkey randmonkey left a comment

Choose a reason for hiding this comment

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

So this PR only include the controller to load BackendPolicies into the storage?

@mlavacca
Copy link
Member Author

So this PR only include the controller to load BackendPolicies into the storage?

Yes, I prefer to iterate on the problem instead of having a huge unique PR (as this is something that will likely require a big bunch of code). I improved the PR description to make clear what this PR does.

Copy link
Contributor

@randmonkey randmonkey left a comment

Choose a reason for hiding this comment

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

Overall LGTM, only some minor comments.

@mlavacca mlavacca force-pushed the implement-backendTLSPolicy branch 4 times, most recently from 8a36665 to 04ea1c5 Compare November 29, 2024 11:37
This commit introduces a new BackendTLSPolicy Controller that
implemented a very basic functionality. It is intended as the first
building block for the BackendTLSPolicy feature.

Signed-off-by: Mattia Lavacca <[email protected]>
.golangci.yaml has been updated to include the gatewayv1alpha3 group to the
forbidigo rules.

Signed-off-by: Mattia Lavacca <[email protected]>
Signed-off-by: Mattia Lavacca <[email protected]>
randmonkey
randmonkey previously approved these changes Nov 29, 2024
Co-authored-by: Grzegorz Burzyński <[email protected]>
Signed-off-by: Mattia Lavacca <[email protected]>
@mlavacca mlavacca merged commit d60cf61 into main Nov 29, 2024
42 checks passed
@mlavacca mlavacca deleted the implement-backendTLSPolicy branch November 29, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants