mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Make "Unschedulable" reason a constant in api
This commit is contained in:
		@@ -1225,6 +1225,9 @@ const (
 | 
				
			|||||||
	PodReady PodConditionType = "Ready"
 | 
						PodReady PodConditionType = "Ready"
 | 
				
			||||||
	// PodInitialized means that all init containers in the pod have started successfully.
 | 
						// PodInitialized means that all init containers in the pod have started successfully.
 | 
				
			||||||
	PodInitialized PodConditionType = "Initialized"
 | 
						PodInitialized PodConditionType = "Initialized"
 | 
				
			||||||
 | 
						// PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler
 | 
				
			||||||
 | 
						// can't schedule the pod right now, for example due to insufficient resources in the cluster.
 | 
				
			||||||
 | 
						PodReasonUnschedulable = "Unschedulable"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type PodCondition struct {
 | 
					type PodCondition struct {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1439,6 +1439,9 @@ const (
 | 
				
			|||||||
	// PodReady means the pod is able to service requests and should be added to the
 | 
						// PodReady means the pod is able to service requests and should be added to the
 | 
				
			||||||
	// load balancing pools of all matching services.
 | 
						// load balancing pools of all matching services.
 | 
				
			||||||
	PodReady PodConditionType = "Ready"
 | 
						PodReady PodConditionType = "Ready"
 | 
				
			||||||
 | 
						// PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler
 | 
				
			||||||
 | 
						// can't schedule the pod right now, for example due to insufficient resources in the cluster.
 | 
				
			||||||
 | 
						PodReasonUnschedulable = "Unschedulable"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// PodCondition contains details for the current condition of this pod.
 | 
					// PodCondition contains details for the current condition of this pod.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -100,7 +100,7 @@ func (s *Scheduler) scheduleOne() {
 | 
				
			|||||||
		s.config.PodConditionUpdater.Update(pod, &api.PodCondition{
 | 
							s.config.PodConditionUpdater.Update(pod, &api.PodCondition{
 | 
				
			||||||
			Type:   api.PodScheduled,
 | 
								Type:   api.PodScheduled,
 | 
				
			||||||
			Status: api.ConditionFalse,
 | 
								Status: api.ConditionFalse,
 | 
				
			||||||
			Reason: "Unschedulable",
 | 
								Reason: api.PodReasonUnschedulable,
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user