Documentation
¶
Overview ¶
Package controller holds the operator's reconcilers.
Index ¶
Constants ¶
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.
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.
const ( ReasonRotationIdle = "Idle" ReasonRotationPublishing = "Publishing" ReasonRotationRetiring = "Retiring" )
Reasons of the InkwallConfig's SigningKeyRotation condition: the phase.
Variables ¶
var HTTPRouteGVK = schema.GroupVersionKind{Group: gatewayv1.GroupName, Version: "v1", Kind: "HTTPRoute"}
HTTPRouteGVK is Gateway API's HTTPRoute, whose CRD may be missing.
Functions ¶
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 ¶
func (r *BundleReconciler) Reconcile(ctx context.Context, _ reconcile.Request) (reconcile.Result, error)
Reconcile rebuilds the bundle.
func (*BundleReconciler) SetupWithManager ¶
func (r *BundleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the builder with mgr.