Documentation
¶
Index ¶
- Constants
- func GetConflicts(c client.Client, ctx context.Context, portal *corev1alpha1.Portal) ([]string, []string, error)
- 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) DeleteComponentConfigMaps(ctx context.Context, name, namespace string, versions []string, ...) bool
- 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)
- func (r *ComponentReconciler) UpdateValuesConfigmap(ctx context.Context, logger logr.Logger, component *corev1alpha1.Component, ...) (err error)
- type PortalPredicate
- type PortalReconciler
- type RatingReconciler
- func (r *RatingReconciler) CreatePipelineRun(logger logr.Logger, ctx context.Context, instance *corev1alpha1.Rating) error
- func (r *RatingReconciler) DeletePipeline(ctx context.Context, instance *corev1alpha1.Rating) error
- func (r *RatingReconciler) PipelineRunUpdate(logger logr.Logger) func(event.UpdateEvent, workqueue.RateLimitingInterface)
- func (r *RatingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *RatingReconciler) SetupWithManager(mgr ctrl.Manager) error
- type RepositoryReconciler
- type SubscriptionPredicate
- type SubscriptionReconciler
- func (r *SubscriptionReconciler) CreateOrUpdateComponentPlan(ctx context.Context, sub *corev1alpha1.Subscription, ...) (err 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" DiffTimeDuration = time.Minute )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComponentPlanReconciler ¶
type ComponentPlanReconciler struct { client.Client Recorder record.EventRecorder Scheme *runtime.Scheme WorkerPool helm.ReleaseWorkerPool }
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 ChartWork helm.ChartWorker }
ComponentReconciler reconciles a Component object
func (*ComponentReconciler) DeleteComponentConfigMaps ¶ added in v0.1.6
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.
func (*ComponentReconciler) UpdateValuesConfigmap ¶ added in v0.1.6
func (r *ComponentReconciler) UpdateValuesConfigmap(ctx context.Context, logger logr.Logger, component *corev1alpha1.Component, repo *corev1alpha1.Repository) (err error)
type PortalPredicate ¶ added in v0.1.4
func (PortalPredicate) Update ¶ added in v0.1.4
func (p PortalPredicate) Update(ue event.UpdateEvent) bool
type PortalReconciler ¶ added in v0.1.4
PortalReconciler reconciles a Portal object
func (*PortalReconciler) Reconcile ¶ added in v0.1.4
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.14.4/pkg/reconcile
func (*PortalReconciler) SetupWithManager ¶ added in v0.1.4
SetupWithManager sets up the controller with the Manager.
type RatingReconciler ¶ added in v0.1.4
RatingReconciler reconciles a Rating object
func (*RatingReconciler) CreatePipelineRun ¶ added in v0.1.5
func (r *RatingReconciler) CreatePipelineRun(logger logr.Logger, ctx context.Context, instance *corev1alpha1.Rating) error
func (*RatingReconciler) DeletePipeline ¶ added in v0.1.5
func (r *RatingReconciler) DeletePipeline(ctx context.Context, instance *corev1alpha1.Rating) error
Before creating pipelinerun, we shoulde delete all the existing pipelineruns.
func (*RatingReconciler) PipelineRunUpdate ¶ added in v0.1.5
func (r *RatingReconciler) PipelineRunUpdate(logger logr.Logger) func(event.UpdateEvent, workqueue.RateLimitingInterface)
func (*RatingReconciler) Reconcile ¶ added in v0.1.4
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 Rating 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.14.1/pkg/reconcile
func (*RatingReconciler) SetupWithManager ¶ added in v0.1.4
func (r *RatingReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RepositoryReconciler ¶
type RepositoryReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder 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.
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 // Now is a function that returns current time, done to facilitate unit tests Now func() time.Time }
SubscriptionReconciler reconciles a Subscription object
func (*SubscriptionReconciler) CreateOrUpdateComponentPlan ¶ added in v0.1.6
func (r *SubscriptionReconciler) CreateOrUpdateComponentPlan(ctx context.Context, sub *corev1alpha1.Subscription, fetch corev1alpha1.ComponentVersion) (err error)
CreateOrUpdateComponentPlan 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