controller

package
v0.0.0-...-22d2e55 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SuccessCreate  = "SuccessfulCreate"
	CleanupSuccess = "CleanupSuccess"
	DeleteSuccess  = "SuccessfulDelete"

	MessageCleanupPodCreated  = "create Cleanup Pod %s in StatefulSet %s successful"
	MessageCleanupPodFinished = "cleanup Pod %s in StatefulSet %s completed successfully"
	MessageCleanupPodDeleted  = "delete Cleanup Pod %s in StatefulSet %s successful"
	MessagePVCDeleted         = "delete Claim %s in StatefulSet %s successful"

	FinalizerName = "statefulsets.kubernetes.io/scaledown"
)
View Source
const AnnotationScaledownPodTemplate = "statefulsets.kubernetes.io/scaledown-pod-template"
View Source
const AnnotationStatefulSet = "statefulsets.kubernetes.io/scaledown-pod-owner" // TODO: can we replace this with an OwnerReference with the StatefulSet as the owner?
View Source
const LabelScaledownPod = "scaledown-pod"

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {

	// Recorder is an event Recorder for recording Event resources to the
	// Kubernetes API.
	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

func NewController

func NewController(
	kubeclientset kubernetes.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory) *Controller

NewController returns a new sample controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) 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