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

Add K8s version query function through Tongyi Lingma analysis #1135

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

Conversation

owenwang2020
Copy link

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

利用通义灵码分析代码存在的问题,同时自动给出优化建议。(边界条件处理、异常处理)
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@johnlanni
Copy link
Collaborator

这个PR是解决的什么问题,有对应issue吗?

@owenwang2020 owenwang2020 changed the title 通过通义灵码分析增加k8s版本查询功能 Add K8s version query function through Tongyi Lingma analysis Jul 22, 2024
@owenwang2020
Copy link
Author

Add K8s version query function through Tongyi Lingma analysis

QueryParams parseParameters(absl::string_view data, size_t start,
bool decode_params) {
QueryParams params;
class QueryParams {
Copy link
Collaborator

Choose a reason for hiding this comment

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

修改这里是要干什么?

@@ -52,11 +52,16 @@ var (
"Total invalid ingresses known to pilot.",
monitoring.WithLabels(clusterTag, invalidType),
)

queryK8sVersionFail = monitoring.NewSum(
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个指标没有意义

@@ -81,6 +163,45 @@ func NetworkingIngressAvailable(client kube.Client) bool {
return runningVersion.AtLeast(version118)
}

func NetworkingIngressAvailable(client kube.Client, retryOptions ...RetryOption) bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这么做的好处在哪里?原本机制有什么问题?

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.

3 participants