installer

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JobLabelSelector = fmt.Sprintf("installer-job.%s", constants.RepoURI)

JobLabelSelector finds the unique installer job in the cluster.

Functions

This section is empty.

Types

type Installer

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

Installer represents the "helm install" using its APIs, this component deploys the informed dependency on the pre-configured namespace.

func NewInstaller

func NewInstaller(
	logger *slog.Logger,
	f *flags.Flags,
	kube *k8s.Kube,
	dep *resolver.Dependency,
) *Installer

NewInstaller instantiates a new installer for the given dependency.

func (*Installer) Install

func (i *Installer) Install(ctx context.Context) error

Install performs the installation of the Helm chart, including the pre and post hooks execution.

func (*Installer) PrintRawValues

func (i *Installer) PrintRawValues()

PrintRawValues prints the raw values template to the console.

func (*Installer) PrintValues

func (i *Installer) PrintValues()

PrintValues prints the parsed values to the console.

func (*Installer) RenderValues

func (i *Installer) RenderValues() error

RenderValues parses the values template and prepares the Helm chart values.

func (*Installer) SetValues

func (i *Installer) SetValues(
	ctx context.Context,
	cfg *config.Spec,
	valuesTmpl string,
) error

SetValues prepares the values template for the Helm chart installation.

type Job

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

Job represents the asynchronous actor that runs a Job in the cluster to run this installer container image on a pod. The idea is to allow a non-blocking installation process for the MCP server.

func NewJob

func NewJob(kube *k8s.Kube) *Job

NewJob instantiates a new Job object.

func (*Job) GetJobLogFollowCmd

func (j *Job) GetJobLogFollowCmd(namespace string) string

GetJobLogFollowCmd returns the command that follows the deployment job logs.

func (*Job) GetState

func (j *Job) GetState(ctx context.Context) (JobState, error)

GetState retrieves the current state of the installation job.

func (*Job) Run added in v1.8.0

func (j *Job) Run(
	ctx context.Context,
	debug, dryRun, force bool,
	namespace, image string,
) error

Run issues a new installation job, creating the installation job when applicable. It applies the service account and cluster role binding first, then creates the job.

type JobState

type JobState int

JobState represents the state of the installer job in the cluster.

const (
	// NotFound no installer job found in the cluster.
	NotFound JobState = iota
	// Deploying the installer job is running.
	Deploying
	// Failed the installer job has failed.
	Failed
	// Done the installer job has succeeded.
	Done
)

Jump to

Keyboard shortcuts

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