bundle

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBundleManager

func NewBundleManager(log logr.Logger, registryClient RegistryClient, bundleClient Client, targetClient authenticator.TargetClusterClient, config config.Config) *bundleManager

func NewManagerClient added in v0.2.23

func NewManagerClient(client client.Client) *managerClient

func NewRegistryClient added in v0.2.0

func NewRegistryClient(puller artifacts.Puller) (manager *registryClient)

Types

type Client added in v0.1.7

type Client interface {
	// GetActiveBundle retrieves the currently active bundle.
	GetActiveBundle(ctx context.Context, clusterName string) (activeBundle *api.PackageBundle, err error)

	// GetPackageBundleController retrieves clusters package bundle controller
	GetPackageBundleController(ctx context.Context, clusterName string) (controller *api.PackageBundleController, err error)

	// GetBundleList get list of bundles worthy of consideration
	GetBundleList(ctx context.Context) (bundles []api.PackageBundle, err error)

	// GetBundle retrieves the named bundle.
	GetBundle(ctx context.Context, name string) (namedBundle *api.PackageBundle, err error)

	// GetSecret retries the named secret
	GetSecret(ctx context.Context, name string) (secret *v1.Secret, err error)

	// CreateBundle add a new bundle custom resource
	CreateBundle(ctx context.Context, bundle *api.PackageBundle) error

	// CreateClusterConfigMap based on cluster name
	CreateClusterConfigMap(ctx context.Context, clusterName string) error

	// CreatePackage creates a package
	CreatePackage(ctx context.Context, pkg *api.Package) (err error)

	// GetPackageList retrieves the list of packages resources.
	GetPackageList(ctx context.Context, namespace string) (packages api.PackageList, err error)

	// SaveStatus saves a resource status
	SaveStatus(ctx context.Context, object client.Object) error

	// Save saves a resource
	Save(ctx context.Context, object client.Object) error
}

type Manager

type Manager interface {
	// ProcessBundle returns true if there are changes
	ProcessBundle(ctx context.Context, newBundle *api.PackageBundle) (bool, error)

	// ProcessBundleController process the bundle controller
	ProcessBundleController(ctx context.Context, pbc *api.PackageBundleController) error
}

type RegistryClient added in v0.2.0

type RegistryClient interface {
	// LatestBundle pulls the bundle tagged with "latest" from the bundle source.
	LatestBundle(ctx context.Context, baseRef, kubeMajor, kubeMinor, clusterName string) (*api.PackageBundle, error)

	// DownloadBundle downloads the bundle with a given tag.
	DownloadBundle(ctx context.Context, ref, clusterName string) (
		*api.PackageBundle, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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