reconciler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PartOf            = "scoby-component"
	ManagedBy         = "scoby-controller"
	ComponentWorkload = "workload"
)
View Source
const (
	ConditionTypeReady = "Ready"
)

Common status conditions

View Source
const (
	DefaultContainerName = "adapter"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base interface {
	reconcile.Reconciler
}

type FormFactorReconciler

type FormFactorReconciler interface {
	GetStatusConditions() (happy string, all []string)
	SetupController(name string, c controller.Controller, owner runtime.Object) error
	Reconcile(context.Context, Object) (ctrl.Result, error)
}

type HookReconciler

type HookReconciler interface {
	Reconcile(context.Context, Object) error
	Finalize(context.Context, Object) error
	IsPreReconciler() bool
	IsPostReconciler() bool
	IsFinalizer() bool
}

type Object

type Object interface {
	// Kubernetes object
	client.Object
	AsKubeObject() client.Object

	// Status management
	GetStatusManager() StatusManager

	// Rendering from registration
	ObjectRender
}

type ObjectManager

type ObjectManager interface {
	NewObject() Object
	GetRenderer() ObjectRenderer
}

type ObjectRender

type ObjectRender interface {

	// AddEnvVar is used by a renderer to add a new a new environment
	// variable to the rendered object informing tracking information
	// about the JSON path of the object element that originates
	// the variable.
	AddEnvVar(path string, value *corev1.EnvVar)

	// GetEnvVarAtPath is used to retrieve environment variables set
	// after an object's path element.
	//
	// The main (and probably only) case is a status rendering option
	// that references a value set after an object's path
	GetEnvVarAtPath(path string) *corev1.EnvVar

	// Once rendered an object can be queried about the container options
	// that they resulting worload must include.
	AsContainerOptions() []resources.ContainerOption
}

ObjectRender contains rendering methods, either to be used by the renderer to convert the registration information into workload assets, or by the reconciler to retrieve those assets.

type ObjectRenderer

type ObjectRenderer interface {
	Render(context.Context, Object) error
}

type StatusManager

type StatusManager interface {
	GetObservedGeneration() int64
	SetObservedGeneration(int64)
	GetCondition(conditionType string) *commonv1alpha1.Condition
	SetCondition(condition *commonv1alpha1.Condition)
	SanitizeConditions()
	GetAddressURL() string
	SetAddressURL(string)
	SetValue(value interface{}, path ...string) error
	SetAnnotation(key, value string) error
}

type StatusManagerFactory

type StatusManagerFactory interface {
	// Configures the internal set of conditions for the
	// generated status managers.
	UpdateConditionSet(happyCond string, conditions ...string)

	// Create a new status manager for the object.
	ForObject(object *unstructured.Unstructured) StatusManager
}

Directories

Path Synopsis
crd
formfactor

Jump to

Keyboard shortcuts

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