source

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

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) Start

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

Start registers listeners on the Store. The controller runs until Close is called.

type FetchOptions

type FetchOptions struct {
	Filter              *change.Filter
	AllowMissingSecrets bool
}

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