Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AgentName is the controller name used // both in logs and labels to identify it AgentName = "podscale-controller" // SubjectToLabel is used to identify the ServiceLevelAgreement // matched by the Service SubjectToLabel = "app.kubernetes.io/subject-to" // QOSNotSupported is used as part of the event 'reason' fired when the controller // process a pod with a QOS other than Guaranteed QOSNotSupported = "Unsupported QOS" // ContainerNotFound is used as part of the event 'reason' fired when the controller // process a pod that does not have the container specified in the Service Level Agreement ContainerNotFound = "Container not found" // SuccessSynced is used as part of the Event 'reason' when a podScale is synced SuccessSynced = "Synced" // MessageResourceSynced is the message used for an Event fired when a podScale // is synced successfully MessageResourceSynced = "podScale synced successfully" )
Variables ¶
This section is empty.
Functions ¶
func NewPodScale ¶
func NewPodScale(pod *corev1.Pod, sla *v1beta1.ServiceLevelAgreement, service *corev1.Service, selectorLabels labels.Set) *v1beta1.PodScale
NewPodScale creates a new PodScale resource using the corresponding Pod and ServiceLevelAgreement infos. The SLA is the resource Owner in order to enable garbage collection on its deletion.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the controller implementation for podScale resources
func NewController ¶
func NewController( kubeClient kubernetes.Interface, podScalesClient clientset.Interface, informers informers.Informers) *Controller
NewController returns a new PodScale 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.