controller

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourcesFinalizerName is the name of the finalizer used by the ImageUpdater controller.
	ResourcesFinalizerName = "resources-finalizer.argocd-image-updater.argoproj.io"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageUpdaterConfig

type ImageUpdaterConfig struct {
	ArgocdNamespace        string
	DryRun                 bool
	CheckInterval          time.Duration
	ArgoClient             argocd.ArgoCD
	LogLevel               string
	LogFormat              string
	KubeClient             *kube.ImageUpdaterKubernetesClient
	MaxConcurrentApps      int
	RegistriesConf         string
	GitCommitUser          string
	GitCommitMail          string
	GitCommitMessage       *template.Template
	GitCommitSigningKey    string
	GitCommitSigningMethod string
	GitCommitSignOff       bool
	DisableKubeEvents      bool
	GitCreds               git.CredsStore
	EnableWebhook          bool
}

ImageUpdaterConfig contains global configuration and required runtime data

type ImageUpdaterReconciler

type ImageUpdaterReconciler struct {
	client.Client
	Scheme                  *runtime.Scheme
	Config                  *ImageUpdaterConfig
	MaxConcurrentReconciles int
	CacheWarmed             <-chan struct{}
	// Channel to signal manager to stop
	StopChan chan struct{}
	// For run-once mode: wait for all CRs to complete
	Once bool
	Wg   sync.WaitGroup
}

ImageUpdaterReconciler reconciles a ImageUpdater object

func (*ImageUpdaterReconciler) ProcessImageUpdaterCRs

func (r *ImageUpdaterReconciler) ProcessImageUpdaterCRs(ctx context.Context, crs []iuapi.ImageUpdater, warmUp bool, webhookEvent *argocd.WebhookEvent) error

ProcessImageUpdaterCRs processes a list of ImageUpdater CRs with optional webhook event

func (*ImageUpdaterReconciler) Reconcile

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

Reconcile is the core operational loop of the ImageUpdater controller. It is invoked in response to events on ImageUpdater custom resources (CRs) (like create, update, delete) or due to periodic requeues. Its primary responsibility is to ensure that container images managed by ImageUpdater CRs are kept up-to-date according to the policies defined within each CR.

func (*ImageUpdaterReconciler) RunImageUpdater

func (r *ImageUpdaterReconciler) RunImageUpdater(ctx context.Context, cr *iuapi.ImageUpdater, warmUp bool, webhookEvent *argocd.WebhookEvent) (argocd.ImageUpdaterResult, error)

RunImageUpdater is a main loop for argocd-image-controller

func (*ImageUpdaterReconciler) SetupWithManager

func (r *ImageUpdaterReconciler) 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