Documentation ¶
Index ¶
- Constants
- func BuildDcosConstraints(enable bool, labels map[string]string, preserveProjects map[string]struct{}, ...) [][]string
- func CreateInnerSecretIfNotExist(cs kubernetes.Interface, sourceNs, targetNs, secretName string) (bool, error)
- func FollowContinue(initialOpts *metav1.ListOptions, ...) error
- func GenTolerations() []apiv1.Toleration
- func GenerateK8SVolumes(job *apistructs.JobFromUser, clusterInfo ...apistructs.ClusterInfoData) ([]corev1.Volume, []corev1.VolumeMount, []*corev1.PersistentVolumeClaim)
- func GetAndSetTokenAuth(client *httpclient.HTTPClient, executorName string)
- func GetBigDataConf(task *spec.PipelineTask) (apistructs.BigdataConf, error)
- func GetDNSPolicy(podNetwork apistructs.PodNetwork) corev1.DNSPolicy
- func GetPullImagePolicy() corev1.PullPolicy
- func GetScheduleInfo(cluster apistructs.ClusterInfo, executorName, executorKind string, ...) (apistructs.ScheduleInfo2, apistructs.ScheduleInfo, error)
- func JudgeExistedByStatus(statusDesc apistructs.PipelineStatusDesc) (created bool, started bool, err error)
- func MakeJobLabelSelector(task *spec.PipelineTask) string
- func MakeJobName(task *spec.PipelineTask) string
- func MakeVolume(task *spec.PipelineTask) []diceyml.Volume
- func ParseJobHostBindTemplate(hostPath string, clusterInfo apistructs.ClusterInfoData) (string, error)
- func PrintTaskInfo(task *spec.PipelineTask) string
- func SearchEvents(client corev1client.EventsGetter, objOrRef runtime.Object) (*corev1.EventList, error)
- func TransferStatus(status string) apistructs.PipelineStatus
- func TransferToSchedulerJob(task *spec.PipelineTask) (job apistructs.JobFromUser, err error)
- func ValidateAction(action *spec.PipelineTask) error
- func WhichStorageClass(tp string, vendor string) string
- type ErrorWrapper
Constants ¶
View Source
const (
DefaultEventsLimit = 5
)
Variables ¶
This section is empty.
Functions ¶
func BuildDcosConstraints ¶
func CreateInnerSecretIfNotExist ¶
func CreateInnerSecretIfNotExist(cs kubernetes.Interface, sourceNs, targetNs, secretName string) (bool, error)
func FollowContinue ¶
func FollowContinue(initialOpts *metav1.ListOptions, listFunc func(metav1.ListOptions) (runtime.Object, error)) error
func GenTolerations ¶
func GenTolerations() []apiv1.Toleration
func GenerateK8SVolumes ¶
func GenerateK8SVolumes(job *apistructs.JobFromUser, clusterInfo ...apistructs.ClusterInfoData) ([]corev1.Volume, []corev1.VolumeMount, []*corev1.PersistentVolumeClaim)
GenerateK8SVolumes According to job configuration, production volume related configuration
func GetAndSetTokenAuth ¶
func GetAndSetTokenAuth(client *httpclient.HTTPClient, executorName string)
GetAndSetTokenAuth call this in goroutine
func GetBigDataConf ¶
func GetBigDataConf(task *spec.PipelineTask) (apistructs.BigdataConf, error)
func GetDNSPolicy ¶
func GetDNSPolicy(podNetwork apistructs.PodNetwork) corev1.DNSPolicy
func GetPullImagePolicy ¶
func GetPullImagePolicy() corev1.PullPolicy
GetPullImagePolicy specify Image Pull Policy with IfNotPresent,Always,Never
func GetScheduleInfo ¶
func GetScheduleInfo(cluster apistructs.ClusterInfo, executorName, executorKind string, jobFromUser apistructs.JobFromUser) (apistructs.ScheduleInfo2, apistructs.ScheduleInfo, error)
func JudgeExistedByStatus ¶
func JudgeExistedByStatus(statusDesc apistructs.PipelineStatusDesc) (created bool, started bool, err error)
func MakeJobLabelSelector ¶
func MakeJobLabelSelector(task *spec.PipelineTask) string
MakeJobLabelSelector return LabelSelector like job-name=pipeline-1.pipeline-task-1
func MakeJobName ¶
func MakeJobName(task *spec.PipelineTask) string
func MakeVolume ¶
func MakeVolume(task *spec.PipelineTask) []diceyml.Volume
func ParseJobHostBindTemplate ¶
func ParseJobHostBindTemplate(hostPath string, clusterInfo apistructs.ClusterInfoData) (string, error)
ParseJobHostBindTemplate Analyze the hostPath template and convert it to the cluster info value
func PrintTaskInfo ¶
func PrintTaskInfo(task *spec.PipelineTask) string
func SearchEvents ¶
func SearchEvents(client corev1client.EventsGetter, objOrRef runtime.Object) (*corev1.EventList, error)
SearchEvents finds events about the specified object.
func TransferStatus ¶
func TransferStatus(status string) apistructs.PipelineStatus
func TransferToSchedulerJob ¶
func TransferToSchedulerJob(task *spec.PipelineTask) (job apistructs.JobFromUser, err error)
func ValidateAction ¶
func ValidateAction(action *spec.PipelineTask) error
func WhichStorageClass ¶
Types ¶
type ErrorWrapper ¶
type ErrorWrapper struct {
// contains filtered or unexported fields
}
func NewErrorWrapper ¶
func NewErrorWrapper(name string) *ErrorWrapper
func (*ErrorWrapper) WrapTaskError ¶
func (e *ErrorWrapper) WrapTaskError(err *error, op string, task *spec.PipelineTask)
Click to show internal directories.
Click to hide internal directories.