core

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 21 Imported by: 6

Documentation

Index

Constants

View Source
const SkipReconcileAnnotation = "controller-util.dominodatalab.com/skip-reconcile"

Variables

This section is empty.

Functions

func FindStatusCondition

func FindStatusCondition(conditions []metav1.Condition, conditionType string) *metav1.Condition

func NewConditionHelper

func NewConditionHelper(obj client.Object) *conditionHelper

func SetStatusCondition

func SetStatusCondition(conditions *[]metav1.Condition, newCondition metav1.Condition)

Types

type Component

type Component interface {
	Reconcile(*Context) (ctrl.Result, error)
}

type ConditionObject

type ConditionObject interface {
	GetConditions() *[]metav1.Condition
}

type Context

type Context struct {
	context.Context

	Log        logr.Logger
	Data       ContextData
	Patch      *Patch
	Object     client.Object
	Config     *rest.Config
	Client     client.Client
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	Conditions *conditionHelper
}

type ContextData

type ContextData map[string]interface{}

type FinalizerComponent

type FinalizerComponent interface {
	Finalize(*Context) (ctrl.Result, bool, error)
}

type InitializerComponent

type InitializerComponent interface {
	Initialize(*Context, *ctrl.Builder) error
}

type OwnedComponent

type OwnedComponent interface {
	Component
	Kind() client.Object
}

type Patch

type Patch struct {
	Annotator     *patch.Annotator
	Maker         patch.Maker
	CalculateOpts []patch.CalculateOption
}

func NewPatch

func NewPatch(gvk schema.GroupVersionKind) *Patch

type Reconciler

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

func NewReconciler

func NewReconciler(mgr ctrl.Manager) *Reconciler

func (*Reconciler) Build

func (r *Reconciler) Build() (controller.Controller, error)

func (*Reconciler) Complete

func (r *Reconciler) Complete() error

func (*Reconciler) Component

func (r *Reconciler) Component(name string, comp Component, opts ...builder.OwnsOption) *Reconciler

func (*Reconciler) For

func (r *Reconciler) For(apiType client.Object, opts ...builder.ForOption) *Reconciler

func (*Reconciler) Named

func (r *Reconciler) Named(name string) *Reconciler

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(rootCtx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Reconciler) ReconcileNotFound

func (r *Reconciler) ReconcileNotFound() *Reconciler

func (*Reconciler) ReduceReconcileLogging added in v0.1.2

func (r *Reconciler) ReduceReconcileLogging() *Reconciler

func (*Reconciler) Watches added in v0.1.1

func (r *Reconciler) Watches(apiType client.Object, eventHandler handler.EventHandler, opts ...builder.WatchesOption) *Reconciler

func (*Reconciler) WithContextData

func (r *Reconciler) WithContextData(key string, obj interface{}) *Reconciler

func (*Reconciler) WithControllerOptions

func (r *Reconciler) WithControllerOptions(opts controller.Options) *Reconciler

func (*Reconciler) WithWebhooks

func (r *Reconciler) WithWebhooks() *Reconciler

Jump to

Keyboard shortcuts

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