controller

package
v0.0.0-...-dfa00b6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultDeletionRequeueDelay        = 1 * time.Minute
	DefaultValidationErrorDelay        = 30 * time.Second
	DefaultTemplateRenderingErrorDelay = 30 * time.Second
)

Default Requeue delays

View Source
const (
	// SiteConfigOperatorConfigMap defines the name of the ConfigMap used to manage
	// the SiteConfig Operator's runtime configuration.
	SiteConfigOperatorConfigMap = "siteconfig-operator-configuration"

	// RequeueDelay defines the default requeue delay on transient errors.
	RequeueDelay = 30 * time.Second
)
View Source
const ClusterInstanceFieldManager = "siteconfig-controller"

ClusterInstanceFieldManager is the field manager name used for Server-Side Apply operations

Variables

This section is empty.

Functions

func CreateDefaultConfigurationConfigMap

func CreateDefaultConfigurationConfigMap(ctx context.Context, c client.Client, namespace string) error

CreateDefaultConfigurationConfigMap creates a ConfigMap with default configuration values in the given namespace.

func GetConfigurationData

func GetConfigurationData(ctx context.Context, c client.Client, namespace string) (map[string]string, error)

GetConfigurationData retrieves the data field of the specified ConfigMap.

Types

type ClusterDeploymentReconciler

type ClusterDeploymentReconciler struct {
	client.Client
	Log    *zap.Logger
	Scheme *runtime.Scheme
}

ClusterDeploymentReconciler reconciles a ClusterDeployment object to update the ClusterInstance cluster deployment status conditions

func (*ClusterDeploymentReconciler) Reconcile

func (*ClusterDeploymentReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ClusterInstanceReconciler

type ClusterInstanceReconciler struct {
	client.Client
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	Log              *zap.Logger
	TmplEngine       *ci.TemplateEngine
	ConfigStore      *configuration.ConfigurationStore
	DeletionHandler  *deletion.DeletionHandler
	ReinstallHandler *reinstall.ReinstallHandler
}

ClusterInstanceReconciler reconciles a ClusterInstance object

func (*ClusterInstanceReconciler) 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 (*ClusterInstanceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ConfigurationMonitor

type ConfigurationMonitor struct {
	client.Client
	Log    *zap.Logger
	Scheme *runtime.Scheme

	// Namespace containing the ConfigMap
	Namespace string

	// Store for runtime configuration
	ConfigStore *configuration.ConfigurationStore
}

ConfigurationMonitor watches for changes to a specific ConfigMap and updates the SiteConfig Operator's runtime configuration accordingly.

func (*ConfigurationMonitor) Reconcile

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

Reconcile processes events for the SiteConfig Configuration ConfigMap, ensuring the runtime configuration remains synchronized. Creates a default Configuration ConfigMap if one does not exist.

func (*ConfigurationMonitor) SetupWithManager

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

SetupWithManager configures the controller to watch the SiteConfig configuration ConfigMap and process relevant events.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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