-
Notifications
You must be signed in to change notification settings - Fork 394
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 service and more fields in K8s meta #1895
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Abingcbc
force-pushed
the
abing/k8s-meta
branch
7 times, most recently
from
November 19, 2024 16:26
f8203d4
to
dd338a6
Compare
Abingcbc
force-pushed
the
abing/k8s-meta
branch
from
November 20, 2024 01:40
dd338a6
to
97a5460
Compare
修复配置停止时导致的race问题 : 代码在哪里,说明一下 |
"支持传入service IP查询,返回其中一个对应的Pod信息" 什么场景需要?以及返回一个pod信息是否合理? |
linrunqi08
requested changes
Nov 25, 2024
Abingcbc
commented
Nov 25, 2024
Comment on lines
+309
to
+313
m.registerLock.RLock() | ||
defer m.registerLock.RUnlock() | ||
if f, ok := m.sendFuncs[timerEvent.ConfigName]; ok { | ||
allItems := make([]*K8sMetaEvent, 0) | ||
m.lock.RLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前在遍历sendFunc时,锁的粒度不够。只能保证取到元素时是原子的。
但是取到之后,到实际调用执行之间,可能会出现配置重新加载,unregister,无法保证元素仍是有效的。
Abingcbc
force-pushed
the
abing/k8s-meta
branch
from
November 25, 2024 08:32
39c6312
to
26ff36a
Compare
messixukejia
requested changes
Nov 25, 2024
messixukejia
approved these changes
Nov 27, 2024
Abingcbc
force-pushed
the
abing/k8s-meta
branch
from
November 27, 2024 02:42
f2c4a7e
to
d7cc27a
Compare
linrunqi08
approved these changes
Nov 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/metadata/ipport
:支持传入service IP和ip port查询,返回其中一个对应的Pod信息。新增 contianerID 字段。/metadata/containerid
:修改containerID格式,去除前缀。新增 podIP 字段。/metadata/host
:新增 containerID 字段。