custodian

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0, MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromFlags

func InitFromFlags(fs *flag.FlagSet, cfg *Config)

InitFromFlags initializes the config from the provided CLI flag set.

Types

type Config

type Config struct {
	// Workers denotes the number of worker threads for the custodian controller.
	Workers int
	// SyncPeriod is the duration after which re-enqueuing happens.
	SyncPeriod time.Duration
	// EtcdMember holds configuration related to etcd members.
	EtcdMember EtcdMemberConfig
}

Config contains configuration for the Custodian Controller.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates the config.

type EtcdMemberConfig

type EtcdMemberConfig struct {
	// NotReadyThreshold is the duration after which an etcd member's state is considered `NotReady`.
	NotReadyThreshold time.Duration
	// UnknownThreshold is the duration after which an etcd member's state is considered `Unknown`.
	UnknownThreshold time.Duration
}

EtcdMemberConfig holds configuration related to etcd members.

type Reconciler

type Reconciler struct {
	client.Client
	// contains filtered or unexported fields
}

Reconciler reconciles status of Etcd object

func NewReconciler

func NewReconciler(mgr manager.Manager, config *Config) *Reconciler

NewReconciler creates a new reconciler for Custodian.

func (*Reconciler) Reconcile

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

Reconcile reconciles the etcd.

func (*Reconciler) RegisterWithManager

func (r *Reconciler) RegisterWithManager(ctx context.Context, mgr ctrl.Manager, ignoreOperationAnnotation bool) error

RegisterWithManager registers the Custodian Controller with the given controller manager.

Jump to

Keyboard shortcuts

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