Documentation
¶
Index ¶
- func Create(resource interface{}, gvk schema.GroupVersionKind, ...) error
- func Delete(namespace string, name string, gvk schema.GroupVersionKind, ...) error
- func Get(namespace string, name string, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error)
- func GetPodGroupName(jobID string) string
- func KubePriorityClass(priority string) string
- func NewKubeJob(job *api.PFJob, dynamicClientOpt *k8s.DynamicClientOption) (api.PFJobInterface, error)
- func Patch(namespace, name string, gvk schema.GroupVersionKind, data []byte, ...) error
- func Update(resource interface{}, gvk schema.GroupVersionKind, ...) error
- type JobModeParams
- type KubeJob
- type KubeJobInterface
- type PaddleJob
- type SingleJob
- type SparkJob
- type VCJob
- type WorkflowJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(resource interface{}, gvk schema.GroupVersionKind, clientOpt *k8s.DynamicClientOption) error
func Delete ¶
func Delete(namespace string, name string, gvk schema.GroupVersionKind, clientOpt *k8s.DynamicClientOption) error
func Get ¶
func Get(namespace string, name string, gvk schema.GroupVersionKind, clientOpt *k8s.DynamicClientOption) (*unstructured.Unstructured, error)
func GetPodGroupName ¶ added in v0.14.3
func KubePriorityClass ¶ added in v0.14.3
func NewKubeJob ¶
func NewKubeJob(job *api.PFJob, dynamicClientOpt *k8s.DynamicClientOption) (api.PFJobInterface, error)
func Patch ¶
func Patch(namespace, name string, gvk schema.GroupVersionKind, data []byte, clientOpt *k8s.DynamicClientOption) error
func Update ¶
func Update(resource interface{}, gvk schema.GroupVersionKind, clientOpt *k8s.DynamicClientOption) error
Types ¶
type JobModeParams ¶
type JobModeParams struct {
JobFlavour string // flavour of job in pod or collective mode
CollectiveJobReplicas string // parameters for Collective job
PServerReplicas string // server.replicas or driver.replicas of job
PServerFlavour string // server.flavour or driver.flavour of job
PServerCommand string // server.command or driver.command of job
WorkerReplicas string // worker.replicas or executor.replicas of job
WorkerFlavour string // worker.flavour or executor.flavour of job
WorkerCommand string // worker.command or executor.command of job
}
JobModeParams records the parameters related to job mode
type KubeJob ¶
type KubeJob struct {
ID string
// Name the name of job on kubernetes
Name string
Namespace string
JobType schema.JobType
JobMode string
Image string
Command string
Env map[string]string
VolumeName string // deprecated
PVCName string // deprecated
Priority string
QueueName string
Labels map[string]string
Annotations map[string]string
// 存储资源
FileSystems []schema.FileSystem
// job framework
Framework schema.Framework
// YamlTemplateContent indicate template content of job
YamlTemplateContent []byte
IsCustomYaml bool
Tasks []models.Member
GroupVersionKind kubeschema.GroupVersionKind
DynamicClientOption *k8s.DynamicClientOption
}
func (*KubeJob) StopJobByID ¶
type KubeJobInterface ¶
type KubeJobInterface interface {
// contains filtered or unexported methods
}
KubeJobInterface define methods for create kubernetes job
type SingleJob ¶
SingleJob is a executor struct that runs a single pod
func (*SingleJob) StopJobByID ¶
StopJobByID stops a job by jobID
type SparkJob ¶
type SparkJob struct {
KubeJob
SparkMainFile string
SparkMainClass string
SparkArguments string
DriverFlavour string
ExecutorFlavour string
ExecutorReplicas string
}
SparkJob is the executor for spark job
func (*SparkJob) StopJobByID ¶
StopJobByID stops a job by jobID
type WorkflowJob ¶
type WorkflowJob struct {
KubeJob
}
WorkflowJob is a executor struct that runs a workflow
func (*WorkflowJob) CreateJob ¶
func (wfj *WorkflowJob) CreateJob() (string, error)
func (*WorkflowJob) StopJobByID ¶
func (wfj *WorkflowJob) StopJobByID(jobID string) error
Click to show internal directories.
Click to hide internal directories.