zuke.tools.argo_rollouts

← Python API reference

@zuke/argo-rollouts 1.1.0: @zuke/argo-rollouts — typed ArgoRolloutsTasks wrappers for the [Argo Rollouts](https://argo-rollouts.readthedocs.io) kubectl plugin (kubectl argo rollouts), for use in Zuke builds.

Symbols

#

ArgoRolloutsCreateAnalysisRunSettings

class
class ArgoRolloutsCreateAnalysisRunSettings(ArgoRolloutsSettings)

Settings for create analysisrun — run an AnalysisTemplate (or, with global, a ClusterAnalysisTemplate) once, from the cluster or a file.

  • from_(template: str) -> Self

    The template in the cluster to run (--from); this or fromFile is required.

  • from_file(path: str) -> Self

    A local template file to run (--from-file); this or from is required.

  • global_() -> Self

    Use a ClusterAnalysisTemplate instead of an AnalysisTemplate (--global).

  • argument(name: str, value: str) -> Self

    Pass a template argument as name=value (--argument); repeatable.

  • name(value: str) -> Self

    Name the run exactly (--name).

  • generate_name(prefix: str) -> Self

    Let the cluster name the run from this prefix (--generate-name).

  • instance_id(id: str) -> Self

    The controller instance the run belongs to (--instance-id).

#

ArgoRolloutsCreateSettings

class
class ArgoRolloutsCreateSettings(ArgoRolloutsSettings)

Settings for create — create a Rollout or Experiment from files.

  • filename(*paths: str) -> Self

    A manifest to create from (--filename); repeatable, at least one is required.

  • watch() -> Self

    Keep printing live updates after creating (--watch).

  • no_color() -> Self

    Print without colour (--no-color).

#

ArgoRolloutsGetExperimentSettings

class
class ArgoRolloutsGetExperimentSettings(ArgoRolloutsSettings)

Settings for get experiment — show an experiment's templates and analysis.

  • name(value: str) -> Self

    The experiment to show (required).

  • watch() -> Self

    Keep printing live updates (--watch).

  • no_color() -> Self

    Print without colour (--no-color).

#

ArgoRolloutsGetRolloutSettings

class
class ArgoRolloutsGetRolloutSettings(ArgoRolloutsSettings)

Settings for get rollout — show a rollout's steps, replica sets and analysis.

  • name(value: str) -> Self

    The rollout to show (required).

  • watch() -> Self

    Keep printing live updates (--watch).

  • no_color() -> Self

    Print without colour (--no-color).

  • timeout_seconds(seconds: float) -> Self

    With watch, give up after this many seconds (--timeout-seconds).

#

ArgoRolloutsLintSettings

class
class ArgoRolloutsLintSettings(ArgoRolloutsSettings)

Settings for lint — validate a Rollout manifest without applying it.

  • filename(path: str) -> Self

    The manifest to lint (--filename, required).

#

ArgoRolloutsListExperimentsSettings

class
class ArgoRolloutsListExperimentsSettings(ArgoRolloutsSettings)

Settings for list experiments. Unlike list rollouts it has no watch or name filter: the plugin registers only --all-namespaces for it, whatever its help text's examples suggest.

  • all_namespaces() -> Self

    List across every namespace (--all-namespaces).

#

ArgoRolloutsListRolloutsSettings

class
class ArgoRolloutsListRolloutsSettings(ArgoRolloutsSettings)

Settings for list rollouts.

  • all_namespaces() -> Self

    List across every namespace (--all-namespaces).

  • name(value: str) -> Self

    Only show the rollout with this name (--name).

  • timestamps() -> Self

    With watch, print a timestamp on each update (--timestamps).

  • watch() -> Self

    Keep printing changes (--watch).

#

ArgoRolloutsNamedSettings

class
class ArgoRolloutsNamedSettings(ArgoRolloutsSettings)

Settings for the subcommands whose only operand is a resource name: abort, pause, retry rollout, retry experiment, terminate analysisrun and terminate experiment. They differ only in their leading tokens, so they share one implementation rather than six copies of it.

  • name(value: str) -> Self

    The rollout, experiment or analysis run to act on (required).

#

ArgoRolloutsPromoteSettings

class
class ArgoRolloutsPromoteSettings(ArgoRolloutsSettings)

Settings for promote — advance a paused rollout to its next step, or with full skip every remaining step, pause and analysis.

  • name(value: str) -> Self

    The rollout to promote (required).

  • full() -> Self

    Promote to the desired version outright, skipping analysis, pauses and steps (--full).

#

ArgoRolloutsRestartSettings

class
class ArgoRolloutsRestartSettings(ArgoRolloutsSettings)

Settings for restart — restart a rollout's pods, now or after a delay.

  • name(value: str) -> Self

    The rollout whose pods to restart (required).

  • in_(duration: str) -> Self

    Delay the restart, e.g. "30s", "5m", "1h" (--in).

#

ArgoRolloutsSetImageSettings

class
class ArgoRolloutsSetImageSettings(ArgoRolloutsSettings)

Settings for set image — point a container of the rollout at a new image, which starts a new rollout through the steps its manifest declares.

  • name(value: str) -> Self

    The rollout to update (required).

  • image(container: str, reference: str) -> Self

    The container and the image to set, as CONTAINER=IMAGE (required). Pass "*" as the container to update every container in the rollout.

#

ArgoRolloutsSettings

class
class ArgoRolloutsSettings(ToolSettings)

Base for all Argo Rollouts subcommand settings. The binary is the plugin itself, kubectl-argo-rollouts, which takes the same subcommands as kubectl argo rollouts; the cluster-targeting flags (--namespace, --context, --kubeconfig) are shared by every subcommand.

  • namespace(name: str) -> Self

    Target a namespace (--namespace).

  • context(name: str) -> Self

    Use a named kubeconfig context (--context).

  • kubeconfig(path: str) -> Self

    Use an explicit kubeconfig file (--kubeconfig).

#

ArgoRolloutsStatusSettings

class
class ArgoRolloutsStatusSettings(ArgoRolloutsSettings)

Settings for status — report a rollout's status, by default watching until it completes or degrades.

  • name(value: str) -> Self

    The rollout to report on (required).

  • timeout(duration: str) -> Self

    How long to watch before giving up, e.g. "10m"; "0" waits forever (--timeout).

  • no_watch() -> Self

    Print the current status once instead of watching it (--watch=false).

#

ArgoRolloutsTasks

class
class ArgoRolloutsTasks

Typed task functions for the Argo Rollouts kubectl plugin.

  • static async set_image(ctx: ServiceContext, configure: Callable[[ArgoRolloutsSetImageSettings], ArgoRolloutsSetImageSettings] | None=None) -> ExecResult

    Point a rollout's container at a new image, starting a rollout: set image.

  • static async promote(ctx: ServiceContext, configure: Callable[[ArgoRolloutsPromoteSettings], ArgoRolloutsPromoteSettings] | None=None) -> ExecResult

    Advance a paused rollout, or promote it fully: promote.

  • static async abort(ctx: ServiceContext, configure: Callable[[ArgoRolloutsNamedSettings], ArgoRolloutsNamedSettings] | None=None) -> ExecResult

    Abort a rollout, returning traffic to the stable version: abort.

  • static async pause(ctx: ServiceContext, configure: Callable[[ArgoRolloutsNamedSettings], ArgoRolloutsNamedSettings] | None=None) -> ExecResult

    Pause a rollout where it is: pause.

  • static async status(ctx: ServiceContext, configure: Callable[[ArgoRolloutsStatusSettings], ArgoRolloutsStatusSettings] | None=None) -> ExecResult

    Report, or watch, a rollout's status: status.

  • static async undo(ctx: ServiceContext, configure: Callable[[ArgoRolloutsUndoSettings], ArgoRolloutsUndoSettings] | None=None) -> ExecResult

    Roll a rollout back to an earlier revision: undo.

  • static async restart(ctx: ServiceContext, configure: Callable[[ArgoRolloutsRestartSettings], ArgoRolloutsRestartSettings] | None=None) -> ExecResult

    Restart a rollout's pods: restart.

  • static async retry_rollout(ctx: ServiceContext, configure: Callable[[ArgoRolloutsNamedSettings], ArgoRolloutsNamedSettings] | None=None) -> ExecResult

    Retry an aborted rollout: retry rollout.

  • static async retry_experiment(ctx: ServiceContext, configure: Callable[[ArgoRolloutsNamedSettings], ArgoRolloutsNamedSettings] | None=None) -> ExecResult

    Retry an experiment: retry experiment.

  • static async terminate_analysis_run(ctx: ServiceContext, configure: Callable[[ArgoRolloutsNamedSettings], ArgoRolloutsNamedSettings] | None=None) -> ExecResult

    Terminate a running analysis run: terminate analysisrun.

  • static async terminate_experiment(ctx: ServiceContext, configure: Callable[[ArgoRolloutsNamedSettings], ArgoRolloutsNamedSettings] | None=None) -> ExecResult

    Terminate a running experiment: terminate experiment.

  • static async get_rollout(ctx: ServiceContext, configure: Callable[[ArgoRolloutsGetRolloutSettings], ArgoRolloutsGetRolloutSettings] | None=None) -> ExecResult

    Show a rollout: get rollout.

  • static async get_experiment(ctx: ServiceContext, configure: Callable[[ArgoRolloutsGetExperimentSettings], ArgoRolloutsGetExperimentSettings] | None=None) -> ExecResult

    Show an experiment: get experiment.

  • static async list_rollouts(ctx: ServiceContext, configure: Callable[[ArgoRolloutsListRolloutsSettings], ArgoRolloutsListRolloutsSettings] | None=None) -> ExecResult

    List rollouts: list rollouts.

  • static async list_experiments(ctx: ServiceContext, configure: Callable[[ArgoRolloutsListExperimentsSettings], ArgoRolloutsListExperimentsSettings] | None=None) -> ExecResult

    List experiments: list experiments.

  • static async create(ctx: ServiceContext, configure: Callable[[ArgoRolloutsCreateSettings], ArgoRolloutsCreateSettings] | None=None) -> ExecResult

    Create a Rollout or Experiment from files: create.

  • static async create_analysis_run(ctx: ServiceContext, configure: Callable[[ArgoRolloutsCreateAnalysisRunSettings], ArgoRolloutsCreateAnalysisRunSettings] | None=None) -> ExecResult

    Run an analysis template once: create analysisrun.

  • static async lint(ctx: ServiceContext, configure: Callable[[ArgoRolloutsLintSettings], ArgoRolloutsLintSettings] | None=None) -> ExecResult

    Validate a Rollout manifest: lint.

  • static async version(ctx: ServiceContext, configure: Callable[[ArgoRolloutsVersionSettings], ArgoRolloutsVersionSettings] | None=None) -> ExecResult

    Print the plugin's version: version.

#

ArgoRolloutsUndoSettings

class
class ArgoRolloutsUndoSettings(ArgoRolloutsSettings)

Settings for undo — roll a rollout back to an earlier revision.

  • name(value: str) -> Self

    The rollout to roll back (required).

  • to_revision(revision: float) -> Self

    The revision to roll back to; the previous one when unset (--to-revision).

#

ArgoRolloutsVersionSettings

class
class ArgoRolloutsVersionSettings(ArgoRolloutsSettings)

Settings for version.

  • short() -> Self

    Print only the plugin's version number (--short).