Change:
This is a Bug Report <!-- Thanks for filing an issue! Before submitting, please fill in the following information. --<!-- See for guidance on writing an actionable issue description. --<!--Required Information--Problem: has a diagram, but it doesn't use Kubernetes colors. Proposed Solution: Copy the colors from an example in and then apply those colors to the items in the diagram. Page to Update: /priority backlog
/triage accepted
/assign

Discussion:
only when a Pod is created (either by the client, or mutated during admission). After creation, each schedulingGate can be removed in arbitrary order, but addition of a new scheduling gate is disallowed. <del> {{<mermaid>}} stateDiagram-v2 s1: pod created s2: pod scheduling gated s3: pod scheduling ready s4: pod running if: empty scheduling gates? [*] --> s1 s1 --> if s2 --> if: scheduling gate removed if --> s2: no if --> s3: yes s3 --> s4 s4 --> [*] {{< /mermaid >}} </del> <ins> {{< figure src="/docs/images/podSchedulingGates.svg" alt="pod-scheduling-gates-diagram" caption="Figure. Pod SchedulingGates" class="diagram-large" link="https://mermaid.live/edit#pako:eNplkktTwyAUhf8KgzuHWpukaYszutGlK3caFxQuCVMCGSDVTKf_XfKyPlhxz4HDB9wT5lYAptgHFuBRsdKxenFMClMYFIdfUdRYgbiD6ItJTEbR8wpEq5UpUfnDTf-5cbPoJjcbXdcaE61RVJIiqJvQ_Y30D-OCt-t3tFjcR5wZayiVnIGmkv4NiEfX9jijKTmmRH5jf0sRugOP0HyHUc1m6KGMFP27cM28fwSJDluPpNKaXqVJzmFNfHD2APRKSjnNFx9KhIpmzSfhVls3eHdTRrwG8QnxKfEZUUNeYTDBNbiaKRF_5dSfX-BQQQ0FpnEqQLJWhwIX5hyXsjbYl85wTINrgeC2EZd_xFQy7b_VJ6GCdd-itkxALE84dE3fAqXyIUZya6Qqe711OspVCI2ny2Vv35QqVO3-htt66ZWomAvVcZcv8yTfsiSFfJOydZoKvl_ttjLJVlJsblcJw-czwQ0zr9ZeqGDgeR77b2jD8xdtjtDn" >}} </ins> ## Usage example To mark a Pod not-ready for scheduling, you can create it with one or more scheduling gates like this:

<ins> <svg aria-roledescription="stateDiagram" viewBox="0 0 410.99609375 474" style="max-width: 100%;" class="statediagram" xmlns="http://www.w3.org/2000/svg" width="871px" id="graph-div" height="730px" xmlns:xlink="http://www.w3.org/1999/xlink"><style>@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css");'</style><style>#graph-div{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#graph-div .error-icon{fill:#552222;}#graph-div .error-text{fill:#552222;stroke:#552222;}#graph-div .edge-thickness-normal{stroke-width:2px;}#graph-div .edge-thickness-thick{stroke-width:3.5px;}#graph-div .edge-pattern-solid{stroke-dasharray:0;}#graph-div .edge-pattern-dashed{stroke-dasharray:3;}#graph-div .edge-pattern-dotted{stroke-dasharray:2;}#graph-div .marker{fill:#333333;stroke:#333333;}#graph-div .marker.cross{stroke:#333333;}#graph-div svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#graph-div defs #statediagram-barbEnd{fill:#333333;stroke:#333333;}#graph-div g.stateGroup text{fill:#9370DB;stroke:none;font-size:10px;}#graph-div g.stateGroup text{fill:#333;stroke:none;font-size:10px;}#graph-div g.stateGroup .state-title{font-weight:bolder;fill:#131300;}#graph-div g.stateGroup rect{fill:#ECECFF;stroke:#9370DB;}#graph-div g.stateGroup line{stroke:#333333;stroke-width:1;}#graph-div .transition{stroke:#333333;stroke-width:1;fill:none;}#graph-div .stateGroup .composit{fill:white;border-bottom:1px;}#graph-div .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px;}#graph-div .state-note{stroke:#aaaa33;fill:#fff5ad;}#graph-div .state-note text{fill:black;stroke:none;font-size:10px;}#graph-div .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#graph-div .edgeLabel .label rect{fill:#ECECFF;opacity:0.5;}#graph-div .edgeLabel .label text{fill:#333;}#graph-div .label div .edgeLabel{color:#333;}#graph-div .stateLabel text{fill:#131300;font-size:10px;font-weight:bold;}#graph-div .node circle.state-start{fill:#333333;stroke:#333333;}#graph-div .node .fork-join{fill:#333333;stroke:#333333;}#graph-div .node circle.state-end{fill:#326ce5;stroke:white;stroke-width:1.5;}#graph-div .end-state-inner{fill:white;stroke-width:1.5;}#graph-div .node rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#graph-div .node polygon{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#graph-div #statediagram-barbEnd{fill:#333333;}#graph-div .statediagram-cluster rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#graph-div .cluster-label,#graph-div .nodeLabel{color:#131300;}#graph-div .statediagram-cluster rect.outer{rx:5px;ry:5px;}#graph-div .statediagram-state .divider{stroke:#9370DB;}#graph-div .statediagram-state .title-state{rx:5px;ry:5px;}#graph-div .statediagram-cluster.statediagram-cluster .inner{fill:white;}#graph-div .statediagram-cluster.statediagram-cluster-alt .inner{fill:#f0f0f0;}#graph-div .statediagram-cluster .inner{rx:0;ry:0;}#graph-div .statediagram-state rect.basic{rx:5px;ry:5px;}#graph-div .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#f0f0f0;}#graph-div .note-edge{stroke-dasharray:5;}#graph-div .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#graph-div .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#graph-div .statediagram-note text{fill:black;}#graph-div .statediagram-note .nodeLabel{color:black;}#graph-div .statediagram .edgeLabel{color:red;}#graph-div #dependencyStart,#graph-div #dependencyEnd{fill:#333333;stroke:#333333;stroke-width:1;}#graph-div .statediagramTitleText{text-anchor:middle;font-size:18px;fill:#333;}#graph-div :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#graph-div .k8s&gt;*{fill:#326ce5!important;stroke:#fff!important;stroke-width:4px!important;color:#fff!important;}#graph-div .k8s span{fill:#326ce5!important;stroke:#fff!important;stroke-width:4px!important;color:#fff!important;}#graph-div .k8s tspan{fill:#fff!important;}</style><g><defs><marker orient="auto" markerUnits="strokeWidth" markerHeight="14" markerWidth="20" refY="7" refX="19" id="statediagram-barbEnd"><path d="M 19,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><g class="root"><g class="clusters"></g><g class="edgePaths"><path marker-end="url(#statediagram-barbEnd)" style="fill:none" class="edge-thickness-normal transition" id="edge182" d="M150.61328125,22L150.61328125,26.166666666666668C150.61328125,30.333333333333332,150.61328125,38.666666666666664,150.61328125,47C150.61328125,55.333333333333336,150.61328125,63.666666666666664,150.61328125,67.83333333333333L150.61328125,72"></path><path marker-end="url(#statediagram-barbEnd)" style="fill:none" class="edge-thickness-normal transition" id="edge183" d="M150.61328125,111L150.61328125,115.16666666666667C150.61328125,119.33333333333333,150.61328125,127.66666666666667,150.61328125,136C150.61328125,144.33333333333334,150.61328125,152.66666666666666,150.61328125,156.83333333333334L150.61328125,161"></path><path marker-end="url(#statediagram-barbEnd)" style="fill:none" class="edge-thickness-normal transition" id="edge184" d="M111.91983545353982,274L118.36874308628319,267.8333333333333C124.81765071902653,261.6666666666667,137.71546598451326,249.33333333333334,144.16437361725664,237C150.61328125,224.66666666666666,150.61328125,212.33333333333334,150.61328125,206.16666666666666L150.61328125,200"></path><path marker-end="url(#statediagram-barbEnd)" style="fill:none" class="edge-thickness-normal transition" id="edge185" d="M109.82829784292036,200L96.93048257743364,206.16666666666666C84.03266731194691,212.33333333333334,58.237036780973455,224.66666666666666,51.78812914823009,237C45.339221515486734,249.33333333333334,58.237036780973455,261.6666666666667,64.68594441371683,267.8333333333333L71.13485204646018,274"></path><path marker-end="url(#statediagram-barbEnd)" style="fill:none" class="edge-thickness-normal transition" id="edge186" d="M208.9366703539823,200L227.38081904498526,206.16666666666666C245.82496773598822,212.33333333333334,282.7132651179941,224.66666666666666,301.15741380899703,237C319.6015625,249.33333333333334,319.6015625,261.6666666666667,319.6015625,267.8333333333333L319.6015625,274"></path><path marker-end="url(#statediagram-barbEnd)" style="fill:none" class="edge-thickness-normal transition" id="edge187" d="M319.6015625,313L319.6015625,317.1666666666667C319.6015625,321.3333333333333,319.6015625,329.6666666666667,319.6015625,338C319.6015625,346.3333333333333,319.6015625,354.6666666666667,319.6015625,358.8333333333333L319.6015625,363"></path><path marker-end="url(#statediagram-barbEnd)" style="fill:none" class="edge-thickness-normal transition" id="edge188" d="M319.6015625,402L319.6015625,406.1666666666667C319.6015625,410.3333333333333,319.6015625,418.6666666666667,319.6015625,427C319.6015625,435.3333333333333,319.6015625,443.6666666666667,319.6015625,447.8333333333333L319.6015625,452"></path></g><g class="edgeLabels"><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><rect height="0" width="0" ry="0" rx="0"></rect><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><rect height="0" width="0" ry="0" rx="0"></rect><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g transform="translate(150.61328125, 237)" class="edgeLabel"><g transform="translate(-89.5078125, -12)" class="label"><rect height="24" width="179.015625" ry="0" rx="0"></rect><foreignObject height="24" width="179.015625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">scheduling gate removed</span></div></foreignObject></g></g><g transform="translate(32.44140625, 237)" class="edgeLabel"><g transform="translate(-8.6640625, -12)" class="label"><rect height="24" width="17.328125" ry="0" rx="0"></rect><foreignObject height="24" width="17.328125"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">no</span></div></foreignObject></g></g><g transform="translate(319.6015625, 237)" class="edgeLabel"><g transform="translate(-11.546875, -12)" class="label"><rect height="24" width="23.09375" ry="0" rx="0"></rect><foreignObject height="24" width="23.09375"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel">yes</span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><rect height="0" width="0" ry="0" rx="0"></rect><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><rect height="0" width="0" ry="0" rx="0"></rect><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g></g><g class="nodes"><g transform="translate(150.61328125, 91.5)" id="state-s1-183" class="node k8s statediagram-state"><rect height="39" width="101.4921875" y="-19.5" x="-50.74609375" style="" class="basic label-container"></rect><g transform="translate(-43.24609375, -12)" style="" class="label"><foreignObject height="24" width="86.4921875"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">pod created</span></div></foreignObject></g></g><g transform="translate(91.52734375, 293.5)" id="state-s2-185" class="node k8s statediagram-state"><rect height="39" width="167.0546875" y="-19.5" x="-83.52734375" style="" class="basic label-container"></rect><g transform="translate(-76.02734375, -12)" style="" class="label"><foreignObject height="24" width="152.0546875"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">pod scheduling gated</span></div></foreignObject></g></g><g transform="translate(319.6015625, 293.5)" id="state-s3-187" class="node k8s statediagram-state"><rect height="39" width="166.7890625" y="-19.5" x="-83.39453125" style="" class="basic label-container"></rect><g transform="translate(-75.89453125, -12)" style="" class="label"><foreignObject height="24" width="151.7890625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">pod scheduling ready</span></div></foreignObject></g></g><g transform="translate(319.6015625, 382.5)" id="state-s4-188" class="node k8s statediagram-state"><rect height="39" width="100.015625" y="-19.5" x="-50.0078125" style="" class="basic label-container"></rect><g transform="translate(-42.5078125, -12)" style="" class="label"><foreignObject height="24" width="85.015625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">pod running</span></div></foreignObject></g></g><g transform="translate(150.61328125, 180.5)" id="state-if-186" class="node k8s statediagram-state"><rect height="39" width="189.234375" y="-19.5" x="-94.6171875" style="" class="basic label-container"></rect><g transform="translate(-87.1171875, -12)" style="" class="label"><foreignObject height="24" width="174.234375"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">empty scheduling gates?</span></div></foreignObject></g></g><g transform="translate(150.61328125, 15)" id="state-root_start-182" class="node default"><circle height="14" width="14" r="7" class="state-start"></circle></g><g transform="translate(319.6015625, 459)" id="state-root_end-188" class="node default"><circle height="14" width="14" r="7" class="state-start"></circle><circle height="10" width="10" r="5" class="state-end"></circle></g></g></g></g></svg> </ins>  No newline at end of file