reconciler

package
v5.36.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package reconciler provides a common base for GitOps reconciliation clients.

This package contains shared utilities and base types used by both Flux and ArgoCD reconcilers, reducing code duplication and ensuring consistent behavior across GitOps engines.

The package provides:

  • Base struct for building dynamic Kubernetes clients
  • Common error handling patterns for reconciliation operations
  • Shared timeout and polling configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any](kubeconfigPath string, constructor func(*Base) T) (T, error)

New creates a reconciler of type T that embeds Base from a kubeconfig path. The constructor function should create the concrete reconciler type with the provided base.

func NewWithClient

func NewWithClient[T any](dynamicClient dynamic.Interface, constructor func(*Base) T) T

NewWithClient creates a reconciler of type T with a provided dynamic client (for testing). The constructor function should create the concrete reconciler type with the provided base.

Types

type Base

type Base struct {
	Dynamic        dynamic.Interface
	KubeconfigPath string
}

Base provides shared functionality for GitOps reconcilers. It holds a dynamic Kubernetes client that can be used to interact with custom resources from different GitOps engines.

func NewBase

func NewBase(kubeconfigPath string) (*Base, error)

NewBase creates a new Base reconciler with a dynamic client from kubeconfig. The dynamic client is configured for the default context in the kubeconfig.

func NewBaseWithClient

func NewBaseWithClient(dynamicClient dynamic.Interface) *Base

NewBaseWithClient creates a Base with a provided dynamic client (for testing).

Jump to

Keyboard shortcuts

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