source

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: AGPL-3.0 Imports: 10 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 source reconciles Flux source CRs (GitRepository, OCIRepository, Bucket, ExternalArtifact, HelmRepository) into on-disk artifacts via per-kind Fetcher implementations from pkg/source, then publishes the result to the Store. Mirrors pkg/controllers/{kustomization,helmrelease}.

The controller does not know about individual source kinds — it dispatches via the Fetchers map keyed by id.Kind, so adding a new kind is a one-line registration at orchestrator-construction time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	*base.Controller

	// Fetchers maps source CR kind → Fetcher implementation. Source
	// kinds with no entry are ignored, which is also how a flate caller
	// disables a kind (omitting it from the map, e.g. via
	// Orchestrator.WithFetcher(kind, nil)). Exposed for Orchestrator.WithFetcher.
	Fetchers map[string]src.Fetcher
	// contains filtered or unexported fields
}

Controller watches the Store for source-kind objects, fetches each into an on-disk artifact via the matching Fetcher, and updates the Store with the result.

func New

func New(s *store.Store, t *task.Service) *Controller

New constructs a source controller. Register fetchers on the returned struct's Fetchers map before Start.

func (*Controller) Configure

func (c *Controller) Configure(opts FetchOptions)

Configure installs the post-bootstrap state. Panics if called after Start.

func (*Controller) HasFetcher added in v0.3.4

func (c *Controller) HasFetcher(kind string) bool

HasFetcher reports whether a fetcher is registered for kind — the dag Dispatcher uses it to route source-kind nodes to ReconcileNode.

func (*Controller) ReconcileNode added in v0.3.4

func (c *Controller) ReconcileNode(ctx context.Context, id manifest.NamedResource, drainLevel int) []manifest.NamedResource

ReconcileNode runs id's source fetch under the dag engine, returning the blocked dependency set (always nil — sources have no depwait gates) and whether id ended Ready. The orchestrator's scheduler Dispatcher calls this for source-kind nodes.

func (*Controller) Start

func (c *Controller) Start(_ context.Context)

Start registers listeners on the Store. The controller runs until Close is called. The scheduler owns dispatch (via ReconcileNode), so Start only wires lifecycle state — no dispatch listener.

type FetchOptions

type FetchOptions struct {
	Filter              *change.Filter
	AllowMissingSecrets bool
	// Producers is the orchestrator-owned producer index (ExternalSecret /
	// SealedSecret target → producer), shared with the HR controller. A
	// missing auth Secret with a declared producer is skipped even without
	// AllowMissingSecrets. Nil is OK — no producer is ever known.
	Producers *manifest.ProducerIndex
}

FetchOptions carries the post-bootstrap state the orchestrator wires onto the controller. Filter narrows fetches to sources referenced by changed resources in changed-only mode.

Jump to

Keyboard shortcuts

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