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 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( kubeclientset kubernetes.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, namespace string, localOnly bool) *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.
Click to show internal directories.
Click to hide internal directories.