Documentation
¶
Overview ¶
Package controllers contains App and Framework reconcilers to be used with controller-runtime.
Index ¶
Constants ¶
View Source
const ( DeploymentProgressing = "Progressing" DefaultPodRunningTimeout = 10 * time.Minute )
View Source
const (
KetchNamespace = "ketch-system"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppReconciler ¶
type AppReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme TemplateReader templates.Reader HelmFactoryFn helmFactoryFn Now timeNowFn Recorder record.EventRecorder // Group stands for k8s group of Ketch App CRD. Group string Config *rest.Config // CancelMap tracks cancelFunc functions for goroutines AppReconciler starts to watch deployment events. CancelMap *CancelMap }
AppReconciler reconciles a App object.
func (*AppReconciler) SetupWithManager ¶
func (r *AppReconciler) SetupWithManager(mgr ctrl.Manager) error
type CancelMap ¶ added in v0.6.2
CancelMap helps AppReconciler tracking goroutines. There are two use cases:
- AppReconciler starts a goroutine and forgets about it never trying to cancel it. cleanupFunc is responsible for calling cancel() and removing all resources associated with it.
- AppReconciler starts a new goroutine and cancels the previous one. cleanupFunc of the previous goroutine must not do any cleanup.
func NewCancelMap ¶ added in v0.6.2
func NewCancelMap() *CancelMap
type FrameworkReconciler ¶
FrameworkReconciler reconciles a Framework object.
func (*FrameworkReconciler) SetupWithManager ¶
func (r *FrameworkReconciler) SetupWithManager(mgr ctrl.Manager) error
type Helm ¶
type Helm interface { UpdateChart(tv chart.TemplateValuer, config chart.ChartConfig, opts ...chart.InstallOption) (*release.Release, error) DeleteChart(appName string) error }
Helm has methods to update/delete helm charts.
type JobReconcileReason ¶
type JobReconcileReason struct {
JobName string
}
JobReconcileReason contains information about job reconcile
func (*JobReconcileReason) String ¶
func (r *JobReconcileReason) String() string
String is a Stringer interface implementation
type JobReconciler ¶
type JobReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme HelmFactoryFn helmFactoryFn Recorder record.EventRecorder TemplateReader templates.Reader }
JobReconciler reconciles a Job object
func (*JobReconciler) Reconcile ¶
Reconcile fetches a Job by name and updates helm charts with differences
func (*JobReconciler) SetupWithManager ¶
func (r *JobReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.