Documentation
¶
Overview ¶
Package lifecycle implements transition assessment, approval and revocation, removal, orphaning and re-adoption.
Index ¶
- func Acknowledge(ctx context.Context, c client.Client, name, user string, now time.Time) (*v1alpha1.RuntimeRollout, v1alpha1.RolloutStep, error)
- func Approve(ctx context.Context, c client.Client, name, user, reason string, ...) (*v1alpha1.RuntimeRollout, error)
- func Describe(ctx context.Context, c client.Reader, operatorNamespace, name string, ...) error
- func Revoke(ctx context.Context, c client.Client, name, user, reason string, now time.Time) (*v1alpha1.RuntimeRollout, error)
- func WhoAmI(ctx context.Context, c client.Client) (string, error)
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.
Types ¶
This section is empty.