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

Feature: rollout undo command supports fast rollback #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AiRanthem
Copy link
Member

@AiRanthem AiRanthem commented Feb 8, 2025

$ bin/kubectl-kruise rollout undo rollouts/rollouts-demo -h
Rollback to a previous rollout.

Examples:
  # Rollback to the previous cloneset
  kubectl-kruise rollout undo cloneset/abc
  
  # Rollback to the previous Advanced StatefulSet
  kubectl-kruise rollout undo asts/abc
  
  # Rollback to daemonset revision 3
  kubectl-kruise rollout undo daemonset/abc --to-revision=3
  
  # Rollback to the previous deployment with dry-run
  kubectl-kruise rollout undo --dry-run=server deployment/abc
  
  # Rollback to workload via rollout api object
  kubectl-kruise rollout undo rollout/abc
  
  # Fast rollback during blue-green release (will go back to a previous step with no traffic and most replicas)
  kubectl-kruise rollout undo rollout/abc --fast

Options:
    --allow-missing-template-keys=true:
        If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to
        golang and jsonpath output formats.

    --dry-run='none':
        Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without
        sending it. If server strategy, submit server-side request without persisting the resource.

    --fast=false:
        fast rollback for blue-green release

    -f, --filename=[]:
        Filename, directory, or URL to files identifying the resource to get from a server.

    -k, --kustomize='':
        Process the kustomization directory. This flag can't be used together with -f or -R.

    -o, --output='':
        Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath,
        jsonpath-as-json, jsonpath-file).

    -R, --recursive=false:
        Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests
        organized within the same directory.

    --show-managed-fields=false:
        If true, keep the managedFields when printing objects in JSON or YAML format.

    --template='':
        Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format
        is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

    --to-revision=0:
        The revision to rollback to. Default to 0 (last revision).

Usage:
  kubectl-kruise rollout undo (TYPE NAME | TYPE/NAME) [flags] [options]

Use "kubectl-kruise options" for a list of global command-line options (applies to all commands).

@AiRanthem AiRanthem changed the title add rollout rollback command Feature: rollout undo command supports fast rollback Feb 10, 2025
@furykerry
Copy link
Member

furykerry commented Mar 4, 2025

plz also update README to describe the fast rollback option. in addition, try to run the generate-docs command to update the command doc

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.

2 participants