addons

package
v0.0.0-...-560103a Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// list of all addons
	ArgoWorkflow   = "argo-workflow"
	DockerRegistry = "docker-registry"
	EfsCsiDriver   = "efs-csi-driver"
	IngressNginx   = "ingress-nginx"
)

Functions

This section is empty.

Types

type Addon

type Addon interface {
	// Enable the addon. preInstallHooks should be called, before enabling the addon
	Enable(ctx context.Context, preInstallHooks []PreInstallHookFn, namespace string, app *orchestv1alpha1.ApplicationSpec) error

	// Uninstall the addon
	Uninstall(ctx context.Context, namespace string) error
}

func NewHelmDeployer

func NewHelmDeployer(client kubernetes.Interface,
	name, deployDir string,
	valuesPath string) Addon

func NewPathDeployer

func NewPathDeployer(name, root string, gClient client.Client, scheme *runtime.Scheme) Addon

type AddonManager

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

AddonManager holds the map of deployers

func NewAddonManager

func NewAddonManager(client kubernetes.Interface, config AddonsConfig) *AddonManager

func (*AddonManager) AddAddon

func (m *AddonManager) AddAddon(name string, addon Addon)

add an addon, if not already registred with the manager

func (*AddonManager) EnableAddon

func (m *AddonManager) EnableAddon(ctx context.Context, addonName, namespace string)

Enable an addon

func (*AddonManager) Get

func (m *AddonManager) Get(name string) Addon

get a deployer by the name

func (*AddonManager) Run

func (m *AddonManager) Run(stopCh <-chan struct{})

Run will not return until stopCh is closed. workers determines how many objects will be handled in parallel.

type AddonsConfig

type AddonsConfig struct {

	// The list of addons to enable
	Addons []string

	AssetDir string

	DefaultNamespace string
}

func NewDefaultAddonsConfig

func NewDefaultAddonsConfig() AddonsConfig

type HelmDeployer

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

func (*HelmDeployer) Enable

func (d *HelmDeployer) Enable(ctx context.Context, preInstallHooks []PreInstallHookFn,
	namespace string,
	app *orchestv1alpha1.ApplicationSpec) error

Installs deployer if the config is changed

func (*HelmDeployer) Uninstall

func (d *HelmDeployer) Uninstall(ctx context.Context, namespace string) error

Uninstall the addon

type PathDeployer

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

func (*PathDeployer) Enable

func (d *PathDeployer) Enable(ctx context.Context, preInstall []PreInstallHookFn,
	namespace string, _ *orchestv1alpha1.ApplicationSpec) error

Installs deployer if the config is changed

func (*PathDeployer) Uninstall

func (d *PathDeployer) Uninstall(ctx context.Context, namespace string) error

Uninstall the addon

type PreInstallHookFn

type PreInstallHookFn func(config *orchestv1alpha1.ApplicationSpec) error

Jump to

Keyboard shortcuts

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