Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StatefulSetAnnotation is added to PersistentVolumeClaims that the // controller identifies as managed by a StatefulSet. The value is always // the name of the managing StatefulSet in the same namespace as the // PersistentVolumeClaim. The annotation is used to identify // PersistentVolumeClaims after the deletion of a StatefulSet. StatefulSetAnnotation = "statefulset.kube-volume-cleaner.io/managed-by" // DeleteAfterAnnotation is added to PersistentVolumeClaims that should be // deleted only after the specified moment in time. The annotation is set // once the managing StatefulSet and the Pod mounting the // PersistentVolumeClaim are deleted and the controller is configured to // run with a delete-after value > 0s. DeleteAfterAnnotation = "pvc.kube-volume-cleaner.io/delete-after" // ControllerAnnotation signals the ownership of a PersistentVolumeClaim to // other kube-volume-cleaner instances. Controllers must not touch // PersistentVolumeClaims where the value of this annotation does not match // their own ID. ControllerAnnotation = "kube-volume-cleaner.io/controller-id" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller watches for PersistentVolumeClaims that where created by a StatefulSet and will delete them once the StatefulSet and its Pods are deleted.
func New ¶
func New(client kubernetes.Interface, options *config.Options) (*Controller, error)
New creates a new *Controller with client and options. Will return an error if options contain malformed values.
func (*Controller) Run ¶
func (c *Controller) Run(stopCh <-chan struct{}) error
Run starts the controller and will block until stopCh is closed.
Click to show internal directories.
Click to hide internal directories.