packageinstall

package
v0.51.0 Latest Latest
Warning

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

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

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, pkgMetrics *metrics.Metrics) *PackageInstallCR

func (*PackageInstallCR) Kind added in v0.50.0

func (pi *PackageInstallCR) Kind() string

Kind return kind of pkg install

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

Create is called in response to an create event

func (*PackageInstallVersionHandler) Delete added in v0.25.0

Delete is called in response to a delete event

func (*PackageInstallVersionHandler) Generic added in v0.25.0

Generic is called in response to an event of an unknown type or a synthetic event triggered as a cron or external trigger request - e.g. reconcile Autoscaling, or a Webhook.

func (*PackageInstallVersionHandler) Update added in v0.25.0

Update is called in response to an update event

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, pkgMetrics *metrics.Metrics) *Reconciler

NewReconciler is the constructor for the Reconciler struct

func (*Reconciler) AttachWatches added in v0.25.0

func (r *Reconciler) AttachWatches(controller controller.Controller, mgr manager.Manager) 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