flux

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package flux provides utilities for bootstrapping FluxCD in tenant clusters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddonInfo

type AddonInfo struct {
	Name        string
	Version     string
	Namespace   string
	ReleaseName string
	Repository  string
	ChartName   string
	Values      map[string]interface{}
}

AddonInfo describes an installed addon for manifest generation.

type Bootstrapper

type Bootstrapper struct {
}

Bootstrapper handles FluxCD bootstrap for tenant clusters.

The GitOps handoff model: 1. Butler installs addons imperatively (Helm) 2. Butler bootstraps Flux with user's credentials 3. Butler generates HelmRelease/Kustomization manifests representing installed state 4. Butler commits manifests to user's Git repository 5. Flux takes over ongoing management 6. Butler switches to Observe/GitOps mode (no more spec.addons changes)

func NewBootstrapper

func NewBootstrapper() *Bootstrapper

NewBootstrapper creates a new Flux bootstrapper.

func (*Bootstrapper) Bootstrap

func (b *Bootstrapper) Bootstrap(ctx context.Context, restConfig *rest.Config, spec *butlerv1alpha1.GitOpsSpec) error

Bootstrap installs and configures FluxCD.

func (*Bootstrapper) CommitManifests

func (b *Bootstrapper) CommitManifests(ctx context.Context, repoSpec *butlerv1alpha1.GitRepositorySpec, manifests []byte, clusterPath string) error

CommitManifests commits generated manifests to the Git repository.

func (*Bootstrapper) GenerateManifests

func (b *Bootstrapper) GenerateManifests(installedAddons []AddonInfo) ([]byte, error)

GenerateManifests creates GitOps manifests for installed addons.

This converts the imperatively-installed addons into declarative HelmRelease resources that Flux can manage going forward.

func (*Bootstrapper) IsBootstrapped

func (b *Bootstrapper) IsBootstrapped(ctx context.Context, restConfig *rest.Config) (bool, error)

IsBootstrapped checks if Flux is already bootstrapped.

Jump to

Keyboard shortcuts

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