Documentation
¶
Overview ¶
Package rollout replaces proxy pods that need a new engine, when the InkwallConfig asks for it (spec.engine.rollout: Automatic, #376): pods the Pod webhook would inject that run without the engine (started before Inkwall) or with an injected engine of another image than the one configured (an engine in the pod's own spec is the user's). It evicts them one at a time through the Eviction API, which respects PodDisruptionBudgets, and evicts the next only once the last one's workload has all its pods ready, each with the configured engine running the current bundle. It runs on the leader.
Index ¶
Constants ¶
const ( // ReasonRollingOut: a pod was evicted; its replacement is awaited. ReasonRollingOut = "RollingOut" // ReasonDone: no proxy pod needs a new engine. ReasonDone = "Done" // ReasonPaused: an eviction was refused, or a replacement isn't ready // in time; the message says which. ReasonPaused = "Paused" )
Reasons of the InkwallConfig's EngineRollout condition.
const ( DefaultInterval = 10 * time.Second DefaultReadyTimeout = 5 * time.Minute )
Defaults.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rollout ¶
type Rollout struct {
// Client reads the InkwallConfig and the proxy pods (cached) and
// writes the InkwallConfig's status.
Client client.Client
// Reader reads the engine reports and the bundle Secret, uncached.
Reader client.Reader
Namespace string
// Sidecar is the engine as injected; the InkwallConfig's
// spec.engine.image overrides its image.
Sidecar injection.Sidecar
// Pods select the proxy pods; Integrations are those whose pods the
// Pod webhook injects (the others roll their pods themselves), and
// Disabled those the operator may not wire.
Pods *integrations.Selectors
Integrations []string
Disabled map[string]string
// Evict evicts a pod; nil: the Eviction API through Client.
Evict func(context.Context, *corev1.Pod) error
// Interval between steps, ReadyTimeout for a replacement, EngineStale
// for the engine reports; 0: the defaults.
Interval, ReadyTimeout, EngineStale time.Duration
// Now is the clock; nil: time.Now.
Now func() time.Time
// contains filtered or unexported fields
}
Rollout evicts proxy pods that need a new engine.
func (*Rollout) NeedLeaderElection ¶
NeedLeaderElection implements LeaderElectionRunnable.