rollout

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 22 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 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

View Source
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.

View Source
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

func (*Rollout) NeedLeaderElection() bool

NeedLeaderElection implements LeaderElectionRunnable.

func (*Rollout) Start

func (r *Rollout) Start(ctx context.Context) error

Start implements manager.Runnable.

Jump to

Keyboard shortcuts

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