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 ¶
const VerifierFlagger = "flagger"
VerifierFlagger is the name used in `verify[].uses`.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flagger ¶
Flagger reads a Canary's verdict.
func (*Flagger) Verify ¶
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.