common

package
v0.5.17 Latest Latest
Warning

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

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

Documentation

Overview

Package common contains common helper functions and types used across the nodemanager controllers.

Index

Constants

This section is empty.

Variables

View Source
var ErrLabelsNotMatched = fmt.Errorf("labels not matched")

Functions

This section is empty.

Types

type ConfigSetConfig added in v0.5.5

type ConfigSetConfig struct{}

func (*ConfigSetConfig) RegisterFlagsAndApplyDefaults added in v0.5.5

func (c *ConfigSetConfig) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

type ConfigSetReconciler

type ConfigSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

ConfigSetReconciler reconciles a ConfigSet object

func NewConfigSetReconciler added in v0.5.5

func NewConfigSetReconciler(client client.Client, scheme *runtime.Scheme, logger *slog.Logger, cfg ConfigSetConfig, system handler.System, locker locker.Locker) *ConfigSetReconciler

func (*ConfigSetReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to handle changes to a ConfigSet object.

func (*ConfigSetReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*ConfigSetReconciler) WithLogger

func (r *ConfigSetReconciler) WithLogger(logger *slog.Logger)

func (*ConfigSetReconciler) WithSystem

func (r *ConfigSetReconciler) WithSystem(system handler.System)

func (*ConfigSetReconciler) WithTracer

func (r *ConfigSetReconciler) WithTracer(tracer trace.Tracer)

type ControllerConfig added in v0.5.5

type ControllerConfig struct {
	MetricsAddr          string
	EnableLeaderElection bool
	ProbeAddr            string
	SecureMetrics        bool
	EnableHTTP2          bool
	Namespace            string

	ManagedNode ManagedNodeConfig
	ConfigSet   ConfigSetConfig
	Locker      locker.Config
}

func (*ControllerConfig) RegisterFlagsAndApplyDefaults added in v0.5.5

func (c *ControllerConfig) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

type Data

type Data struct {
	Node NodeData
}

type ManagedNodeConfig added in v0.5.5

type ManagedNodeConfig struct {
	ForgivenessPeriod time.Duration
}

func (*ManagedNodeConfig) RegisterFlagsAndApplyDefaults added in v0.5.5

func (c *ManagedNodeConfig) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

type ManagedNodeReconciler

type ManagedNodeReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

ManagedNodeReconciler reconciles a ManagedNode object

func NewManagedNodeReconciler added in v0.5.5

func NewManagedNodeReconciler(client client.Client, scheme *runtime.Scheme, logger *slog.Logger, cfg ManagedNodeConfig, system handler.System, locker locker.Locker) *ManagedNodeReconciler

func (*ManagedNodeReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to keep the k8s resource in sync with the current state of the node.

func (*ManagedNodeReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NodeData

type NodeData struct {
	Labels     map[string]string
	ConfigMaps map[string]string
	Secrets    map[string][]byte
}

Jump to

Keyboard shortcuts

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