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

Make kubectl Scale function for RS, Deployments, Job, etc watch-based #56071

Open
shyamjvs opened this issue Nov 20, 2017 · 17 comments
Open

Make kubectl Scale function for RS, Deployments, Job, etc watch-based #56071

shyamjvs opened this issue Nov 20, 2017 · 17 comments
Labels
area/kubectl kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling.
Projects

Comments

@shyamjvs
Copy link
Member

Offshoot of #56064 (comment)

As part of the kubectl Scale() function, we can optionally waitForReplicas to reach the desired count.
Currently, we're polling periodically to check that happens (for RS, jobs, etc). We should move them to use Watch instead - like we're doing for RCs currently:

watcher, err := scaler.c.ReplicationControllers(namespace).Watch(watchOptions)
if err != nil {
return err
}
_, err = watch.Until(waitForReplicas.Timeout, watcher, func(event watch.Event) (bool, error) {
if event.Type != watch.Added && event.Type != watch.Modified {
return false, nil
}
return checkRC(event.Object.(*api.ReplicationController)), nil
})
if err == wait.ErrWaitTimeout {
return fmt.Errorf("timed out waiting for %q to be synced", name)
}
return err

/area kubectl
/kind cleanup

@k8s-ci-robot k8s-ci-robot added area/kubectl kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Nov 20, 2017
@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Nov 20, 2017
@shyamjvs
Copy link
Member Author

/sig apps
(can't think of a better one)

@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Nov 20, 2017
@shyamjvs shyamjvs removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Nov 20, 2017
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 18, 2018
@nikhita
Copy link
Member

nikhita commented Feb 18, 2018

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 18, 2018
@kow3ns kow3ns added this to Backlog in Workloads Feb 26, 2018
k8s-github-robot pushed a commit that referenced this issue Feb 28, 2018
Automatic merge from submit-queue (batch tested with PRs 60470, 59149, 56075, 60280, 60504). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make Scale() for RC poll-based until #31345 is fixed

Fixes #56064
,in the short-term until issue #31345 is fixed.
We should eventually move RS, job, deployment, etc all to watch-based (#56071)

/cc @wojtek-t - SGTY?

```release-note
NONE
```
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 19, 2018
@shyamjvs
Copy link
Member Author

shyamjvs commented May 19, 2018 via email

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 19, 2018
@shyamjvs shyamjvs mentioned this issue Jul 31, 2018
5 tasks
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 17, 2018
@shyamjvs
Copy link
Member Author

shyamjvs commented Aug 17, 2018 via email

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 17, 2018
@tnozicka
Copy link
Contributor

/assign
/remove-lifecycle frozen

@k8s-ci-robot k8s-ci-robot removed the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Aug 24, 2018
@tnozicka
Copy link
Contributor

@wojtek-t this was causing performance regressions if I recall correctly - if so I assume we want to target v1.12? I am gonna make most of the Until related fixes for v1.13 (to limit potential bugs) but I can take a second one for v1.12 (kubectl rollout status is the first one).

@shyamjvs
Copy link
Member Author

This wasn't causing regression iirc. What happened was we were seeing flakes in our performance tests when RC scaling was watch-based (failing due to bug with Until). So we switched RC scaling to poll-based to avoid those flakes (and leaving open to the long-term solution of fixing Until, so we can go back to using it).

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 22, 2018
@wojtek-t
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 22, 2018
@tnozicka
Copy link
Contributor

tnozicka commented Jan 7, 2019

I've started removing the pooling but the subresource lack list/watch methods :(

// ScaleInterface can fetch and update scales for
// resources in a particular namespace which implement
// the scale subresource.
type ScaleInterface interface {
// Get fetches the scale of the given scalable resource.
Get(resource schema.GroupResource, name string) (*autoscalingapi.Scale, error)
// Update updates the scale of the given scalable resource.
Update(resource schema.GroupResource, scale *autoscalingapi.Scale) (*autoscalingapi.Scale, error)
}

@tnozicka
Copy link
Contributor

/cc @kubernetes/sig-autoscaling-pr-reviews ^ we are condemned to pooling with such interface

@k8s-ci-robot k8s-ci-robot added the sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. label Jan 16, 2019
@tnozicka
Copy link
Contributor

/unassign

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 14, 2019
@wojtek-t
Copy link
Member

/remove-lifecycle stale
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling.
Projects
Status: Needs Triage
Workloads
  
Backlog
Development

No branches or pull requests

7 participants