controllers

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterSpec

type ClusterSpec map[string][]string

type MarsConfig

type MarsConfig struct {
	Cluster ClusterSpec `json:"cluster"`
	Task    TaskSpec    `json:"task"`
}

MarsConfig is a struct representing the distributed Mars config. see https://github.com/mars-project/mars/issues/1458 for details.

type MarsJobReconciler

type MarsJobReconciler struct {
	client.Client

	utilruntime.EmptyScaleImpl
	// contains filtered or unexported fields
}

func (*MarsJobReconciler) ControllerName

func (r *MarsJobReconciler) ControllerName() string

func (*MarsJobReconciler) DeleteJob

func (r *MarsJobReconciler) DeleteJob(job interface{}) error

func (*MarsJobReconciler) GetAPIGroupVersion

func (r *MarsJobReconciler) GetAPIGroupVersion() schema.GroupVersion

func (*MarsJobReconciler) GetAPIGroupVersionKind

func (r *MarsJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind

func (*MarsJobReconciler) GetDefaultContainerName

func (r *MarsJobReconciler) GetDefaultContainerName() string

func (*MarsJobReconciler) GetDefaultContainerPortName

func (r *MarsJobReconciler) GetDefaultContainerPortName() string

func (*MarsJobReconciler) GetDefaultContainerPortNumber

func (r *MarsJobReconciler) GetDefaultContainerPortNumber() int32

func (*MarsJobReconciler) GetGroupNameLabelValue

func (r *MarsJobReconciler) GetGroupNameLabelValue() string

func (*MarsJobReconciler) GetJobFromAPIClient

func (r *MarsJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)

func (*MarsJobReconciler) GetJobFromInformerCache

func (r *MarsJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)

func (*MarsJobReconciler) GetNodeForModelOutput added in v0.4.0

func (r *MarsJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)

func (*MarsJobReconciler) GetPodsForJob

func (r *MarsJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)

func (*MarsJobReconciler) GetReconcileOrders

func (r *MarsJobReconciler) GetReconcileOrders() []v1.ReplicaType

func (*MarsJobReconciler) GetServicesForJob

func (r *MarsJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)

func (*MarsJobReconciler) IsMasterRole

func (r *MarsJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool

func (*MarsJobReconciler) Reconcile

func (r *MarsJobReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)

func (*MarsJobReconciler) SetClusterSpec

func (r *MarsJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error

func (*MarsJobReconciler) SetupWithManager

func (r *MarsJobReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*MarsJobReconciler) UpdateJobStatus

func (r *MarsJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error

func (*MarsJobReconciler) UpdateJobStatusInApiServer

func (r *MarsJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error

type TaskSpec

type TaskSpec struct {
	Type      string          `json:"type"`
	Index     int             `json:"index"`
	Resources *workerResource `json:"resources,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL