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: support disable resource periodically sync #1685

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

lingsamuel
Copy link
Member

@lingsamuel lingsamuel commented Feb 23, 2023

  • Bugfix
  • New feature provided
  • Improve performance

What this PR does / why we need it:

The function can be useless if the user has never messed up ingress controller managed resources in APISIX. It should be able to be disabled.

Also, the default value 5m is too small. Every sync writes to etcd, causing etcd to store too many history records, making the dbsize grow dramatically over time.

(also fixes a small problem, defer shouldn't in loop)

@codecov-commenter
Copy link

Codecov Report

Merging #1685 (21b167d) into master (d22a6fc) will increase coverage by 0.20%.
The diff coverage is 37.69%.

❗ Current head 21b167d differs from pull request most recent head dcc5829. Consider uploading reports for the commit dcc5829 to get more accurate results

@@            Coverage Diff             @@
##           master    #1685      +/-   ##
==========================================
+ Coverage   41.22%   41.42%   +0.20%     
==========================================
  Files          85       88       +3     
  Lines        7440     7642     +202     
==========================================
+ Hits         3067     3166      +99     
- Misses       4020     4112      +92     
- Partials      353      364      +11     
Impacted Files Coverage Δ
...providers/apisix/translation/apisix_global_rule.go 0.00% <0.00%> (ø)
pkg/providers/apisix/translation/translator.go 0.00% <ø> (ø)
...providers/gateway/translation/gateway_httproute.go 48.38% <0.00%> (-0.23%) ⬇️
pkg/providers/ingress/ingress.go 4.00% <0.00%> (+0.02%) ⬆️
pkg/providers/ingress/provider.go 0.00% <0.00%> (ø)
...ess/translation/annotations/plugins/http_method.go 81.81% <ø> (ø)
...ation/annotations/upstreamscheme/upstreamscheme.go 84.61% <0.00%> (-15.39%) ⬇️
pkg/providers/ingress/translation/translator.go 0.00% <0.00%> (ø)
pkg/providers/k8s/pod/provider.go 0.00% <ø> (ø)
pkg/providers/translation/context.go 80.95% <0.00%> (-8.53%) ⬇️
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@Gallardot Gallardot left a comment

Choose a reason for hiding this comment

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

LGTM

@tao12345666333 tao12345666333 added area/controller changelog Issues with this label should be added to changelog when public a new release labels Feb 24, 2023
@tao12345666333 tao12345666333 added this to the v1.7.0 milestone Feb 24, 2023
@tao12345666333 tao12345666333 merged commit 69fbdb2 into apache:master Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller changelog Issues with this label should be added to changelog when public a new release
Projects
Development

Successfully merging this pull request may close these issues.

bug: sync k8s crd resources to apisix at intervals, causing etcd dbsize to skyrocket
4 participants