common

package
v0.0.0-...-6165e84 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Clock is defined as a package var so it can be stubbed out during tests.

Functions

This section is empty.

Types

type ConditionedObject

type ConditionedObject interface {
	client.Object
	metav1.Object
	GetConditions() []metav1.Condition
	SetConditions([]metav1.Condition)
}

ConditionedObject is an interface that describes condition-related operations.

type Reconciler

type Reconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
	Log      logr.Logger
}

Reconciler reconciles an object.

func (*Reconciler) EmitEvent

func (r *Reconciler) EmitEvent(object runtime.Object, name string, res controllerutil.OperationResult, msg string, err error)

EmitEvent emits a Kubernetes event for the given object.

func (*Reconciler) FetchObjectTemplate

func (r *Reconciler) FetchObjectTemplate(ctx context.Context, namespace, name string) (*tofaniov1alpha1.ObjectTemplate, error)

FetchObjectTemplate retrieves an ObjectTemplate by name and namespace.

func (*Reconciler) ProcessCondition

func (r *Reconciler) ProcessCondition(ctx context.Context, object ConditionedObject, conditionType string, status metav1.ConditionStatus, reason, message string)

func (*Reconciler) UpdateStatus

func (r *Reconciler) UpdateStatus(ctx context.Context, object client.Object) (err error)

Jump to

Keyboard shortcuts

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