Documentation
¶
Overview ¶
Package controller provides a Kubernetes controller for a TensorFlow job resource.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrVersionOutdated = errors.New("requested version is outdated in apiserver") // DefaultJobBackOff is the max backoff period, exported for the e2e test DefaultJobBackOff = 10 * time.Second // MaxJobBackOff is the max backoff period, exported for the e2e test MaxJobBackOff = 360 * time.Second )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
KubeClient kubernetes.Interface
PyTorchJobClient torchjobclient.Interface
PyTorchJobLister listers.PyTorchJobLister
PyTorchJobSynced cache.InformerSynced
// WorkQueue is a rate limited work queue. This is used to queue work to be
// processed instead of performing it as soon as a change happens. This
// means we can ensure we only process a fixed amount of resources at a
// time, and makes it easy to ensure we are never processing the same item
// simultaneously in two different workers.
WorkQueue workqueue.RateLimitingInterface
// contains filtered or unexported fields
}
func New ¶
func New(kubeClient kubernetes.Interface, tfJobClient torchjobclient.Interface, config torchv1alpha1.ControllerConfig, tfJobInformerFactory informers.SharedInformerFactory) (*Controller, error)
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.