Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #706 from thandayuthapani/master
Browse files Browse the repository at this point in the history
Docs for task-order within Job
  • Loading branch information
k8s-ci-robot authored Apr 14, 2019
2 parents e76aad6 + 5e5e851 commit f2e5f1e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions doc/design/task-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Task Priority within Job

## Introduction

When a workload is presented to kube-batch in the form of jobs or tasks,
kube-batch prioritizes those job/tasks, so job/task with high priority is
handled first. In this doc, we will look into how Tasks within job are prioritized.

## Implementation

Task priority in kube-batch is done by using either of following data

1. Task's Priority given in TaskSpec(i.e. PodSpec as defined in the YAML)
2. Task's Creation time
3. Task's UID

![taskordering](../../doc/images/task_order.png)

If priority plugin in kube-batch is loaded, then priority is decided using
task's priority that will be provided in TaskSpec.
Else it checks for creationTime of tasks. Depending on which task has been created first,
that task will be given high priority. If creationTime is also same,
then UID is compared and then priority is decided.
Binary file added doc/images/task_order.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f2e5f1e

Please sign in to comment.