Add scheduler monopic architecture diagram
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								contrib/mesos/docs/scheduler.monopic
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								contrib/mesos/docs/scheduler.monopic
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -16,3 +16,58 @@ limitations under the License.
 | 
			
		||||
 | 
			
		||||
// Package scheduler implements the Kubernetes Mesos scheduler.
 | 
			
		||||
package scheduler
 | 
			
		||||
 | 
			
		||||
// Created from contrib/mesos/docs/scheduler.monopic:
 | 
			
		||||
//
 | 
			
		||||
//                     ┌───────────────────────────────────────────────────────────────────────┐
 | 
			
		||||
//                     │                ┌───────────────────────────────────────┐            ┌─┴──────────────────────┐             ┌───────────────┐
 | 
			
		||||
//               ┌─────▼─────┐          │Queuer                                 │  Await()   │       podUpdates       │             │               │
 | 
			
		||||
//               │  updates  │          │- Yield() *api.Pod                     ├──pod CRUD ─▶ (queue.HistoricalFIFO) ◀──reflector──▶pods ListWatch ├──apiserver──▶
 | 
			
		||||
//               └─────▲─────┘          │- Requeue(pod)/Dequeue(id)/Reoffer(pod)│   events   │                        │             │               │
 | 
			
		||||
//                     │                └───────────────────▲───────────────────┘            └───────────┬────────────┘             └───────────────┘
 | 
			
		||||
//                     │                                    │                                            │
 | 
			
		||||
//                     │                                    │                                            │
 | 
			
		||||
//                     └───────────────┐┌───────────────────▲────────────────────▲─────────────────────┐ └───────────────────────┐
 | 
			
		||||
//                                     ││                                        │                     │                         │
 | 
			
		||||
//                 ┌───────────────────┼┼──────────────────────────────────────┐ │ ┌───────────────────┼────────────────┐        │
 | 
			
		||||
//     ┌───────────▼──────────┐┌───────┴┴───────┐   ┌───────────────────┐   ┌──┴─┴─┴──────┐   ┌────────┴────────┐  ┌────▼────────▼─────────────┐
 | 
			
		||||
//     │Binder (task launcher)││Deleter         │   │PodReconciler      │   │SchedulerLoop│   │  ErrorHandler   │  │SchedulerAlgorithm         │
 | 
			
		||||
//     │- Bind(binding)       ││- DeleteOne(pod)│   │- Reconcile(pod)   │   │- Run()      │   │- Error(pod, err)│  │- Schedule(pod) -> NodeName│
 | 
			
		||||
//     │                      ││                │◀──│                   │   │             │──▶│                 │  │                           │
 | 
			
		||||
//     │               ┌─────┐││    ┌─────┐     │   │      ┌─────┐      │   │   ┌─────┐   │   │    ┌─────┐      │  │┌─────┐                    │
 | 
			
		||||
//     └───────────────┤sched├┘└────┤sched├─────┘   └──────┤sched├───▲──┘   └───┤sched├───┘   └────┤sched├──────┘  └┤sched├────────────────────┘
 | 
			
		||||
//                     ├-│││-┴──────┴--││-┴────────────────┴--│--┴───┼──────────┴--│--┴────────────┴-│││-┴──────────┴-│││-┴─────┐    ┌──────────────────────┐
 | 
			
		||||
//                     │ │││           ││                     │      │             │                 │││              │││       │    │                      │
 | 
			
		||||
//                     │ ││└───────────▼┼─────────────────────▼──────┼─────────────▼─────────────────▼┼┼──────────────┘││       │    │   A ──────────▶ B    │
 | 
			
		||||
//                     │ │└─────────────┼────────────────────────────┼─────────────┼──────────────────▼┼───────────────┘│       │    │                      │
 | 
			
		||||
//                     │ │              │                            │             │                  │└──────────┐     │       │    │  A has a reference   │
 | 
			
		||||
//                     │ │              │                            │             │                  │           │     │       │    │   on B and calls B   │
 | 
			
		||||
//                     │ │              │         ╲   │   │   │   ╱  │             │                  │         ┌─▼─────▼──────┐│    │                      │
 | 
			
		||||
//                     │ │              │          ╲  └┐  │  ┌┘  ╱   │             │                  │         │PodScheduler()││    └──────────────────────┘
 | 
			
		||||
//                     │ │              │           ╲  │  │  │  ╱    │             │                  │         └─┼─────┬──────┘│
 | 
			
		||||
//                     │ │              │            ╲ └┐ │ ┌┘ ╱     │             │                  │         ┌─┼─────▼───────┴────────────────┐
 | 
			
		||||
//                     │┌▼────────────┐┌▼──────────┐┌─▼─▼─▼─▼─▼─┐┌───┴────────┐┌───▼───┐         ┌────▼───┐     │ │        podScheduler          │
 | 
			
		||||
//                     ││LaunchTask(t)││KillTask(t)││sync.Mutex ││reconcile(t)││Tasks()│         │Offers()│     │ │  (e.g. fcfsPodScheduler)     │
 | 
			
		||||
//                     │└──────┬──────┘└─────┬─────┘└───────────┘└────────▲───┘└───┬───┘         └────┬───┘     │ │                              │
 | 
			
		||||
//                     │       │             │                            │        │                  │         │ │scheduleOne(pod, offers ...)  │
 | 
			
		||||
//                     │       │             └──────────────────┐         │    ┌───▼────────────┐     │         │ │   ┌──────────────────────────┤
 | 
			
		||||
//                     │       └──────────────────────────────┐ │         │    │podtask.Registry│     │         │ │   │    allocationStrategy    │
 | 
			
		||||
//                     │                                      │ │         │    └────────────────┘     │         │ └───┼────▶ - FitPredicate      │
 | 
			
		||||
//                     │                                      │ │         │                           │         │     │      - Procurement       │
 | 
			
		||||
//                     │Scheduler                             │ └──────┐  │                           │         └─────┴─────────┬────────────────┘
 | 
			
		||||
//                     └──────────────────────────────────────┼────────┼─┬│----┬──────────────────────┼─────────────────────────┘
 | 
			
		||||
//                     ┌──────────────────────────────────────┼────────┼─┤sched├──────────────────────┼─────────────────────────┐
 | 
			
		||||
//                     │Framework                             │        │ └─────┘                 ┌────▼───┐                     │
 | 
			
		||||
//                     │                               ┌──────▼──────┐┌▼──────────┐              │Offers()│                     │
 | 
			
		||||
//                     │                               │LaunchTask(t)││KillTask(t)│              └────┬───┘                     │
 | 
			
		||||
//                     │                               └─────────┬───┘└──────┬────┘          ┌────────▼───────┐                 │
 | 
			
		||||
//                     │implements: mesos-go/scheduler.Scheduler └───────────▼               │offers.Registry │                 │
 | 
			
		||||
//                     │                                                     │               └────────────────┘                 │
 | 
			
		||||
//                     │                        ┌─────────────────┐       ┌──▼─────────────┐                                    │
 | 
			
		||||
//                     └────────────────────────┤                 ├───────┤     Mesos      ├────────────────────────────────────┘
 | 
			
		||||
//                                              │ TasksReconciler │       │   Scheduler    │
 | 
			
		||||
//                                              │                 ├───────▶     Driver     │
 | 
			
		||||
//                                              └─────────────────┘       └────────┬───────┘
 | 
			
		||||
//                                                                                 │
 | 
			
		||||
//                                                                                 │
 | 
			
		||||
//                                                                                 ▼
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user