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: improve k8s entity relation type name #2119

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Abingcbc
Copy link
Collaborator

@Abingcbc Abingcbc commented Feb 28, 2025

问题一

  1. K8s Meta中的relation type是个没有标准答案的东西,为了避免之后再反复调整需要重新出版本,不在代码里hardcode,移到配置文件中,让用户自己指定。
  2. 之前配置了relation两端的entity之后,自动就生成relation了。relation没法删除。
    解决方案:支持K8s Meta中所有关系名可配置化,不配置就默认删除。

问题二

一个node上的多个Pod非常可能会复用node ip作为pod ip,导致通过Host IP查询到的K8s Meta数据不全。
解决方案:以Pod UID作为返回值的key。

@@ -79,9 +90,45 @@ func (g *LinkGenerator) getPodNodeLink(events []*K8sMetaEvent) []*K8sMetaEvent {
return result
}

func (g *LinkGenerator) getReplicaSetDeploymentLink(events []*K8sMetaEvent) []*K8sMetaEvent {
func (g *LinkGenerator) getPodDeploymentLink(podList []*K8sMetaEvent) []*K8sMetaEvent {
Copy link
Collaborator

Choose a reason for hiding this comment

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

UT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants