Skip to content

Commit 8600a6a

Browse files
authored
Merge pull request #30291 from alculquicondor/patch-2
Fix whitespace in pod topology spread constraints page
2 parents bc785b9 + 1061e7f commit 8600a6a

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

content/en/docs/concepts/workloads/pods/pod-topology-spread-constraints.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -236,41 +236,41 @@ The scheduler will skip the non-matching nodes from the skew calculations if the
236236

237237
Suppose you have a 5-node cluster ranging from zoneA to zoneC:
238238

239-
{{<mermaid>}}
240-
graph BT
241-
subgraph "zoneB"
242-
p3(Pod) --> n3(Node3)
243-
n4(Node4)
244-
end
245-
subgraph "zoneA"
246-
p1(Pod) --> n1(Node1)
247-
p2(Pod) --> n2(Node2)
248-
end
239+
{{<mermaid>}}
240+
graph BT
241+
subgraph "zoneB"
242+
p3(Pod) --> n3(Node3)
243+
n4(Node4)
244+
end
245+
subgraph "zoneA"
246+
p1(Pod) --> n1(Node1)
247+
p2(Pod) --> n2(Node2)
248+
end
249249

250-
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
251-
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
252-
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
253-
class n1,n2,n3,n4,p1,p2,p3 k8s;
254-
class p4 plain;
255-
class zoneA,zoneB cluster;
256-
{{< /mermaid >}}
250+
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
251+
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
252+
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
253+
class n1,n2,n3,n4,p1,p2,p3 k8s;
254+
class p4 plain;
255+
class zoneA,zoneB cluster;
256+
{{< /mermaid >}}
257257

258-
{{<mermaid>}}
259-
graph BT
260-
subgraph "zoneC"
261-
n5(Node5)
262-
end
258+
{{<mermaid>}}
259+
graph BT
260+
subgraph "zoneC"
261+
n5(Node5)
262+
end
263263

264-
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
265-
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
266-
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
267-
class n5 k8s;
268-
class zoneC cluster;
269-
{{< /mermaid >}}
264+
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
265+
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
266+
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
267+
class n5 k8s;
268+
class zoneC cluster;
269+
{{< /mermaid >}}
270270

271271
and you know that "zoneC" must be excluded. In this case, you can compose the yaml as below, so that "mypod" will be placed onto "zoneB" instead of "zoneC". Similarly `spec.nodeSelector` is also respected.
272272

273-
{{< codenew file="pods/topology-spread-constraints/one-constraint-with-nodeaffinity.yaml" >}}
273+
{{< codenew file="pods/topology-spread-constraints/one-constraint-with-nodeaffinity.yaml" >}}
274274

275275
The scheduler doesn't have prior knowledge of all the zones or other topology domains that a cluster has. They are determined from the existing nodes in the cluster. This could lead to a problem in autoscaled clusters, when a node pool (or node group) is scaled to zero nodes and the user is expecting them to scale up, because, in this case, those topology domains won't be considered until there is at least one node in them.
276276

0 commit comments

Comments
 (0)