Documentation
¶
Overview ¶
Package promotion answers "is the fix in prod yet".
One row per app, one column per environment, sorted so the apps whose environments disagree float to the top. The matrix compares and never promotes: no control here mutates anything, because deploying belongs to the pipeline that owns it.
Two distinctions carry most of the value. Ahead is worse than behind: behind is a schedule, ahead is an out-of-band change. And absent is not forbidden: "it is not deployed there" and "I cannot see it" are different facts, and a matrix that renders them the same way is a matrix that lies during an incident.
Index ¶
Constants ¶
const ( StateSame = "same" StateBehind = "behind" StateAhead = "ahead" StateDiffers = "differs" StateDigestDiffers = "digest-differs" StateAbsent = "absent" StateDenied = "denied" )
Cell states.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cell ¶
type Cell struct {
Env string `json:"env"`
Namespace string `json:"namespace,omitempty"`
State string `json:"state"`
Tag string `json:"tag,omitempty"`
Image string `json:"image,omitempty"`
Digest string `json:"digest,omitempty"`
// DigestPending marks a cell whose digest has not arrived. Tag comparison
// never waits for it, and a missing digest never reads as a match.
DigestPending bool `json:"digestPending,omitempty"`
Health string `json:"health,omitempty"`
Ready string `json:"ready,omitempty"`
RevisionAt string `json:"revisionAt,omitempty"`
Note string `json:"note,omitempty"`
// Severe marks the states that deserve the error hue rather than a warning:
// ahead of upstream, and a tag that resolves to a different digest.
Severe bool `json:"severe,omitempty"`
}
Cell is one instance, compared against its upstream.
type Env ¶
type Env struct {
Name string `json:"name"`
Risk string `json:"risk"`
Context string `json:"context,omitempty"`
}
Env is one column.
type Instance ¶
type Instance struct {
Env string
App string
Namespace string
Present bool
// Denied marks an environment that could not be read. It is deliberately
// not the same as absent.
Denied bool
DeniedReason string
Image string
Tag string
Digest string
Health string
Ready string
RevisionAt string
}
Instance is one app as it exists in one environment.