Documentation
¶
Overview ¶
Package flux provides utilities for bootstrapping FluxCD in tenant clusters.
Index ¶
- type AddonInfo
- type Bootstrapper
- func (b *Bootstrapper) Bootstrap(ctx context.Context, restConfig *rest.Config, spec *butlerv1alpha1.GitOpsSpec) error
- func (b *Bootstrapper) CommitManifests(ctx context.Context, repoSpec *butlerv1alpha1.GitRepositorySpec, ...) error
- func (b *Bootstrapper) GenerateManifests(installedAddons []AddonInfo) ([]byte, error)
- func (b *Bootstrapper) IsBootstrapped(ctx context.Context, restConfig *rest.Config) (bool, error)
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 ¶
IsBootstrapped checks if Flux is already bootstrapped.