controller

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 45 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 controller holds the operator's reconcilers.

Index

Constants

View Source
const (
	// DefaultDebounce batches changes: a GitOps sync of many objects
	// produces one bundle, not one per object.
	DefaultDebounce = time.Second

	// DefaultRotationGrace is the least time each phase of a key rotation
	// lasts: the kubelet updates a mounted ConfigMap within a minute or two.
	DefaultRotationGrace = time.Minute
	// DefaultEngineStale is the distribution Reporter's default Stale.
	DefaultEngineStale = 30 * time.Second
)

Defaults of the builder.

View Source
const (
	// ReasonBundleTooLarge: Accepted is False because the bundle with the
	// policy as it is now doesn't fit its Secrets, so it isn't published.
	ReasonBundleTooLarge = "BundleTooLarge"
	// ReasonSuspended and ReasonNotSuspended: the InkwallConfig's
	// Suspended condition.
	ReasonSuspended    = "Suspended"
	ReasonNotSuspended = "NotSuspended"
)

Reasons the builder reports.

View Source
const (
	ReasonRotationIdle       = "Idle"
	ReasonRotationPublishing = "Publishing"
	ReasonRotationRetiring   = "Retiring"
)

Reasons of the InkwallConfig's SigningKeyRotation condition: the phase.

Variables

View Source
var HTTPRouteGVK = schema.GroupVersionKind{Group: gatewayv1.GroupName, Version: "v1", Kind: "HTTPRoute"}

HTTPRouteGVK is Gateway API's HTTPRoute, whose CRD may be missing.

Functions

func HTTPRoutes added in v0.3.0

func HTTPRoutes(ctx context.Context, c client.Client) ([]gatewayv1.HTTPRoute, error)

HTTPRoutes lists Gateway API's HTTPRoutes; none when their CRD isn't installed.

Types

type BundleReconciler

type BundleReconciler struct {
	Client client.Client
	// APIReader reads uncached, for the current bundle.
	APIReader client.Reader
	// Namespace is the operator's, where the bundle Secrets are.
	Namespace string
	Debounce  time.Duration
	Now       func() time.Time
	// EngineStale is how old a replica's engine report may be (the
	// distribution Reporter's Stale); a new leader waits this long before
	// a key rotation trusts the reports to list every engine. 0:
	// DefaultEngineStale.
	EngineStale time.Duration
	// RotationGrace is the least time each phase of a key rotation lasts;
	// 0: DefaultRotationGrace.
	RotationGrace time.Duration
	// IngressRoutes watches Traefik's IngressRoutes once their CRD is
	// installed; nil: they are only read at each build.
	IngressRoutes *crdwatch.Kind
	// HTTPRoutes watches Gateway API's HTTPRoutes once their CRD is
	// installed; nil: they are only read at each build.
	HTTPRoutes *crdwatch.Kind
	// VirtualServices watches Istio's VirtualServices once their CRD is
	// installed; nil: they are only read at each build.
	VirtualServices *crdwatch.Kind
	// contains filtered or unexported fields
}

BundleReconciler builds the cluster's bundle from its WAF objects and reports each object's Accepted condition. It runs on the leader only.

func (*BundleReconciler) Reconcile

Reconcile rebuilds the bundle.

func (*BundleReconciler) SetupWithManager

func (r *BundleReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the builder with mgr.

Jump to

Keyboard shortcuts

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