resource

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConditionReady indicates the Resource has been successfully reconciled.
	// Failure modes are encoded in the condition's Reason; this mirrors the
	// minimal Component condition set (`internal/controller/component/controller_conditions.go:14-21`).
	ConditionReady controller.ConditionType = "Ready"

	// ConditionFinalizing indicates the Resource is being finalized (deleted).
	ConditionFinalizing controller.ConditionType = "Finalizing"
)
View Source
const (
	// ReasonReconciled indicates the Resource has been validated and the
	// latest ResourceRelease is in place.
	ReasonReconciled controller.ConditionReason = "Reconciled"

	// ReasonResourceTypeNotFound indicates the referenced ResourceType or
	// ClusterResourceType does not exist in the cluster yet.
	ReasonResourceTypeNotFound controller.ConditionReason = "ResourceTypeNotFound"

	// ReasonFinalizing indicates the Resource is being finalized.
	ReasonFinalizing controller.ConditionReason = "Finalizing"
)
View Source
const (
	// ResourceFinalizer ensures owned ResourceReleases are cleaned up and that
	// deletion blocks while ResourceReleaseBindings still reference the Resource.
	// Bindings are deleted externally; their own finalizers enforce retainPolicy.
	ResourceFinalizer = "openchoreo.dev/resource-cleanup"
)

Variables

This section is empty.

Functions

func NewFinalizingCondition

func NewFinalizingCondition(generation int64) metav1.Condition

NewFinalizingCondition returns a Finalizing=True condition observed at the given generation, used while the Resource is being torn down.

Types

type Reconciler

type Reconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

Reconciler reconciles a Resource object

func (*Reconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ReleaseSpec

type ReleaseSpec struct {
	ResourceType openchoreov1alpha1.ResourceReleaseResourceType `json:"resourceType"`
	Parameters   *runtime.RawExtension                          `json:"parameters,omitempty"`
}

ReleaseSpec captures the immutable inputs that uniquely identify a ResourceRelease. Owner is intentionally excluded so the hash represents the configuration, not the ownership pointer (mirrors component.ReleaseSpec).

Jump to

Keyboard shortcuts

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