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

fix: upstream nodes filed IP occupation. #1064

Merged
merged 14 commits into from
Jun 27, 2022

Conversation

AlinsRan
Copy link
Contributor

@AlinsRan AlinsRan commented Jun 2, 2022

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What this PR does / why we need it:

#674

Development scheme:

  • Implements an UpstreamService to maintain the servicename->upstreamname relationship, which exists in the cache.
  • Call link: Watch Resource -> Controller Handler -> Translator -> Upstream -> UpstreamService -> cache -> apisix
  • Upstream (create delete update) -> UpstreamService(create delete update)
  • Endpoint (types.EvnetDelete) -> UpstreamService(delete)

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2022

Codecov Report

Merging #1064 (f521432) into master (5756273) will decrease coverage by 0.16%.
The diff coverage is 32.31%.

@@            Coverage Diff             @@
##           master    #1064      +/-   ##
==========================================
- Coverage   32.08%   31.92%   -0.17%     
==========================================
  Files          78       79       +1     
  Lines        8795     8927     +132     
==========================================
+ Hits         2822     2850      +28     
- Misses       5666     5768     +102     
- Partials      307      309       +2     
Impacted Files Coverage Δ
pkg/apisix/apisix.go 61.36% <ø> (ø)
pkg/ingress/endpoint.go 0.00% <0.00%> (ø)
pkg/apisix/upstreamservicerelation.go 3.70% <3.70%> (ø)
pkg/apisix/cluster.go 31.89% <33.33%> (+<0.01%) ⬆️
pkg/apisix/nonexistentclient.go 43.27% <61.22%> (-1.54%) ⬇️
pkg/apisix/cache/memdb.go 75.55% <76.47%> (+0.07%) ⬆️
pkg/apisix/upstream.go 39.73% <100.00%> (+2.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f95dbe...f521432. Read the comment docs.

@AlinsRan AlinsRan marked this pull request as ready for review June 6, 2022 03:22
Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

left some comments

pkg/apisix/cache/memdb.go Outdated Show resolved Hide resolved
pkg/apisix/cache/memdb_test.go Outdated Show resolved Hide resolved
pkg/apisix/cache/memdb_test.go Outdated Show resolved Hide resolved
pkg/apisix/cache/memdb_test.go Outdated Show resolved Hide resolved
pkg/apisix/cache/memdb_test.go Outdated Show resolved Hide resolved
@tao12345666333 tao12345666333 merged commit 9e0c658 into apache:master Jun 27, 2022
@tao12345666333 tao12345666333 added this to the 1.5.0 milestone Jun 27, 2022
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: When k8s service is deleted, the APISIX Upstream nodes field is not cleared
4 participants