controllers

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 71 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretDeletePredicate

type SecretDeletePredicate struct {
}

func (SecretDeletePredicate) Create

Create implements Predicate.

func (SecretDeletePredicate) Delete

Delete implements Predicate.

func (SecretDeletePredicate) Generic

Generic implements Predicate.

func (SecretDeletePredicate) Update

Update implements Predicate.

type SourceRevisionChangePredicate

type SourceRevisionChangePredicate struct {
	predicate.Funcs
}

func (SourceRevisionChangePredicate) Update

type TerraformReconciler

type TerraformReconciler struct {
	client.Client
	kuberecorder.EventRecorder
	runtimeCtrl.Metrics

	FieldManager string

	// EnableExternalArtifact allows ExternalArtifact as a sourceRef kind. The kind only exists
	// with Flux 2.7+, so watching it on an older cluster stops the controller from starting.
	EnableExternalArtifact bool

	// Quota retry configuration
	QuotaRetryEnabled      bool
	QuotaRetryDelay        time.Duration
	QuotaRetryJitterFactor float64

	StatusPoller              *polling.StatusPoller
	Scheme                    *runtime.Scheme
	CertRotator               *mtls.CertRotator
	RunnerGRPCPort            int
	RunnerCreationTimeout     time.Duration
	RunnerRPCTimeout          time.Duration
	RunnerUnreachableTimeout  time.Duration
	RunnerGRPCMaxMessageSize  int
	AllowBreakTheGlass        bool
	ClusterDomain             string
	NoCrossNamespaceRefs      bool
	UsePodSubdomainResolution bool
	Clientset                 *kubernetes.Clientset

	// Graceful shutdown fields
	ShutdownTimeout time.Duration
	// contains filtered or unexported fields
}

TerraformReconciler reconciles a Terraform object

func (*TerraformReconciler) IndexBy

func (r *TerraformReconciler) IndexBy(kind string) func(o client.Object) []string

func (*TerraformReconciler) LookupOrCreateRunner

func (r *TerraformReconciler) LookupOrCreateRunner(ctx context.Context, terraform *infrav1.Terraform, revision string) (runner.RunnerClient, func() error, error)

func (*TerraformReconciler) Reconcile

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

It checks the prerequisites (source, schedule, dependencies, approval, retries) on the fetched object, then hands a copy to reconcileNormal, which talks to the runner. Deletion is handed to reconcileDelete. Whatever path a pass takes, a deferred patch writes the final status.

func (*TerraformReconciler) SetupWithManager

func (r *TerraformReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, maxConcurrentReconciles int, httpRetry int) error

SetupWithManager sets up the controller with the Manager.

func (*TerraformReconciler) ShutdownCoordinator

func (r *TerraformReconciler) ShutdownCoordinator(ctx context.Context)

Jump to

Keyboard shortcuts

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