bootstrap

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureRequirements

func EnsureRequirements() error

func NewCmdAgentBootstrap

func NewCmdAgentBootstrap(f cmdutils.Factory, ensureRequirements func() error, af APIFactory, kwf KubectlWrapperFactory, fwf FluxWrapperFactory, cf CmdFactory) *cobra.Command

Types

type API

type API interface {
	GetDefaultBranch() (string, error)
	GetAgentByName(name string) (*gitlab.Agent, error)
	RegisterAgent(name string) (*gitlab.Agent, error)
	ConfigureAgent(agent *gitlab.Agent, branch string) error
	ConfigureEnvironment(agentID int, name string, kubernetesNamespace string, fluxResourcePath string) error
	CreateAgentToken(agentID int) (*gitlab.AgentToken, error)
	SyncFile(f file, branch string) error
	GetKASAddress() (string, error)
}

func NewAPI

func NewAPI(client *gitlab.Client, projectID any) API

type APIFactory

type APIFactory func(*gitlab.Client, any) API

type Cmd

type Cmd interface {
	RunWithOutput(name string, arg ...string) ([]byte, error)
	Run(name string, arg ...string) error
}

func NewCmd

func NewCmd(stdout, stderr io.Writer, env []string) Cmd

type CmdFactory

type CmdFactory func(io.Writer, io.Writer, []string) Cmd

type FluxWrapper

type FluxWrapper interface {
	// contains filtered or unexported methods
}

func NewLocalFluxWrapper

func NewLocalFluxWrapper(
	cmd Cmd,
	binary string,
	manifestPath string,
	helmRepositoryAddress string,
	helmRepositoryName string,
	helmRepositoryNamespace string,
	helmRepositoryFilepath string,
	helmReleaseName string,
	helmReleaseNamespace string,
	helmReleaseFilepath string,
	helmReleaseTargetNamespace string,
	helmReleaseValues []string,
	helmReleaseValuesFrom []string,
	fluxSourceType string,
	fluxSourceNamespace string,
	fluxSourceName string,
) FluxWrapper

type KubectlWrapper

type KubectlWrapper interface {
	// contains filtered or unexported methods
}

func NewLocalKubectlWrapper

func NewLocalKubectlWrapper(cmd Cmd, binary string, gitlabAgentNamespace string, gitlabAgentTokenSecretName string) KubectlWrapper

type KubectlWrapperFactory

type KubectlWrapperFactory func(Cmd, string, string, string) KubectlWrapper

Jump to

Keyboard shortcuts

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