controllers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RbacObjCtxKey     = rbacObjCtxKey("RbacObjects")
	RbacObjNamePrefix = "sts-resize-sync-job-"
)
View Source
const ManagedLabel = "sts-resize.vshn.net/managed"

ManagedLabel is a label to mark resources to be managed by the controller

Variables

This section is empty.

Functions

This section is empty.

Types

type CriticalError

type CriticalError struct {
	Err           error
	Event         string
	SaveToScaleUp bool
}

CriticalError is an unrecoverable error.

func (CriticalError) Error

func (err CriticalError) Error() string

Error implements the Error interface

func (*CriticalError) Unwrap

func (err *CriticalError) Unwrap() error

Unwrap is used to make it work with errors.Is, errors.As.

type InplaceReconciler added in v0.3.0

type InplaceReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder

	RequeueAfter time.Duration
	LabelName    string
}

InplaceReconciler reconciles a StatefulSet object It will resize the PVCs according to the sts template.

func (*InplaceReconciler) Reconcile added in v0.3.0

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

Reconcile is the main work loop, reacting to changes in statefulsets and initiating resizing of StatefulSets.

func (*InplaceReconciler) SetupWithManager added in v0.3.0

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

SetupWithManager sets up the controller with the Manager.

type RbacObjects added in v0.2.0

type RbacObjects struct {
	Name           string
	ServiceAccount corev1.ServiceAccount
	RoleBinding    rbacv1.RoleBinding
	Created        bool
}

type StatefulSetController added in v0.3.0

type StatefulSetController interface {
	SetupWithManager(ctrl.Manager) error
}

StatefulSetController is an interface for various implementations of the StatefulSet controller.

type StatefulSetReconciler

type StatefulSetReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder

	SyncContainerImage string
	SyncClusterRole    string
	RequeueAfter       time.Duration
}

StatefulSetReconciler reconciles a StatefulSet object

func (*StatefulSetReconciler) Reconcile

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

Reconcile is the main work loop, reacting to changes in statefulsets and initiating resizing of StatefulSets.

func (*StatefulSetReconciler) SetupWithManager

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