Help us shape the future of Go! Take the 2026 Go Developer Survey

controllers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InstallEventReason The name of the installation event
	InstallEventReason = "Installation"
	// DeinstallationEventReason The name of the deinstallation event
	DeinstallationEventReason = "Deinstallation"
	// UpgradeEventReason The name of the upgrade event
	UpgradeEventReason = "Upgrade"
	// DowngradeEventReason The name of the downgrade event
	DowngradeEventReason = "Downgrade"
	// Install represents the install-operation
	Install = operation("Install")
	// Upgrade represents the upgrade-operation
	Upgrade = operation("Upgrade")
	// Downgrade represents the downgrade-operation. Currently not supported.
	Downgrade = operation("Downgrade")
	// Delete represents the delete-operation
	Delete = operation("Delete")
	// Ignore represents the ignore-operation
	Ignore = operation("Ignore")
)

Variables

This section is empty.

Functions

func NewComponentDeleteManager

func NewComponentDeleteManager(componentClient ComponentClient, helmClient HelmClient) *componentDeleteManager

NewComponentDeleteManager creates a new instance of componentDeleteManager.

func NewComponentInstallManager

func NewComponentInstallManager(componentClient ecosystem.ComponentInterface, helmClient HelmClient) *componentInstallManager

NewComponentInstallManager creates a new instance of componentInstallManager.

func NewComponentManager

func NewComponentManager(clientset ecosystem.ComponentInterface, helmClient HelmClient, recorder record.EventRecorder) *componentManager

NewComponentManager creates a new instance of componentManager.

func NewComponentReconciler

func NewComponentReconciler(componentClient ecosystem.ComponentInterface, helmClient HelmClient, recorder record.EventRecorder) *componentReconciler

NewComponentReconciler creates a new component reconciler.

func NewComponentUpgradeManager

func NewComponentUpgradeManager(componentClient ComponentClient, helmClient HelmClient) *componentUpgradeManager

NewComponentUpgradeManager creates a new instance of componentUpgradeManager.

Types

type ComponentClient

type ComponentClient interface {
	ecosystem.ComponentInterface
}

ComponentClient embeds the ecosystem.ComponentInterface interface for usage in this package.

type ComponentManager

type ComponentManager interface {
	InstallManager
	DeleteManager
	UpgradeManager
}

ComponentManager abstracts the simple component operations in a k8s CES.

type DeleteManager

type DeleteManager interface {
	// Delete deletes a component resource.
	Delete(ctx context.Context, component *k8sv1.Component) error
}

DeleteManager includes functionality to delete components in the cluster.

type EventRecorder

type EventRecorder interface {
	record.EventRecorder
}

EventRecorder embeds the record.EventRecorder interface for usage in this package.

type HelmClient

type HelmClient interface {
	// InstallOrUpgrade takes a component and applies the corresponding helmChart.
	InstallOrUpgrade(ctx context.Context, component *k8sv1.Component) error
	// Uninstall removes the helmChart of the given component
	Uninstall(component *k8sv1.Component) error
	// ListDeployedReleases returns all deployed helm releases
	ListDeployedReleases() ([]*release.Release, error)
}

HelmClient is an interface for managing components with helm.

type InstallManager

type InstallManager interface {
	// Install installs a component resource.
	Install(ctx context.Context, component *k8sv1.Component) error
}

InstallManager includes functionality to install components in the cluster.

type UpgradeManager

type UpgradeManager interface {
	// Upgrade upgrades a component resource.
	Upgrade(ctx context.Context, component *k8sv1.Component) error
}

UpgradeManager includes functionality to upgrade components in the cluster.

Jump to

Keyboard shortcuts

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