pkgrepository

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPackageRepoApp

func NewPackageRepoApp(pkgRepository *pkgingv1alpha1.PackageRepository) (*kcv1alpha1.App, error)

Types

type App

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

func NewApp

func NewApp(app v1alpha1.App, hooks Hooks,
	fetchFactory fetch.Factory, templateFactory template.Factory,
	deployFactory deploy.Factory, log logr.Logger) *App

func (App) HasImageOrImgpkgBundle added in v0.24.0

func (a App) HasImageOrImgpkgBundle() bool

HasImageOrImgpkgBundle is used to determine if the App's spec contains a fetch stage for an image or imgpkgbundle. It is mainly used to determine whether to retry a fetch attempt when placeholder secrets are involved with authenticating to private registries. Placeholder secrets are not always populated quick enough for Apps to use the secret, and private auth is only supported for images/bundles, so this helps to narrow down when to retry a fetch attempt.

func (*App) Name

func (a *App) Name() string

func (*App) Namespace

func (a *App) Namespace() string

func (*App) Reconcile

func (a *App) Reconcile(force bool) (reconcile.Result, error)

Reconcile is not expected to be called concurrently

func (*App) SecretRefs

func (a *App) SecretRefs() map[reftracker.RefKey]struct{}

func (*App) Status

func (a *App) Status() v1alpha1.AppStatus

type AppFactory added in v0.25.0

type AppFactory struct {
	CoreClient kubernetes.Interface
	AppClient  kcclient.Interface
	KcConfig   *config.Config
}

AppFactory allows to create "hidden" Apps for reconciling PackageRepositories.

func (*AppFactory) NewCRDPackageRepo added in v0.25.0

func (f *AppFactory) NewCRDPackageRepo(app *kcv1alpha1.App, pkgr *pkgv1alpha1.PackageRepository, log logr.Logger) *CRDApp

NewCRDPackageRepo constructs "hidden" App to reconcile PackageRepository.

type CRDApp

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

func NewCRDApp

func NewCRDApp(appModel *kcv1alpha1.App, packageRepo *pkgingv1alpha1.PackageRepository, log logr.Logger,
	appClient kcclient.Interface, fetchFactory fetch.Factory,
	templateFactory template.Factory, deployFactory deploy.Factory) *CRDApp

func (*CRDApp) Reconcile

func (a *CRDApp) Reconcile(force bool) (reconcile.Result, error)

func (*CRDApp) ResourceRefs

func (a *CRDApp) ResourceRefs() map[reftracker.RefKey]struct{}

type Hooks

type Hooks struct {
	BlockDeletion   func() error
	UnblockDeletion func() error
	UpdateStatus    func(string) error
}

type ReconcileTimer

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

func NewReconcileTimer

func NewReconcileTimer(app v1alpha1.App) ReconcileTimer

func (ReconcileTimer) DurationUntilReady

func (rt ReconcileTimer) DurationUntilReady(err error) time.Duration

func (ReconcileTimer) IsReadyAt

func (rt ReconcileTimer) IsReadyAt(timeAt time.Time) bool

type Reconciler added in v0.25.0

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

Reconciler is responsible for reconciling PackageRepositories.

func NewReconciler added in v0.25.0

func NewReconciler(appClient kcclient.Interface, coreClient kubernetes.Interface,
	log logr.Logger, appFactory AppFactory, appRefTracker *reftracker.AppRefTracker,
	appUpdateStatus *reftracker.AppUpdateStatus) *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 PackageRepository.

func (*Reconciler) Reconcile added in v0.25.0

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

Reconcile ensures that Packages/PackageMetadatas are imported into the cluster from given PackageRepository.

func (*Reconciler) ReconcileFetchPlaceholderSecrets added in v0.25.0

func (r *Reconciler) ReconcileFetchPlaceholderSecrets(pkgr pkgv1alpha1.PackageRepository, app *v1alpha1.App) error

ReconcileFetchPlaceholderSecrets helps determine if a placeholder secret needs to be created for the PackageRepository. This placeholder secret is populated by secretgen-controller so PackageRepositories can authenticate to private registries without needing to explicitly declare a secretRef. If no secretRef is specified for the PackageRepository, the placeholder is created and used by the PackageRepository.

func (*Reconciler) UpdatePackageRepoRefs added in v0.25.0

func (r *Reconciler) UpdatePackageRepoRefs(refKeys map[reftracker.RefKey]struct{}, app *v1alpha1.App)

nolint: revive

Jump to

Keyboard shortcuts

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