Documentation
¶
Index ¶
- Constants
- type ComponentPlanReconciler
- func (r *ComponentPlanReconciler) GenerateManifestConfigMap(plan *corev1alpha1.ComponentPlan, manifest *corev1.ConfigMap, data string) (err error)
- func (r *ComponentPlanReconciler) PatchCondition(ctx context.Context, plan *corev1alpha1.ComponentPlan, logger logr.Logger, ...) (err error)
- func (r *ComponentPlanReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ComponentPlanReconciler) SetupWithManager(mgr ctrl.Manager) error
- type ComponentReconciler
- func (r *ComponentReconciler) OnComponentCreate(event event.CreateEvent) bool
- func (r *ComponentReconciler) OnComponentDel(event event.DeleteEvent) bool
- func (r *ComponentReconciler) OnComponentUpdate(event event.UpdateEvent) bool
- func (r *ComponentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ComponentReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ComponentReconciler) UpdateComponent(ctx context.Context, logger logr.Logger, instance *corev1alpha1.Component) (bool, error)
- type RepositoryReconciler
- func (r *RepositoryReconciler) OnRepositryUpdate(u event.UpdateEvent) bool
- func (r *RepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *RepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *RepositoryReconciler) UpdateRepository(ctx context.Context, logger logr.Logger, instance *corev1alpha1.Repository) (bool, error)
- type SubscriptionPredicate
- type SubscriptionReconciler
- func (r *SubscriptionReconciler) CreateComponentPlan(ctx context.Context, sub *corev1alpha1.Subscription, ...) error
- func (r *SubscriptionReconciler) GetReqs(ctx context.Context, o client.Object, watchComponent bool) (reqs []reconcile.Request)
- func (r *SubscriptionReconciler) PatchCondition(ctx context.Context, sub *corev1alpha1.Subscription, ...) (err error)
- func (r *SubscriptionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *SubscriptionReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- func (r *SubscriptionReconciler) UpdateStatusInstalled(ctx context.Context, logger logr.Logger, sub *corev1alpha1.Subscription, ...) (err error)
- func (r *SubscriptionReconciler) UpdateStatusRepositoryHealth(ctx context.Context, logger logr.Logger, sub *corev1alpha1.Subscription) (err error)
Constants ¶
const ( ComponentIndexKey = "metadata.component" RepositoryIndexKey = "metadata.repository" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentPlanReconciler ¶
type ComponentPlanReconciler struct {
client.Client
Recorder record.EventRecorder
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
ComponentPlanReconciler reconciles a ComponentPlan object
func (*ComponentPlanReconciler) GenerateManifestConfigMap ¶
func (r *ComponentPlanReconciler) GenerateManifestConfigMap(plan *corev1alpha1.ComponentPlan, manifest *corev1.ConfigMap, data string) (err error)
func (*ComponentPlanReconciler) PatchCondition ¶
func (r *ComponentPlanReconciler) PatchCondition(ctx context.Context, plan *corev1alpha1.ComponentPlan, logger logr.Logger, revision int, isDone, isFailed bool, condition ...corev1alpha1.Condition) (err error)
PatchCondition patch subscription status condition
func (*ComponentPlanReconciler) Reconcile ¶
func (r *ComponentPlanReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*ComponentPlanReconciler) SetupWithManager ¶
func (r *ComponentPlanReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ComponentReconciler ¶
type ComponentReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
}
ComponentReconciler reconciles a Component object
func (*ComponentReconciler) OnComponentCreate ¶ added in v0.1.2
func (r *ComponentReconciler) OnComponentCreate(event event.CreateEvent) bool
func (*ComponentReconciler) OnComponentDel ¶ added in v0.1.2
func (r *ComponentReconciler) OnComponentDel(event event.DeleteEvent) bool
func (*ComponentReconciler) OnComponentUpdate ¶
func (r *ComponentReconciler) OnComponentUpdate(event event.UpdateEvent) bool
OnComponentUpdate checks if a reconcile process is needed when updating. Default true.
func (*ComponentReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*ComponentReconciler) SetupWithManager ¶
func (r *ComponentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ComponentReconciler) UpdateComponent ¶
func (r *ComponentReconciler) UpdateComponent(ctx context.Context, logger logr.Logger, instance *corev1alpha1.Component) (bool, error)
UpdateComponent updates new component, add finalizer if necessary.
type RepositoryReconciler ¶
type RepositoryReconciler struct {
client.Client
Scheme *runtime.Scheme
C map[string]repository.IWatcher
}
RepositoryReconciler reconciles a Repository object
func (*RepositoryReconciler) OnRepositryUpdate ¶
func (r *RepositoryReconciler) OnRepositryUpdate(u event.UpdateEvent) bool
func (*RepositoryReconciler) Reconcile ¶
func (r *RepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Repository object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*RepositoryReconciler) SetupWithManager ¶
func (r *RepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*RepositoryReconciler) UpdateRepository ¶
func (r *RepositoryReconciler) UpdateRepository(ctx context.Context, logger logr.Logger, instance *corev1alpha1.Repository) (bool, error)
type SubscriptionPredicate ¶
func (SubscriptionPredicate) Delete ¶
func (p SubscriptionPredicate) Delete(e event.DeleteEvent) bool
func (SubscriptionPredicate) Update ¶
func (p SubscriptionPredicate) Update(e event.UpdateEvent) bool
type SubscriptionReconciler ¶
type SubscriptionReconciler struct {
client.Client
Recorder record.EventRecorder
Scheme *runtime.Scheme
}
SubscriptionReconciler reconciles a Subscription object
func (*SubscriptionReconciler) CreateComponentPlan ¶
func (r *SubscriptionReconciler) CreateComponentPlan(ctx context.Context, sub *corev1alpha1.Subscription, fetch corev1alpha1.ComponentVersion) error
CreateComponentPlan create component plan if not exists or update component plan if exists
func (*SubscriptionReconciler) GetReqs ¶
func (r *SubscriptionReconciler) GetReqs(ctx context.Context, o client.Object, watchComponent bool) (reqs []reconcile.Request)
GetReqs get subscription reqs
func (*SubscriptionReconciler) PatchCondition ¶
func (r *SubscriptionReconciler) PatchCondition(ctx context.Context, sub *corev1alpha1.Subscription, condition corev1alpha1.Condition) (err error)
PatchCondition patch subscription status condition
func (*SubscriptionReconciler) Reconcile ¶
func (r *SubscriptionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*SubscriptionReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
func (*SubscriptionReconciler) UpdateStatusInstalled ¶
func (r *SubscriptionReconciler) UpdateStatusInstalled(ctx context.Context, logger logr.Logger, sub *corev1alpha1.Subscription, fetch corev1alpha1.ComponentVersion) (err error)
UpdateStatusInstalled update subscription status installed
func (*SubscriptionReconciler) UpdateStatusRepositoryHealth ¶
func (r *SubscriptionReconciler) UpdateStatusRepositoryHealth(ctx context.Context, logger logr.Logger, sub *corev1alpha1.Subscription) (err error)
UpdateStatusRepositoryHealth get repository CR, check if the repository is healthy and updates subscription status.RepositoryHealth