controller

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateAvailableReleasesToKeep added in v0.6.0

func CalculateAvailableReleasesToKeep(
	releases []rolloutv1alpha1.VersionInfo,
	history []rolloutv1alpha1.DeploymentHistoryEntry,
	cutoffTime time.Time,
	minReleases int,
) []rolloutv1alpha1.VersionInfo

CalculateAvailableReleasesToKeep determines which available releases should be retained based on multiple criteria. It returns a slice of VersionInfo that should be kept. releases: the current list of available releases (sorted oldest to newest) history: the current deployment history cutoffTime: releases older than this may be removed (unless kept by other criteria) minReleases: keep at least this many newest releases

Types

type Clock

type Clock interface {
	Now() time.Time
}

type HealthCheckReconciler

type HealthCheckReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Clock  Clock
}

HealthCheckReconciler reconciles a HealthCheck object

func (*HealthCheckReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. This controller handles generic HealthCheck logic and delegates specific health checking to specialized controllers based on the class. It also watches Rollout resources to reset health checks when deployments happen.

func (*HealthCheckReconciler) ResetHealthCheckStatus

func (r *HealthCheckReconciler) ResetHealthCheckStatus(ctx context.Context, healthCheck *rolloutv1alpha1.HealthCheck) error

ResetHealthCheckStatus resets the HealthCheck status to Pending This should be called when a new deployment is detected

func (*HealthCheckReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type KustomizationHealthReconciler

type KustomizationHealthReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Clock  Clock
}

KustomizationHealthReconciler reconciles a KustomizationHealth object

func (*KustomizationHealthReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*KustomizationHealthReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type KustomizationReference

type KustomizationReference struct {
	Namespace string
	Name      string
}

KustomizationReference represents a reference to a kustomization

type RealClock

type RealClock struct{}

func (RealClock) Now

func (RealClock) Now() time.Time

type RolloutReconciler

type RolloutReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Clock    Clock
	Recorder record.EventRecorder
}

RolloutReconciler reconciles a Rollout object

func (*RolloutReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*RolloutReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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