lifecycle

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package lifecycle implements transition assessment, approval and revocation, removal, orphaning and re-adoption.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Acknowledge

func Acknowledge(ctx context.Context, c client.Client, name, user string, now time.Time) (*v1alpha1.RuntimeRollout, v1alpha1.RolloutStep, error)

Acknowledge records, as user, that the post-apply steps of the release the rollout is paused on are done, and returns that step. It refuses a rollout that is not waiting for an acknowledgement, and writes with an optimistic lock, reading again after a conflicting write.

func Approve

func Approve(ctx context.Context, c client.Client, name, user, reason string, expires time.Time) (*v1alpha1.RuntimeRollout, error)

Approve sets the rollout's set-once approval as user, valid until expires, or until the rollout's deadline when expires is zero. It refuses a rollout that is approved already, needs no approval or has ended, and one whose deadline has passed when expires is zero. It writes with an optimistic lock, reading again after a conflicting write, so it approves exactly the rollout it read.

func Describe

func Describe(ctx context.Context, c client.Reader, operatorNamespace, name string, w io.Writer) error

Describe writes what an approver decides on: the transition, its steps// Describe writes what an approver decides on: the transition, its steps with their verdicts and CRD changes, the assessment report with the recorded steps an approval takes on, the approval and why the rollout is where it is, including inventory drift.

func Revoke

func Revoke(ctx context.Context, c client.Client, name, user, reason string, now time.Time) (*v1alpha1.RuntimeRollout, error)

Revoke adds the set-once revocation to an approved rollout as user. The step in flight finishes and no further step starts. It reads again after a conflicting write.

func WhoAmI

func WhoAmI(ctx context.Context, c client.Client) (string, error)

WhoAmI returns the requester's username as the API server authenticates it, as `kubectl auth whoami` does: approvers record it, and admission checks it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL