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: trigger ApisixRoute event when service is created #1152

Merged
merged 14 commits into from
Jul 25, 2022

Conversation

lingsamuel
Copy link
Member

@lingsamuel lingsamuel commented Jul 14, 2022

Type of change:

Fixes #926

  • Bugfix

Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2022

Codecov Report

Merging #1152 (0274169) into master (35ca03c) will decrease coverage by 0.45%.
The diff coverage is 0.66%.

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

@@            Coverage Diff             @@
##           master    #1152      +/-   ##
==========================================
- Coverage   30.45%   29.99%   -0.46%     
==========================================
  Files          81       81              
  Lines        9839     9976     +137     
==========================================
- Hits         2996     2992       -4     
- Misses       6517     6660     +143     
+ Partials      326      324       -2     
Impacted Files Coverage Δ
pkg/ingress/apisix_route.go 0.00% <0.00%> (ø)
pkg/ingress/apisix_upstream.go 0.00% <ø> (ø)
pkg/ingress/endpointslice.go 0.00% <0.00%> (ø)
pkg/ingress/utils/string.go 0.00% <0.00%> (ø)
pkg/kube/translation/translator.go 33.33% <100.00%> (-0.96%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us.

Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
// svc meta key -> ApisixRoute name -> empty
// map[string]map[string]struct{}
svcLock sync.RWMutex
svcMap map[string]map[string]struct{} //*sync.Map
Copy link
Member

Choose a reason for hiding this comment

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

we can just use sync.Map ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would like to use more specific types instead of the untyped sync.Map.

pkg/ingress/apisix_route.go Outdated Show resolved Hide resolved
pkg/ingress/apisix_route.go Outdated Show resolved Hide resolved
pkg/ingress/apisix_route.go Outdated Show resolved Hide resolved
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
pkg/kube/apisix_route.go Outdated Show resolved Hide resolved
pkg/kube/apisix_route.go Outdated Show resolved Hide resolved
pkg/ingress/apisix_route.go Outdated Show resolved Hide resolved
pkg/ingress/apisix_route.go Outdated Show resolved Hide resolved
pkg/ingress/apisix_route.go Show resolved Hide resolved
pkg/ingress/apisix_route.go Show resolved Hide resolved
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
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.

LGTM

let's move forward.

@tao12345666333 tao12345666333 merged commit a0bc739 into apache:master Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

bug: we should create APISIX routes even if Service is created later
5 participants