Documentation ¶
Index ¶
- Constants
- func NewApp(existingApp *v1alpha1.App, pkgInstall *pkgingv1alpha1.PackageInstall, ...) (*v1alpha1.App, error)
- type ComponentInfo
- type Opts
- type PackageInstallCR
- type PackageInstallVersionHandler
- func (ipvh *PackageInstallVersionHandler) Create(_ context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (ipvh *PackageInstallVersionHandler) Delete(_ context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (ipvh *PackageInstallVersionHandler) Generic(_ context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (ipvh *PackageInstallVersionHandler) Update(_ context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type Reconciler
Constants ¶
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" )
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 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
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 (*PackageInstallVersionHandler) Create ¶ added in v0.25.0
func (ipvh *PackageInstallVersionHandler) Create(_ context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create is called in response to an create event
func (*PackageInstallVersionHandler) Delete ¶ added in v0.25.0
func (ipvh *PackageInstallVersionHandler) Delete(_ context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete is called in response to a delete event
func (*PackageInstallVersionHandler) Generic ¶ added in v0.25.0
func (ipvh *PackageInstallVersionHandler) Generic(_ context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface)
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
func (ipvh *PackageInstallVersionHandler) Update(_ context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface)
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.