Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SuccessSynced is used as part of the Event 'reason' when a FADepl is synced SuccessSynced = "Synced" // ErrResourceExists is used as part of the Event 'reason' when a FADepl fails // to sync due to a Deployment of the same name already existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a resource // fails to sync due to a Deployment already existing MessageResourceExists = "Resource %q already exists and is not managed by FADepl" // MessageResourceSynced is the message used for an Event fired when a FADepl // is synced successfully MessageResourceSynced = "FADepl synced successfully" )
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(kubeconfig string, masterURL string, logLevel string) (kubeclient *kubernetes.Clientset, fogatlasclient *clientset.Clientset)
Initialize function
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the controller implementation for FaDepl resources
func NewController ¶
func NewController( kubeclientset kubernetes.Interface, faDeplclientset clientset.Interface, deploymentInformer appsinformers.DeploymentInformer, faDeplInformer informers.FADeplInformer) *Controller
NewController function returns a new sample controller
func (*Controller) RegisterAlgoImpl ¶
func (c *Controller) RegisterAlgoImpl(p map[string]PlacementAlgorithm)
RegisterAlgoImpl registers an algorithm to the controller
func (*Controller) Run ¶
func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error
Run method 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.
type PlacementAlgorithm ¶
type PlacementAlgorithm interface { Init(name string, kubeclientset kubernetes.Interface, faDeplclientset clientset.Interface) CalculatePlacement(fadepl *fadeplv1alpha1.FADepl) (err error) CalculateUpdate(fadepl *fadeplv1alpha1.FADepl) (err error) }
PlacementAlgorithm provides the specification of a placement algorithm
Click to show internal directories.
Click to hide internal directories.