-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
apps: replace kubectl scaler in deployer with direct client call and polling #19296
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfojtik The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
kapi "k8s.io/kubernetes/pkg/apis/core" | ||
kclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" | ||
kcoreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" | ||
"k8s.io/kubernetes/pkg/kubectl" | ||
"k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/errors" |
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.
bad import
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.
seems like new goland screwing up these recently
} | ||
if scaler.RetryCount != 2 { |
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.
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.
return true, nil | ||
} | ||
// Update replication controller scale | ||
err := wait.PollImmediate(1*time.Second, retryTimeout, func() (bool, error) { |
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.
If you're already here, how about a scaleClient? It doesn't support watch, but you aren't watching anyway.
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.
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.
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.
@deads2k what difference it made? is GetScale() and UpdateScale() going away?
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.
actually I might consider the generic scale client... something tells me this:
error: couldn't scale router-1 to 1: autoscaling.Scale is not suitable for converting to "v1"
might be bugged generated client ?
@mfojtik: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
This replace the kubectl generic scaler in deployer with direct client calls and add retry mechanisms for conflict cases and cold caches.
/cc @tnozicka
Waiting for @deads2k #19275 to merge and be rebased on top.