controller

package
v0.0.0-...-de9510f Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package controller provides the implementation of the operator's controller logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeHash

func ComputeHash(object any) (string, error)

ComputeHash returns a hash value calculated from the provided object. The hash will be safe encoded to avoid bad words.

func ComputeVersionedHash

func ComputeVersionedHash(object any, epoc int) (string, error)

ComputeVersionedHash follows the same rules of ComputeHash with the exception that accepts also a epoc value. The epoc value is used to generate a new hash from a same object. This is useful to force a new hash even if the original object is not changed. A practical use is to force a reconciliation loop of the object.

func DeepHashObject

func DeepHashObject(hasher hash.Hash, objectToWrite any) error

DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.

Types

type PluginConfigurationReconciler

type PluginConfigurationReconciler struct {
	client.Client

	Scheme *runtime.Scheme
}

PluginConfigurationReconciler reconciles a PluginConfiguration object.

func (*PluginConfigurationReconciler) Reconcile

Reconcile handles PluginConfiguration changes by creating or updating the per-PC klio-config secret.

func (*PluginConfigurationReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ServerReconciler

type ServerReconciler struct {
	client.Client

	Scheme                         *runtime.Scheme
	Recorder                       events.EventRecorder
	HaveSecurityContextConstraints bool
}

ServerReconciler reconciles a Server object.

func (*ServerReconciler) Reconcile

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

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