Documentation
¶
Overview ¶
Package kustomization reconciles Flux Kustomizations: wait on dependsOn / sourceRef / structural parent, resolve postBuild substitutions, run the kustomize SDK, parse the result back into the Store, and publish a KustomizationArtifact. Failures bubble up to the orchestrator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
*base.Controller
// Trees is the per-run in-memory render cache: it captures each source
// root once into an immutable byte snapshot from which every render
// derives a private in-memory filesystem (see kustomize.RenderFlux).
Trees *kustomize.TreeCache
// WipeSecrets controls whether Secret cleartext is wiped when
// parsing rendered manifests.
WipeSecrets bool
// contains filtered or unexported fields
}
Controller orchestrates Kustomization reconciliation. Reconcile- shaping state (Filter, ParentOf) flows in via Configure exactly once before Start. The invariant — "config is read-only after Start" — is encoded in the embedded *base.Controller, not just in code review.
func (*Controller) Configure ¶
func (c *Controller) Configure(opts Options)
Configure installs the post-bootstrap state. Panics if called after Start — encodes the invariant that reconcile-shaping config is read-only once the controller is dispatching.
func (*Controller) ReconcileNode ¶ added in v0.3.4
func (c *Controller) ReconcileNode(ctx context.Context, id manifest.NamedResource, drainLevel int) (blocked []manifest.NamedResource, ready bool)
ReconcileNode runs id's reconcile under the dag engine, returning the blocked dependency set (nil = terminalized) and whether id ended Ready. The orchestrator's scheduler Dispatcher calls this for Kustomization nodes.
func (*Controller) Start ¶
func (c *Controller) Start(_ context.Context)
Start wires lifecycle state. The scheduler owns dispatch (via ReconcileNode) and the orchestrator's dagrun wires its own discovery/wake listeners, so Start registers no dispatch listener of its own.
type Options ¶
type Options struct {
base.Options
// SelfProduces reports whether consumer's OWN render emits cm. When
// it does, collectDeps drops cm from the dependency set — a KS can't
// hard-wait on a postBuild.substituteFrom ConfigMap that only its own
// render produces (the bjw-s/onedr0p self-substitute). Available in
// full mode (graph-aware index), unlike the changed-only producer
// skip. Nil → the edge is always added (pre-index behavior).
SelfProduces func(cm, consumer manifest.NamedResource) bool
}
Options carries the post-bootstrap state the orchestrator wires onto the controller before Start. base.Options holds the config common to every render controller (Filter / ParentOf / RenderTracker / Existence / PreflightFailure); SelfProduces is Kustomization-specific.