Documentation
¶
Overview ¶
Package process is the process seam (D-016, D-029): providers report an install's controller and proxy processes; Kube is the Kubernetes one.
Index ¶
- Constants
- func LookupProxyDeployment(gw objects.Ref, ds []*appsv1.Deployment, sel labels.Selector) (*appsv1.Deployment, bool)
- func PodRef(ns string, p Process) objects.Ref
- func ProxyDeployment(gw objects.Ref, ds []*appsv1.Deployment, sel labels.Selector) *appsv1.Deployment
- func SafeGatewayLabelValue(name string) string
- type Kube
- type ProbeFailures
- type Process
- type Rollout
- type Set
- type Source
- type Termination
Constants ¶
const ProbeReason = "Unhealthy"
ProbeReason is the Event reason of a probe failure.
Variables ¶
This section is empty.
Functions ¶
func LookupProxyDeployment ¶
func LookupProxyDeployment(gw objects.Ref, ds []*appsv1.Deployment, sel labels.Selector) (*appsv1.Deployment, bool)
LookupProxyDeployment is ProxyDeployment that also reports whether several label matches left none.
func PodRef ¶
PodRef is p's Pod in ns (the install's or the Gateway's namespace), which callers check before showing p's name or facts (§14 rule 16).
func ProxyDeployment ¶
func ProxyDeployment(gw objects.Ref, ds []*appsv1.Deployment, sel labels.Selector) *appsv1.Deployment
ProxyDeployment is gw's proxy Deployment among those sel matches: owned by gw, else the only one labelled SafeGatewayLabelValue(gw.Name). A nil sel matches none.
func SafeGatewayLabelValue ¶
SafeGatewayLabelValue is kgateway's gateway-name label value: the name, or past 63 characters its first 50 ("-" trimmed), "-" and 12 hex digits of its SHA-256.
Types ¶
type Kube ¶
type Kube struct{}
Kube is the Kubernetes Source: Pods, Deployments and Event deltas of the snapshot. It never reads a termination message.
func (Kube) Controller ¶
Controller implements Source: the Pods of the install's controller Deployment, as Discover attributed them.
type ProbeFailures ¶
ProbeFailures are the probe failures observed in the last cache.EventWindow (§9.2). Type is the one defined probe type, else "" ("a probe").
type Process ¶
type Process struct {
// ID is stable within the provider; a Pod UID in Kubernetes.
ID string
Name string
Ready *bool
Restarts *int32
// LastStart is when the running container started.
LastStart *time.Time
// Termination is the last termination; never its message.
Termination *Termination
// Waiting is a reason such as CrashLoopBackOff or ImagePullBackOff; empty when running.
Waiting string
// Version is the image tag without a leading "v"; empty when unknown.
Version string
// Probe is nil when the provider has no probe events or counted no failure.
Probe *ProbeFailures
}
Process is one controller replica or proxy. A nil field, or an empty Waiting or Version, means "not observed", which is never a failure.
type Rollout ¶
Rollout is a workload's last rollout: Progressing while one runs, a stuck one's Reason (ProgressDeadlineExceeded), and SettledAt when it finished, if known.
type Set ¶
type Set struct {
Observed bool
// Desired is the desired replica count; nil when not applicable.
Desired *int32
// Rollout is nil when the provider has no rollout notion.
Rollout *Rollout
Processes []Process
}
Set is the processes behind one role. Observed false means "not observed", never "failing" (D-016 R3); Desired and Rollout may still be set.