Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModuleInstanceReconciler ¶
type ModuleInstanceReconciler struct {
client.Client
// APIReader is an uncached reader (manager.GetAPIReader()) used for one-off
// reads that must not provision a cache informer.
APIReader client.Reader
Scheme *runtime.Scheme
RestConfig *rest.Config
ResourceManager *fluxssa.ResourceManager
EventRecorder events.EventRecorder
Renderer render.ModuleRenderer
// DefaultServiceAccount is the fallback SA name used when a
// ModuleInstance has an empty spec.serviceAccountName. Resolved in the
// instance's own namespace. Empty disables the default.
DefaultServiceAccount string
// Kernel is the shared, long-lived library Kernel constructed once at
// manager startup. It is the injection seam later enhancement-0001 slices
// consume to drive the render path; this slice wires it but does not read
// it on any reconcile path.
Kernel *kernel.Kernel
}
ModuleInstanceReconciler reconciles a ModuleInstance object. Dependencies are injected via struct fields at manager setup time.
Was: ModuleReleaseReconciler
func (*ModuleInstanceReconciler) Reconcile ¶
func (r *ModuleInstanceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile runs the full ModuleInstance reconcile loop: CUE module synthesis and resolution from OCI registry, rendering, SSA apply, optional prune, and status commit.
func (*ModuleInstanceReconciler) SetupWithManager ¶
func (r *ModuleInstanceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Watches:
- ModuleInstance CRs (primary, generation-change predicate)
- Platform (cluster singleton) — every change re-enqueues all ModuleInstances via mapPlatformToModuleInstances so releases blocked on PlatformNotReady recover promptly when the platform materializes. The generation predicate lives on For() (not as a global event filter) so it does not suppress the Platform watch, whose trigger (materialization) is a status update that does not bump generation.
type ModulePackageReconciler ¶
type ModulePackageReconciler struct {
client.Client
// APIReader is an uncached reader (manager.GetAPIReader()) used for one-off
// reads that must not provision a cache informer.
APIReader client.Reader
Scheme *runtime.Scheme
RestConfig *rest.Config
ResourceManager *fluxssa.ResourceManager
EventRecorder events.EventRecorder
// Fetcher downloads Flux source artifacts. Injected for testability.
Fetcher opmsource.Fetcher
// Renderer loads and renders the CUE package from the extracted
// artifact directory. Injected for testability.
Renderer render.PackageRenderer
// DefaultServiceAccount is the fallback SA name used when a ModulePackage has
// an empty spec.serviceAccountName. Resolved in the ModulePackage's own
// namespace. Empty disables the default.
DefaultServiceAccount string
// Kernel is the shared, long-lived library Kernel constructed once at
// manager startup. It is the injection seam later enhancement-0001 slices
// consume to drive the render path; this slice wires it but does not read
// it on any reconcile path.
Kernel *kernel.Kernel
}
Was: ReleaseReconciler ModulePackageReconciler reconciles a ModulePackage object.
func (*ModulePackageReconciler) Reconcile ¶
func (r *ModulePackageReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile runs the full ModulePackage reconcile loop: source resolution, artifact fetch, path navigation, CUE load, kind detection, render, apply, prune, and status commit.
func (*ModulePackageReconciler) SetupWithManager ¶
func (r *ModulePackageReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the controller into mgr. Watches:
- ModulePackage CRs (primary, generation-change predicate)
- OCIRepository, GitRepository, Bucket (artifact-change predicate, mapped to referencing ModulePackages) — only when those Flux source CRDs are installed; see fluxSourceCRDsInstalled.
- Platform (cluster singleton) — every change re-enqueues all ModulePackages via mapPlatformToModulePackages so packages blocked on PlatformNotReady recover promptly when the platform materializes. The generation predicate lives on For() (not as a global filter) so it does not suppress the Platform watch, whose trigger (materialization) is a status update that does not bump generation.
type PlatformReconciler ¶ added in v0.7.0
type PlatformReconciler struct {
client.Client
Scheme *runtime.Scheme
EventRecorder events.EventRecorder
// Kernel is the shared, long-lived library Kernel constructed once at
// manager startup. SynthesizePlatform and Materialize run on it.
Kernel *kernel.Kernel
// Store holds the current materialized platform. Written here, read by
// the render path in a later slice.
Store *platformstore.Store
}
PlatformReconciler reconciles the singleton Platform CR into a materialized platform held in a process-local, generation-keyed store. On reconcile it maps the spec to a synth.PlatformInput, runs SynthesizePlatform then Materialize, holds the result, and surfaces the outcome on the CR's Ready condition. Nothing yet reads the store; the CR's status is the observable contract this slice delivers.
func (*PlatformReconciler) Reconcile ¶ added in v0.7.0
Reconcile materializes the cluster-singleton Platform and records the outcome on its status. It reconciles only the object named "cluster"; any other name is ignored without error. On delete it clears the store slot (workloads are untouched — §8.4 freeze-don't-teardown).
func (*PlatformReconciler) SetupWithManager ¶ added in v0.7.0
func (r *PlatformReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the controller into mgr, watching the Platform singleton with a generation-change predicate.