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

refactor: use plugin annotation types from kubernetes-configuration #6644

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Nov 8, 2024

What this PR does / why we need it:

This PR uses functions that interact with objects' plugin annotations from Kong/kubernetes-configuration#144.

Some of those introduce the usage of iterators using the iter package to prevent unnecessary allocations.

Benchmarks

Old

goos: darwin
goarch: arm64
pkg: github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate
cpu: Apple M1 Max
BenchmarkGetPluginRelations
BenchmarkGetPluginRelations-10            243942              4448 ns/op            6912 B/op         64 allocs/op
PASS
ok      github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate   1.762s

New

goos: darwin
goarch: arm64
pkg: github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate
cpu: Apple M1 Max
BenchmarkGetPluginRelations
BenchmarkGetPluginRelations-10            319242              3810 ns/op            7888 B/op         43 allocs/op
PASS
ok      github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate   2.814s

@pmalek pmalek added area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. refactor labels Nov 8, 2024
@pmalek pmalek self-assigned this Nov 8, 2024
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.1%. Comparing base (030db71) to head (aa91d31).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/dataplane/kongstate/kongstate.go 88.8% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #6644     +/-   ##
=======================================
+ Coverage   72.2%   80.1%   +7.9%     
=======================================
  Files        202     201      -1     
  Lines      25817   23951   -1866     
=======================================
+ Hits       18643   19190    +547     
+ Misses      6159    3783   -2376     
+ Partials    1015     978     -37     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. refactor size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant