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

set seperate client for updating pod status #3073

Closed
wants to merge 2 commits into from

Conversation

Monokaix
Copy link
Member

fix #3072

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign thor-wl
You can assign the PR to them by writing /assign @thor-wl in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 26, 2023
@lowang-bh
Copy link
Member

lowang-bh commented Aug 26, 2023

I think we need to find out why the pod status message is updated in every session. Actually, it does not need to do update if the pod's condition has no change.

The qps limiit can not solve the root cause and will cause scheduling latency or update conflicts(if update is in different goroutine in different session)

@lowang-bh
Copy link
Member

/hold

@volcano-sh-bot volcano-sh-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 26, 2023
@Monokaix
Copy link
Member Author

Monokaix commented Aug 26, 2023

I think we need to find out why the pod status message is updated in every session. Actually, it does not need to do update if the pod's condition has no change.

The qps limiit can not solve the root cause and will cause scheduling latency or update conflicts(if update is in different goroutine in different session)

details have been added to issue.
A seperate client is crated and it only takes effect in pod/status api and doesn't affect other api like binding.

func NewPodStatusClient(config *rest.Config) (*kubernetes.Clientset, error) {
configShallowCopy := *config
qps := os.Getenv("POD_STATUS_CLIENT_QPS")
if qps != "" {
Copy link
Member

Choose a reason for hiding this comment

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

how about qps is not set in env? what's default qps? use kubeclient's default one?

Copy link
Member Author

Choose a reason for hiding this comment

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

if not set env, we will use config, which is configed by cmd flag param and consistent with other kube client.

configShallowCopy.Burst = burstInt
}

client, err := kubernetes.NewForConfig(&configShallowCopy)
Copy link
Member

Choose a reason for hiding this comment

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

Here, we can use AddUserAgent to specify an identity to distinguish from the default client.

@lowang-bh
Copy link
Member

/hold cancel

@volcano-sh-bot volcano-sh-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 27, 2023
@Monokaix
Copy link
Member Author

/close

@volcano-sh-bot
Copy link
Contributor

@Monokaix: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

updating pod status should set seperate kube client and qps
3 participants