addon

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrDepNotInstalled = "required dependency is not installed"
	ErrDepPending      = "required dependency is in pending state"
)

Variables

This section is empty.

Functions

func NewAddonValidator

func NewAddonValidator(addon *addonmgrv1alpha1.Addon, cache VersionCacheClient, dynClient dynamic.Interface) common.Validator

NewAddonValidator returns an object implementing common.Validator

Types

type AddonUpdater added in v0.7.0

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

func NewAddonUpdater added in v0.7.0

func NewAddonUpdater(recorder record.EventRecorder, cli client.Client, versionCache VersionCacheClient, logger logr.Logger) *AddonUpdater

func (*AddonUpdater) RemoveFromCache added in v0.7.0

func (c *AddonUpdater) RemoveFromCache(addonName string)

func (*AddonUpdater) UpdateAddonStatusLifecycleFromWorkflow added in v0.7.0

func (c *AddonUpdater) UpdateAddonStatusLifecycleFromWorkflow(ctx context.Context, namespace, addonName string, wf *wfv1.Workflow) error

UpdateAddonStatusLifecycleFromWorkflow updates the status of the addon

func (*AddonUpdater) UpdateStatus added in v0.7.0

func (c *AddonUpdater) UpdateStatus(ctx context.Context, log logr.Logger, addon *addonmgrv1alpha1.Addon) error

type Version

type Version struct {
	Name      string
	Namespace string
	addonmgrv1alpha1.PackageSpec
	PkgPhase addonmgrv1alpha1.ApplicationAssemblyPhase
}

Version data that will be cached

type VersionCacheClient

type VersionCacheClient interface {
	AddVersion(Version)
	GetVersions(pkgName string) map[string]Version
	GetVersion(pkgName, pkgVersion string) *Version
	HasVersionName(name string) (bool, *Version)
	RemoveVersion(pkgName, pkgVersion string)
	RemoveVersions(pkgName string)
	GetAllVersions() map[string]map[string]Version
}

VersionCacheClient interface clients must implement for addon version cache.

func NewAddonVersionCacheClient

func NewAddonVersionCacheClient() VersionCacheClient

NewAddonVersionCacheClient returns a new instance of VersionCacheClient

Jump to

Keyboard shortcuts

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