Commit e3067f32 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #34634 from mwielgus/pod-unschedulable

Automatic merge from submit-queue Make "Unschedulable" reason a constant in api String "Unschedulable" is used in couple places in K8S: * scheduler * federation replicaset and deployment controllers * cluster autoscaler * rescheduler This PR makes the string a part of API so it not changed. cc: @davidopp @fgrzadkowski @wojtek-t
parents b81336c6 859077b7
......@@ -1423,6 +1423,9 @@ const (
PodReady PodConditionType = "Ready"
// PodInitialized means that all init containers in the pod have started successfully.
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 {
......
......@@ -1630,6 +1630,9 @@ const (
// PodReady means the pod is able to service requests and should be added to the
// load balancing pools of all matching services.
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.
......
......@@ -100,7 +100,7 @@ func (s *Scheduler) scheduleOne() {
s.config.PodConditionUpdater.Update(pod, &api.PodCondition{
Type: api.PodScheduled,
Status: api.ConditionFalse,
Reason: "Unschedulable",
Reason: api.PodReasonUnschedulable,
})
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment