Documentation ¶
Index ¶
- Constants
- func NewEngine(config appconfig.Engine, logger *zap.Logger) (common.JobEngine, error)
- type BuildImagePackages
- type Engine
- func (e *Engine) Close()
- func (e *Engine) CollectSteps(jobID common.JobIdentity, job *batchv1.Job) []common.Step
- func (e *Engine) ConfigmapAddEvent(obj interface{})
- func (e *Engine) ConvertToNamespace(domain string) string
- func (e *Engine) CreateJob(ctx context.Context, job *common.Job) error
- func (e *Engine) CreateNamespaceIfNeeded(id *common.JobIdentity) error
- func (e *Engine) DeleteJob(ctx context.Context, jobID common.JobIdentity) error
- func (e *Engine) DeleteJobRelatedResource(jobID *common.JobIdentity)
- func (e *Engine) FetchJobStepLog(ctx context.Context, jobID common.JobIdentity, stepName string) (io.ReadCloser, error)
- func (e *Engine) GetClientSet(attrs map[string]string) *kubernetes.Clientset
- func (e *Engine) GetJobEventChannel() <-chan common.JobIdentity
- func (e *Engine) GetJobHandler(task string) (plugins.JobHandler, error)
- func (e *Engine) GetJobStatus(ctx context.Context, job common.Job) (*common.Job, error)
- func (e *Engine) GetKubernetesJobIdentity(job *common.Job, architecture string) common.JobIdentity
- func (e *Engine) GetName() string
- func (e *Engine) GetReloadDirs() []string
- func (e *Engine) GetSupportedJobs() []string
- func (e *Engine) Initialize() error
- func (e *Engine) JobAddEvent(obj interface{})
- func (e *Engine) JobDeleteEvent(obj interface{})
- func (e *Engine) JobUpdateEvent(old interface{}, new interface{})
- func (e *Engine) PodUpdateEvent(old interface{}, new interface{})
- func (e *Engine) Reload()
- func (e *Engine) StartLoop() error
- func (e *Engine) TriggerJobEvent(namespace, name string, annotations map[string]string)
- func (e *Engine) TriggerJobEventOnce(job *batchv1.Job)
Constants ¶
View Source
const ( ArchitectureKey = "architecture" AppLabelKey = "omni-orchestrator" AppLabelValue = "true" AnnotationService = "omni-tag/service" AnnotationDomain = "omni-tag/domain" AnnotationTask = "omni-tag/task" AnnotationArch = "omni-tag/architecture" DefaultSyncInterval = 3 DefaultEventChannel = 200 )
View Source
const (
PluginName = "kubernetes"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildImagePackages ¶
type BuildImagePackages struct {
Packages []string `json:"packages"`
}
type Engine ¶
type Engine struct { sync.Mutex JobWatchMap sync.Map JobPluginMap map[string]plugins.JobHandler // contains filtered or unexported fields }
func (*Engine) CollectSteps ¶
func (*Engine) ConfigmapAddEvent ¶
func (e *Engine) ConfigmapAddEvent(obj interface{})
func (*Engine) ConvertToNamespace ¶
func (*Engine) CreateNamespaceIfNeeded ¶
func (e *Engine) CreateNamespaceIfNeeded(id *common.JobIdentity) error
func (*Engine) DeleteJobRelatedResource ¶
func (e *Engine) DeleteJobRelatedResource(jobID *common.JobIdentity)
func (*Engine) FetchJobStepLog ¶
func (e *Engine) FetchJobStepLog(ctx context.Context, jobID common.JobIdentity, stepName string) (io.ReadCloser, error)
func (*Engine) GetClientSet ¶
func (e *Engine) GetClientSet(attrs map[string]string) *kubernetes.Clientset
func (*Engine) GetJobEventChannel ¶
func (e *Engine) GetJobEventChannel() <-chan common.JobIdentity
func (*Engine) GetJobHandler ¶
func (e *Engine) GetJobHandler(task string) (plugins.JobHandler, error)
func (*Engine) GetJobStatus ¶
func (*Engine) GetKubernetesJobIdentity ¶
func (*Engine) GetReloadDirs ¶
func (*Engine) GetSupportedJobs ¶
func (*Engine) Initialize ¶
func (*Engine) JobAddEvent ¶
func (e *Engine) JobAddEvent(obj interface{})
func (*Engine) JobDeleteEvent ¶
func (e *Engine) JobDeleteEvent(obj interface{})
func (*Engine) JobUpdateEvent ¶
func (e *Engine) JobUpdateEvent(old interface{}, new interface{})
func (*Engine) PodUpdateEvent ¶
func (e *Engine) PodUpdateEvent(old interface{}, new interface{})
func (*Engine) TriggerJobEvent ¶
func (*Engine) TriggerJobEventOnce ¶
Click to show internal directories.
Click to hide internal directories.