fluxinstaller

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

README

pkg/installer/flux

This package provides a Flux installer implementation for KSail.

Purpose

Implements the Installer interface specifically for installing and managing Flux, a GitOps toolkit for Kubernetes. This installer handles the deployment and removal of Flux components in Kubernetes clusters.

Features

  • Flux Installation: Installs Flux components to Kubernetes clusters
  • Flux Removal: Cleanly uninstalls Flux and its resources
  • GitOps Integration: Enables GitOps workflows for cluster management

Usage

import "github.com/devantler-tech/ksail-go/pkg/installer/flux"

// Create Flux installer
fluxInstaller := flux.NewInstaller(/* configuration */)

// Install Flux
ctx := context.Background()
if err := fluxInstaller.Install(ctx); err != nil {
    log.Fatal("Failed to install Flux:", err)
}

// Uninstall Flux
if err := fluxInstaller.Uninstall(ctx); err != nil {
    log.Fatal("Failed to uninstall Flux:", err)
}

This installer is typically used when setting up GitOps workflows for Kubernetes cluster management with KSail.


⬅️ Go Back

Documentation

Overview

Package fluxinstaller provides an installer for installing flux on a Kubernetes cluster.

This package contains the Flux installer implementation and client interfaces for managing Flux installations on Kubernetes clusters.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnexpectedClientType = errors.New(
	"unexpected client type returned from helm client constructor",
)

ErrUnexpectedClientType is returned when the helm client constructor returns an unexpected type.

Functions

This section is empty.

Types

type FluxInstaller

type FluxInstaller struct {
	// contains filtered or unexported fields
}

FluxInstaller implements the installer.Installer interface for Flux.

func NewFluxInstaller

func NewFluxInstaller(
	client HelmClient,
	kubeconfig, context string,
	timeout time.Duration,
) *FluxInstaller

NewFluxInstaller creates a new Flux installer instance.

func (*FluxInstaller) Install

func (b *FluxInstaller) Install(ctx context.Context) error

Install installs or upgrades the Flux Operator via its OCI Helm chart.

func (*FluxInstaller) Uninstall

func (b *FluxInstaller) Uninstall(_ context.Context) error

Uninstall removes the Helm release for the Flux Operator.

type HelmClient

type HelmClient interface {
	Install(ctx context.Context, spec *helmclient.ChartSpec) error
	Uninstall(name string) error
}

HelmClient defines the subset of Helm operations used by the installer.

Jump to

Keyboard shortcuts

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