verify

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package verify answers a different question from pkg/health.

Health says "it is running". Verification says "it worked" — and the two diverge exactly where it matters: a canary that rolled back leaves a healthy Deployment serving the previous version, so every health check passes and nothing was delivered. Flagger is the Flux-family answer to the second question, and this reads its verdict.

Index

Constants

View Source
const VerifierFlagger = "flagger"

VerifierFlagger is the name used in `verify[].uses`.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flagger

type Flagger struct{ Client client.Client }

Flagger reads a Canary's verdict.

func (*Flagger) Name

func (f *Flagger) Name() string

func (*Flagger) Verify

func (f *Flagger) Verify(ctx context.Context, namespace string, raw []byte) (Result, error)

Verify reports whether Flagger promoted the canary.

The phases come from the CRD's own enum, and they fall into three groups rather than two. Succeeded and Failed are verdicts. Progressing, Promoting, Waiting and the rest are "not finished", which must not be reported as a failure — a Gate that treated in-progress as failed would refuse every crossing that had not already completed by the time it looked.

Initialized is the one that reads wrong at first glance: it means Flagger has set the canary up and no analysis has run. That is not success, and treating it as such would clear a Bundle on the strength of a canary that never ran.

type FlaggerConfig

type FlaggerConfig struct {
	// Name is the Canary object.
	Name string `json:"name"`
	// Namespace defaults to the Gate's.
	Namespace string `json:"namespace,omitempty"`
}

FlaggerConfig selects the Canary to read.

type Result

type Result struct {
	// Verified is true only when the evidence says the crossing worked. It is
	// deliberately not a tri-state: the caller needs one answer, and "still
	// running" is not verified yet.
	Verified bool
	// Done is false while the evidence is still being gathered, which is the
	// difference between "not yet" and "no".
	Done bool
	// Reason is why, in the verifier's own words where it has them.
	Reason string
}

Result is what a verifier concluded.

Jump to

Keyboard shortcuts

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