packageinstall

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManuallyControlledAnnKey = "ext.packaging.carvel.dev/manually-controlled"

	HelmTemplateOverlayNameKey      = "ext.packaging.carvel.dev/helm-template-name"
	HelmTemplateOverlayNameSpaceKey = "ext.packaging.carvel.dev/helm-template-namespace"

	// Resulting secret names are sorted deterministically by suffix
	ExtYttPathsFromSecretNameAnnKey  = "ext.packaging.carvel.dev/ytt-paths-from-secret-name"
	ExtHelmPathsFromSecretNameAnnKey = "ext.packaging.carvel.dev/helm-template-values-from-secret-name"

	ExtYttDataValuesOverlaysAnnKey = "ext.packaging.carvel.dev/ytt-data-values-overlays"

	ExtFetchSecretNameAnnKeyFmt = "ext.packaging.carvel.dev/fetch-%d-secret-name"
)
View Source
const (
	// DowngradableAnnKey specifies annotation that user can place on
	// PackageInstall to indicate that lower version of the package
	// can be selected vs whats currently installed.
	DowngradableAnnKey = "packaging.carvel.dev/downgradable"
)

Variables

This section is empty.

Functions

func NewApp

func NewApp(existingApp *v1alpha1.App, pkgInstall *pkgingv1alpha1.PackageInstall, pkgVersion datapkgingv1alpha1.Package, opts Opts) (*v1alpha1.App, error)

NewApp creates a new instance of v1alpha1.App based on the provided parameters. It takes an existingApp, pkgInstall, pkgVersion, and opts, and returns the newly created App.

Types

type ComponentInfo added in v0.41.0

type ComponentInfo interface {
	KappControllerVersion() (semver.Version, error)
	KubernetesVersion(serviceAccountName string, specCluster *v1alpha1.AppCluster, objMeta *metav1.ObjectMeta) (semver.Version, error)
}

ComponentInfo provides information about components of the system required by a PKGI

type Opts added in v0.47.0

type Opts struct {
	DefaultSyncPeriod time.Duration
}

nolint: revive

type PackageInstallCR

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

nolint: revive

func NewPackageInstallCR

func NewPackageInstallCR(model *pkgingv1alpha1.PackageInstall, log logr.Logger,
	kcclient kcclient.Interface, pkgclient pkgclient.Interface, coreClient kubernetes.Interface, compInfo ComponentInfo, opts Opts) *PackageInstallCR

func (*PackageInstallCR) Reconcile

func (pi *PackageInstallCR) Reconcile() (reconcile.Result, error)

type PackageInstallVersionHandler added in v0.25.0

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

TODO For this PoC, we are simply going to add all packages to the workqueue, but in the future, we will only enqueue the packages that are eligible for upgrade based on the new packages

func NewPackageInstallVersionHandler added in v0.25.0

func NewPackageInstallVersionHandler(c kcclient.Interface, globalNS string, log logr.Logger) *PackageInstallVersionHandler

func (*PackageInstallVersionHandler) Create added in v0.25.0

func (*PackageInstallVersionHandler) Delete added in v0.25.0

func (*PackageInstallVersionHandler) Generic added in v0.25.0

func (*PackageInstallVersionHandler) Update added in v0.25.0

type Reconciler added in v0.25.0

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

Reconciler is responsible for reconciling PackageInstalls.

func NewReconciler added in v0.25.0

func NewReconciler(kcClient kcclient.Interface, pkgClient pkgclient.Interface,
	coreClient kubernetes.Interface, pkgToPkgInstallHandler *PackageInstallVersionHandler,
	log logr.Logger, compInfo ComponentInfo, kcConfig *kcconfig.Config) *Reconciler

NewReconciler is the constructor for the Reconciler struct

func (*Reconciler) AttachWatches added in v0.25.0

func (r *Reconciler) AttachWatches(controller controller.Controller) error

AttachWatches configures watches needed for reconciler to reconcile PackageInstalls.

func (*Reconciler) Reconcile added in v0.25.0

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile ensures associated App is created per PackageInstall.

Jump to

Keyboard shortcuts

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