releasebinding

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: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConditionReleaseSynced indicates that the Release resource has been created/updated
	// from the ReleaseBinding
	ConditionReleaseSynced controller.ConditionType = "ReleaseSynced"

	// ConditionResourcesReady indicates that all resources in the Release are ready
	// based on workload-type specific evaluation
	ConditionResourcesReady controller.ConditionType = "ResourcesReady"

	// ConditionReady indicates the overall readiness of the ReleaseBinding
	// This is the top-level condition that aggregates ReleaseSynced and ResourcesReady
	ConditionReady controller.ConditionType = "Ready"

	// ConditionConnectionsResolved indicates that all connection URLs have been resolved.
	ConditionConnectionsResolved controller.ConditionType = "ConnectionsResolved"

	// ConditionResourceDependenciesReady indicates that all resource dependencies have a
	// matching ResourceReleaseBinding whose outputs are populated.
	ConditionResourceDependenciesReady controller.ConditionType = "ResourceDependenciesReady"

	// ConditionFinalizing indicates that the ReleaseBinding is being finalized (deleted).
	ConditionFinalizing controller.ConditionType = "Finalizing"
)
View Source
const (

	// ReasonReleaseCreated indicates the Release was successfully created
	ReasonReleaseCreated controller.ConditionReason = "ReleaseCreated"
	// ReasonReleaseSynced indicates the Release is up to date
	ReasonReleaseSynced controller.ConditionReason = "ReleaseSynced"
	// ReasonResourcesReady indicates all resources are ready
	ReasonResourcesReady controller.ConditionReason = "ResourcesReady"

	// ReasonComponentReleaseNotFound indicates the referenced ComponentRelease doesn't exist
	ReasonComponentReleaseNotFound controller.ConditionReason = "ComponentReleaseNotFound"
	// ReasonEnvironmentNotFound indicates the referenced Environment doesn't exist
	ReasonEnvironmentNotFound controller.ConditionReason = "EnvironmentNotFound"
	// ReasonDataPlaneNotFound indicates the referenced DataPlane doesn't exist
	ReasonDataPlaneNotFound controller.ConditionReason = "DataPlaneNotFound"
	// ReasonDataPlaneNotConfigured indicates the Environment has no DataPlaneRef
	ReasonDataPlaneNotConfigured controller.ConditionReason = "DataPlaneNotConfigured"
	// ReasonComponentNotFound indicates the referenced Component doesn't exist
	ReasonComponentNotFound controller.ConditionReason = "ComponentNotFound"
	// ReasonProjectNotFound indicates the referenced Project doesn't exist
	ReasonProjectNotFound controller.ConditionReason = "ProjectNotFound"
	// ReasonInvalidReleaseConfiguration indicates the ComponentRelease configuration is invalid
	ReasonInvalidReleaseConfiguration controller.ConditionReason = "InvalidReleaseConfiguration"

	// ReasonRenderingFailed indicates failure to render resources
	ReasonRenderingFailed controller.ConditionReason = "RenderingFailed"

	// ReasonReleaseOwnershipConflict indicates the Release exists but is owned by another resource
	ReasonReleaseOwnershipConflict controller.ConditionReason = "ReleaseOwnershipConflict"
	// ReasonReleaseUpdateFailed indicates failure to create/update the Release
	ReasonReleaseUpdateFailed controller.ConditionReason = "ReleaseUpdateFailed"
	// ReasonReleaseDeletionFailed indicates failure to delete Release during undeploy
	ReasonReleaseDeletionFailed controller.ConditionReason = "ReleaseDeletionFailed"

	// ReasonResourcesUndeployed indicates resources are intentionally undeployed (ReleaseState=Undeploy)
	ReasonResourcesUndeployed controller.ConditionReason = "ResourcesUndeployed"

	// ReasonResourceApplyFailed indicates one or more resources failed to apply to the target plane
	ReasonResourceApplyFailed controller.ConditionReason = "ResourceApplyFailed"
	// ReasonResourcesNotReady indicates one or more resources are not ready
	ReasonResourcesNotReady controller.ConditionReason = "ResourcesNotReady"
	// ReasonResourcesProgressing indicates resources are being created/updated
	ReasonResourcesProgressing controller.ConditionReason = "ResourcesProgressing"
	// ReasonResourcesDegraded indicates one or more resources are degraded
	ReasonResourcesDegraded controller.ConditionReason = "ResourcesDegraded"
	// ReasonResourcesUnknown indicates resource status is unknown
	ReasonResourcesUnknown controller.ConditionReason = "ResourcesUnknown"

	// ReasonAllConnectionsResolved indicates all connection URLs are resolved
	ReasonAllConnectionsResolved controller.ConditionReason = "AllConnectionsResolved"
	// ReasonConnectionsPending indicates some connections are not yet resolved
	ReasonConnectionsPending controller.ConditionReason = "ConnectionsPending"
	// ReasonNoConnections indicates there are no connections to resolve
	ReasonNoConnections controller.ConditionReason = "NoConnections"

	// ReasonAllResourceDependenciesReady indicates all resource dependencies resolved successfully
	ReasonAllResourceDependenciesReady controller.ConditionReason = "AllResourceDependenciesReady"
	// ReasonResourceDependenciesPending indicates one or more resource dependencies are not yet resolved
	ReasonResourceDependenciesPending controller.ConditionReason = "ResourceDependenciesPending"
	// ReasonNoResourceDependencies indicates there are no resource dependencies to resolve
	ReasonNoResourceDependencies controller.ConditionReason = "NoResourceDependencies"

	// ReasonReady indicates the ReleaseBinding is fully ready
	ReasonReady controller.ConditionReason = "Ready"
	// ReasonReadyWithSuspendedResources indicates ready with suspended workload (scaled to 0)
	ReasonReadyWithSuspendedResources controller.ConditionReason = "ReadyWithSuspendedResources"

	// ReasonJobCompleted indicates Job completed successfully
	ReasonJobCompleted controller.ConditionReason = "JobCompleted"
	// ReasonJobRunning indicates Job is running
	ReasonJobRunning controller.ConditionReason = "JobRunning"
	// ReasonJobFailed indicates Job failed
	ReasonJobFailed controller.ConditionReason = "JobFailed"

	// ReasonCronJobScheduled indicates CronJob is scheduled and ready
	ReasonCronJobScheduled controller.ConditionReason = "CronJobScheduled"
	// ReasonCronJobSuspended indicates CronJob is suspended
	ReasonCronJobSuspended controller.ConditionReason = "CronJobSuspended"

	// ReasonFinalizing indicates the ReleaseBinding is being finalized
	ReasonFinalizing controller.ConditionReason = "Finalizing"
)
View Source
const (
	// ReleaseBindingFinalizer is the finalizer that ensures Releases are deleted before ReleaseBinding
	ReleaseBindingFinalizer = "openchoreo.dev/releasebinding-cleanup"
)

Variables

This section is empty.

Functions

func NewReleaseBindingFinalizingCondition added in v0.9.0

func NewReleaseBindingFinalizingCondition(generation int64) metav1.Condition

NewReleaseBindingFinalizingCondition creates a condition indicating the ReleaseBinding is being finalized.

Types

type Reconciler

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

	// Pipeline is the component rendering pipeline, shared across all reconciliations.
	// This enables CEL environment caching across different component types and reconciliations.
	Pipeline *componentpipeline.Pipeline
}

Reconciler reconciles a ReleaseBinding object

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, rErr 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 ResourceCategory

type ResourceCategory string

ResourceCategory defines the category of a resource for status evaluation. Different categories have different readiness evaluation criteria.

const (
	// CategoryPrimaryWorkload - The main workload resource (Deployment, StatefulSet, Job, CronJob)
	// This is the most important resource for determining component readiness
	CategoryPrimaryWorkload ResourceCategory = "primary-workload"

	// CategorySupporting - Supporting infrastructure resources (Service, PVC, etc.)
	// These should exist but have simple status checks
	CategorySupporting ResourceCategory = "supporting"

	// CategoryOperational - Operational resources that may have complex states (HPA, HTTPRoute, etc.)
	// These can be progressing without blocking readiness
	CategoryOperational ResourceCategory = "operational"

	// CategoryNoStatus - Resources without meaningful status semantics (ConfigMap, Secret, etc.)
	// These are skipped in status evaluation (following ArgoCD's approach)
	CategoryNoStatus ResourceCategory = "no-status"
)

type ResourceStatusSummary

type ResourceStatusSummary struct {
	Total       int
	Healthy     int
	Progressing int
	Degraded    int
	Suspended   int
	Unknown     int
}

ResourceStatusSummary aggregates health status counts for resources

type WorkloadType

type WorkloadType string

WorkloadType represents the type of workload based on ComponentType

const (
	WorkloadTypeDeployment  WorkloadType = "deployment"
	WorkloadTypeStatefulSet WorkloadType = "statefulset"
	WorkloadTypeCronJob     WorkloadType = "cronjob"
	WorkloadTypeJob         WorkloadType = "job"
	WorkloadTypeProxy       WorkloadType = "proxy"
	WorkloadTypeUnknown     WorkloadType = "unknown"
)

Jump to

Keyboard shortcuts

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