Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func GetPortFromXGBoostJob(job *v1xgboost.XGBoostJob, rtype v1xgboost.XGBoostJobReplicaType) (int32, error)
- func SetPodEnv(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
- type FakeWorkQueue
- func (f *FakeWorkQueue) Add(item interface{})
- func (f *FakeWorkQueue) AddAfter(item interface{}, duration time.Duration)
- func (f *FakeWorkQueue) AddRateLimited(item interface{})
- func (f *FakeWorkQueue) Done(item interface{})
- func (f *FakeWorkQueue) Forget(item interface{})
- func (f *FakeWorkQueue) Get() (item interface{}, shutdown bool)
- func (f *FakeWorkQueue) Len() int
- func (f *FakeWorkQueue) NumRequeues(item interface{}) int
- func (f *FakeWorkQueue) ShutDown()
- func (f *FakeWorkQueue) ShuttingDown() bool
- type ReconcileXGBoostJob
- func (r *ReconcileXGBoostJob) ControllerName() string
- func (r *ReconcileXGBoostJob) DeleteJob(job interface{}) error
- func (r *ReconcileXGBoostJob) GetAPIGroupVersion() schema.GroupVersion
- func (r *ReconcileXGBoostJob) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (r *ReconcileXGBoostJob) GetDefaultContainerName() string
- func (r *ReconcileXGBoostJob) GetDefaultContainerPortName() string
- func (r *ReconcileXGBoostJob) GetGroupNameLabelValue() string
- func (r *ReconcileXGBoostJob) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (r *ReconcileXGBoostJob) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (r *ReconcileXGBoostJob) GetJobRoleKey() string
- func (r *ReconcileXGBoostJob) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
- func (r *ReconcileXGBoostJob) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
- func (r *ReconcileXGBoostJob) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) bool
- func (r *ReconcileXGBoostJob) Reconcile(request reconcile.Request) (reconcile.Result, error)
- func (r *ReconcileXGBoostJob) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
- func (r *ReconcileXGBoostJob) UpdateJobStatus(job interface{}, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) error
- func (r *ReconcileXGBoostJob) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error
Constants ¶
const ( FailedDeleteJobReason = "FailedDeleteJob" SuccessfulDeleteJobReason = "SuccessfulDeleteJob" )
Reasons for job events.
const RecommendedKubeConfigPathEnv = "KUBECONFIG"
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new XGBoostJob Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func GetPortFromXGBoostJob ¶
func GetPortFromXGBoostJob(job *v1xgboost.XGBoostJob, rtype v1xgboost.XGBoostJobReplicaType) (int32, error)
GetPortFromXGBoostJob gets the port of xgboost container.
Types ¶
type FakeWorkQueue ¶
type FakeWorkQueue struct{}
FakeWorkQueue implements RateLimitingInterface but actually does nothing.
func (*FakeWorkQueue) AddAfter ¶
func (f *FakeWorkQueue) AddAfter(item interface{}, duration time.Duration)
AddAfter WorkQueue AddAfter method
func (*FakeWorkQueue) AddRateLimited ¶
func (f *FakeWorkQueue) AddRateLimited(item interface{})
AddRateLimited WorkQueue AddRateLimited method
func (*FakeWorkQueue) Done ¶
func (f *FakeWorkQueue) Done(item interface{})
Done WorkQueue Done method
func (*FakeWorkQueue) Forget ¶
func (f *FakeWorkQueue) Forget(item interface{})
Forget WorkQueue Forget method
func (*FakeWorkQueue) Get ¶
func (f *FakeWorkQueue) Get() (item interface{}, shutdown bool)
Get WorkQueue Get method
func (*FakeWorkQueue) NumRequeues ¶
func (f *FakeWorkQueue) NumRequeues(item interface{}) int
NumRequeues WorkQueue NumRequeues method
func (*FakeWorkQueue) ShutDown ¶
func (f *FakeWorkQueue) ShutDown()
ShutDown WorkQueue ShutDown method
func (*FakeWorkQueue) ShuttingDown ¶
func (f *FakeWorkQueue) ShuttingDown() bool
ShuttingDown WorkQueue ShuttingDown method
type ReconcileXGBoostJob ¶
type ReconcileXGBoostJob struct { common.JobController client.Client // contains filtered or unexported fields }
ReconcileXGBoostJob reconciles a XGBoostJob object
func (*ReconcileXGBoostJob) ControllerName ¶
func (r *ReconcileXGBoostJob) ControllerName() string
func (*ReconcileXGBoostJob) DeleteJob ¶
func (r *ReconcileXGBoostJob) DeleteJob(job interface{}) error
DeleteJob deletes the job
func (*ReconcileXGBoostJob) GetAPIGroupVersion ¶
func (r *ReconcileXGBoostJob) GetAPIGroupVersion() schema.GroupVersion
func (*ReconcileXGBoostJob) GetAPIGroupVersionKind ¶
func (r *ReconcileXGBoostJob) GetAPIGroupVersionKind() schema.GroupVersionKind
func (*ReconcileXGBoostJob) GetDefaultContainerName ¶
func (r *ReconcileXGBoostJob) GetDefaultContainerName() string
func (*ReconcileXGBoostJob) GetDefaultContainerPortName ¶
func (r *ReconcileXGBoostJob) GetDefaultContainerPortName() string
func (*ReconcileXGBoostJob) GetGroupNameLabelValue ¶
func (r *ReconcileXGBoostJob) GetGroupNameLabelValue() string
func (*ReconcileXGBoostJob) GetJobFromAPIClient ¶
func (r *ReconcileXGBoostJob) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
GetJobFromAPIClient returns the Job from API server
func (*ReconcileXGBoostJob) GetJobFromInformerCache ¶
func (r *ReconcileXGBoostJob) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
GetJobFromInformerCache returns the Job from Informer Cache
func (*ReconcileXGBoostJob) GetJobRoleKey ¶
func (r *ReconcileXGBoostJob) GetJobRoleKey() string
func (*ReconcileXGBoostJob) GetPodsForJob ¶
func (r *ReconcileXGBoostJob) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
GetPodsForJob returns the pods managed by the job. This can be achieved by selecting pods using label key "job-name" i.e. all pods created by the job will come with label "job-name" = <this_job_name>
func (*ReconcileXGBoostJob) GetServicesForJob ¶
func (r *ReconcileXGBoostJob) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
GetServicesForJob returns the services managed by the job. This can be achieved by selecting services using label key "job-name" i.e. all services created by the job will come with label "job-name" = <this_job_name>
func (*ReconcileXGBoostJob) IsMasterRole ¶
func (r *ReconcileXGBoostJob) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, rtype commonv1.ReplicaType, index int) bool
func (*ReconcileXGBoostJob) Reconcile ¶
Reconcile reads that state of the cluster for a XGBoostJob object and makes changes based on the state read and what is in the XGBoostJob.Spec a Deployment as an example Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch +kubebuilder:rbac:groups=xgboostjob.kubeflow.org,resources=xgboostjobs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=xgboostjob.kubeflow.org,resources=xgboostjobs/status,verbs=get;update;patch
func (*ReconcileXGBoostJob) SetClusterSpec ¶
func (r *ReconcileXGBoostJob) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
SetClusterSpec sets the cluster spec for the pod
func (*ReconcileXGBoostJob) UpdateJobStatus ¶
func (r *ReconcileXGBoostJob) UpdateJobStatus(job interface{}, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, jobStatus *commonv1.JobStatus) error
UpdateJobStatus updates the job status and job conditions
func (*ReconcileXGBoostJob) UpdateJobStatusInApiServer ¶
func (r *ReconcileXGBoostJob) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error
UpdateJobStatusInApiServer updates the job status in to cluster.