fleet

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fleet answers "is every cluster running the latest version".

One app, one row per cluster, environment demoted to a column. The promotion matrix compares environments side by side; this compares the clusters inside and across them, which is the question a team running prod in three regions asks and the matrix cannot phrase.

Two facts carry the screen: the newest tag among the clusters that answered, and every cluster behind it. Everything else is there so a cluster that did not answer is never mistaken for a cluster without the app.

Index

Constants

View Source
const (
	StatePresent     = "present"
	StateAbsent      = "absent"
	StateDenied      = "denied"
	StateUnreachable = "unreachable"
	StatePending     = "pending"
)

Placement states.

Variables

This section is empty.

Functions

This section is empty.

Types

type Placement

type Placement struct {
	Context   string `json:"context"`
	ClusterID string `json:"clusterId"`
	Env       string `json:"env"`
	// EnvColor and EnvRisk carry the classification the resolved name cannot.
	// environments.Classify matches by keyword token and returns the name it
	// was handed, so "prod-us-east" and "production" are red without spelling
	// any tier a reader could compare against. Shipping the decision instead of
	// the name keeps that rule in one language: a UI re-deriving it from the
	// string disagrees with this binary the first time a keyword is added.
	EnvColor  string `json:"envColor,omitempty"`
	EnvRisk   string `json:"envRisk,omitempty"`
	Namespace string `json:"namespace,omitempty"`

	State string `json:"state"`
	// Reason explains what the state cannot: why a cluster went unreachable or
	// denied, and on a present row, anything the caller had to choose between
	// to produce it.
	Reason string `json:"reason,omitempty"`

	Image  string `json:"image,omitempty"`
	Tag    string `json:"tag,omitempty"`
	Digest string `json:"digest,omitempty"`
	// DigestPending marks a placement whose digest has not arrived. 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"`
	// Aliases names other kubeconfig contexts pointing at this same cluster,
	// so a merged row says what it merged.
	Aliases []string `json:"aliases,omitempty"`
}

Placement is one app as it exists in one cluster.

type Row

type Row struct {
	Placement
	Behind bool `json:"behind,omitempty"`
	// MutableTag marks a cluster whose tag another cluster also runs under a
	// different digest. It is not restricted to the newest tag: an older tag
	// resolving to two digests is the same defect.
	MutableTag bool   `json:"mutableTag,omitempty"`
	Note       string `json:"note,omitempty"`
}

Row is one cluster, judged against the newest version.

type View

type View struct {
	App       string `json:"app"`
	Namespace string `json:"namespace"`
	Rows      []Row  `json:"rows"`

	Newest   string `json:"newest,omitempty"`
	Clusters int    `json:"clusters"`
	Present  int    `json:"present"`
	Behind   int    `json:"behind"`
	// MutableTag is true when one tag resolved to more than one digest. It
	// outranks being behind: a cluster openly on an older version is a
	// schedule, two clusters claiming one version while running different
	// code is a defect.
	MutableTag bool `json:"mutableTag,omitempty"`
	// DigestUnverified counts present rows whose digest never arrived. A
	// mutable tag cannot be ruled out from a cluster whose image nobody
	// resolved, so a headline reporting agreement can say how much of that
	// agreement rests on digests still in flight.
	DigestUnverified int `json:"digestUnverified,omitempty"`
}

View is the whole screen.

func Build

func Build(app, namespace string, ps []Placement) View

Build derives the screen from one placement per context.

Jump to

Keyboard shortcuts

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