Documentation
¶
Index ¶
- Constants
- type TFExtensionController
- func (tc *TFExtensionController) AddQueueUnit(obj interface{})
- func (tc *TFExtensionController) AddTFJob(obj interface{})
- func (tc *TFExtensionController) DeleteQueueUnit(obj interface{})
- func (tc *TFExtensionController) DeleteTFJob(obj interface{})
- func (tc *TFExtensionController) Run(threadiness int, stopCh <-chan struct{}) error
- func (tc *TFExtensionController) UpdateQueueUnit(oldObj, newObj interface{})
- func (tc *TFExtensionController) UpdateTFJob(_, newObj interface{})
Constants ¶
View Source
const ( // MaxQueueRetries is the number of times a queue item will be retried before it is dropped out of the queue. // With the current rate-limiter in use (5ms*2^(maxRetries-1)) the following numbers represent the times // a queue item is going to be requeued: // // 1-10 retry times: 5ms, 10ms, 20ms, 40ms, 80ms, 160ms, 320ms, 640ms, 1.3s, 2.6s, // 11-20 retry times: 5.1s, 10.2s, 20.4s, 41s, 82s, 164s, 328s, 656s(11min), 1312s(21min), 2624s(43min) MaxQueueRetries = 15 // RetryInterval is the interval time when update tfjob failed RetryInterval = 200 * time.Millisecond MaxUpdateRetries = 5 // Suspend is a flag annotation for tfjob to use the queueunit crd Suspend = "scheduling.x-k8s.io/suspend" Queuing = "Queuing" ConsumerRefKind = tfjobv1.Kind ConsumerRefAPIVersion = tfjobv1.GroupName + "/" + tfjobv1.GroupVersion // QuNameSuffix is the suffix of the queue unit name when create a new one. // In this way, different types of jobs with the same name will create different queue unit name. QuNameSuffix = "-tf-qu" OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TFExtensionController ¶
type TFExtensionController struct {
// contains filtered or unexported fields
}
func NewTFExtensionController ¶
func NewTFExtensionController( k8sClient *kubernetes.Clientset, queueInformer queueinformers.QueueUnitInformer, queueClient *queueversioned.Clientset, tfJobInformer tfjobinformers.TFJobInformer, tfJobClinet *tfjobversioned.Clientset) *TFExtensionController
func (*TFExtensionController) AddQueueUnit ¶
func (tc *TFExtensionController) AddQueueUnit(obj interface{})
func (*TFExtensionController) AddTFJob ¶
func (tc *TFExtensionController) AddTFJob(obj interface{})
func (*TFExtensionController) DeleteQueueUnit ¶
func (tc *TFExtensionController) DeleteQueueUnit(obj interface{})
func (*TFExtensionController) DeleteTFJob ¶
func (tc *TFExtensionController) DeleteTFJob(obj interface{})
func (*TFExtensionController) Run ¶
func (tc *TFExtensionController) Run(threadiness int, stopCh <-chan struct{}) error
func (*TFExtensionController) UpdateQueueUnit ¶
func (tc *TFExtensionController) UpdateQueueUnit(oldObj, newObj interface{})
func (*TFExtensionController) UpdateTFJob ¶
func (tc *TFExtensionController) UpdateTFJob(_, newObj interface{})
Click to show internal directories.
Click to hide internal directories.