draincontroller

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuccessCreate    = "SuccessfulCreate"
	DrainSuccess     = "DrainSuccess"
	PVCDeleteSuccess = "SuccessfulPVCDelete"
	PodDeleteSuccess = "SuccessfulDelete"

	MessageDrainPodCreated  = "create Drain Pod %s in StatefulSet %s successful"
	MessageDrainPodFinished = "drain Pod %s in StatefulSet %s completed successfully"
	MessageDrainPodDeleted  = "delete Drain Pod %s in StatefulSet %s successful"
	MessagePVCDeleted       = "delete Claim %s in StatefulSet %s successful"
)
View Source
const AnnotationDrainerPodTemplate = "statefulsets.kubernetes.io/drainer-pod-template"
View Source
const AnnotationStatefulSet = "statefulsets.kubernetes.io/drainer-pod-owner" // TODO: can we replace this with an OwnerReference with the StatefulSet as the owner?
View Source
const DrainRoleName = "drain-pod-role"
View Source
const DrainServiceAccountName = "drain-pod-service-account"
View Source
const LabelDrainPod = "drain-pod"

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(

	controllerName string,
	kubeclientset kubernetes.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	namespace string,
	client client.Client,
	instance *brokerv1beta1.ActiveMQArtemisScaledown,
	logger logr.Logger) *Controller

NewController returns a new sample controller

func (*Controller) AddInstance added in v0.20.0

func (c *Controller) AddInstance(instance *brokerv1beta1.ActiveMQArtemisScaledown)

func (*Controller) GetStopCh added in v0.20.0

func (c *Controller) GetStopCh() *chan struct{}

func (*Controller) Run

func (c *Controller) Run(threadiness int) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

Jump to

Keyboard shortcuts

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