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

Create `kubectl rollout restart deployment/$deployment` to do a rolling restart #76062

Merged
merged 1 commit into from Apr 8, 2019

Conversation

@apelisse
Copy link
Member

commented Apr 3, 2019

Add a new kubectl rollout restart command

What type of PR is this?
/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes partiially #13488

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Create a new `kubectl rollout restart` command that does a rolling restart of a deployment.
cmd := &cobra.Command{
Use: "restart RESOURCE",
DisableFlagsInUseLine: true,
Short: i18n.T("Restart a paused resource"),

This comment has been minimized.

Copy link
@janetkuo

janetkuo Apr 3, 2019

Member

Remove "pause" otherwise this will be confused with kubectl rollout resume

This comment has been minimized.

Copy link
@apelisse

apelisse Apr 3, 2019

Author Member

bad copy paste ;-)

Show resolved Hide resolved pkg/kubectl/cmd/rollout/rollout_restart.go
Show resolved Hide resolved pkg/kubectl/cmd/rollout/rollout_restart.go
Show resolved Hide resolved pkg/kubectl/cmd/rollout/rollout_restart.go
@janetkuo

This comment has been minimized.

Copy link
Member

commented Apr 3, 2019

Do we want to support DaemonSet and StatefulSet too?

@apelisse

This comment has been minimized.

Copy link
Member Author

commented Apr 3, 2019

Do we want to support DaemonSet and StatefulSet too?

Probably ...

Also I've seen that a couple of your comments mention reading the object, which I've tried to avoid, but that's probably a wrong optimization. I'll happily follow your suggestions.

Thanks!

@apelisse apelisse force-pushed the apelisse:rollout-restart branch from 3f60ade to bc0b078 Apr 6, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Apr 6, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@apelisse apelisse force-pushed the apelisse:rollout-restart branch from bc0b078 to ac395fa Apr 6, 2019

@apelisse apelisse force-pushed the apelisse:rollout-restart branch from ac395fa to 1bf99e2 Apr 7, 2019

@apelisse

This comment has been minimized.

Copy link
Member Author

commented Apr 7, 2019

/retest

@apelisse

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2019

Updated, PTAL @janetkuo

@janetkuo

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit 3409a53 into kubernetes:master Apr 8, 2019

17 checks passed

cla/linuxfoundation apelisse authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
@towolf

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

Sweet! The times of adding bogus annotations to trigger a rolling update are over!

Please support DaemonSet and StatefulSet if at all possible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.