<commit_before>// Module included in the following assemblies:
//
// * nodes/nodes-scheduler-default.adoc

[id="nodes-scheduler-default-predicates_{context}"]
= Understanding the scheduler predicates

Predicates are rules that filter out unqualified nodes.

There are several predicates provided by default in {product-title}. Some of
these predicates can be customized by providing certain parameters. Multiple
predicates can be combined to provide additional filtering of nodes.

[id="static-predicates_{context}"]
== Static Predicates
These predicates do not take any configuration parameters or inputs from the
user. These are specified in the scheduler configuration using their exact
name.

[id="default-predicates_{context}"]
=== Default Predicates

The default scheduler policy includes the following predicates:

The `NoVolumeZoneConflict` predicate checks that the volumes a pod requests
are available in the zone.

[source,yaml]
----
{"name" : "NoVolumeZoneConflict"}
----

The `MaxEBSVolumeCount` predicate checks the maximum number of volumes that can be attached to an AWS instance.

[source,yaml]
----
{"name" : "MaxEBSVolumeCount"}
----

The `MaxAzureDiskVolumeCount` predicate checks the maximum number of Azure Disk Volumes.

[source,yaml]
----
{"name" : "MaxAzureDiskVolumeCount"}
----

The `PodToleratesNodeTaints` predicate checks if a pod can tolerate the node taints.

[source,yaml]
----
{"name" : "PodToleratesNodeTaints"}
----

The `CheckNodeUnschedulable` predicate checks if a pod can be scheduled on a node with `Unschedulable` spec.

[source,yaml]
----
{"name" : "CheckNodeUnschedulable"}
----

The `CheckVolumeBinding` predicate evaluates if a pod can fit based on the volumes, it requests, for both bound and unbound PVCs.

* For PVCs that are bound, the predicate checks that the corresponding PV's node affinity is satisfied by the given node.
* For PVCs that are unbound, the predicate searched for available PVs that can satisfy the PVC requirements and that
the PV node affinity is satisfied by the given node.

The predicate returns true if all bound PVCs have compatible PVs with the node, and if all unbound PVCs can be matched with an available and node-compatible PV.

[source,yaml]
----
{"name" : "CheckVolumeBinding"}
----

// The `CheckVolumeBinding` predicate must be enabled in non-default schedulers.

The `NoDiskConflict` predicate checks if the volume requested by a pod is available.

[source,yaml]
----
{"name" : "NoDiskConflict"}
----

The `MaxGCEPDVolumeCount` predicate checks the maximum number of Google Compute Engine (GCE) Persistent Disks (PD).

[source,yaml]
----
{"name" : "MaxGCEPDVolumeCount"}
----

The `MaxCSIVolumeCount` predicate determines how many Container Storage Interface (CSI) volumes should be attached to a node and whether that number exceeds a configured limit.

[source,yaml]
----
{"name" : "MaxCSIVolumeCount"}
----

The `MatchInterPodAffinity` predicate checks if the pod affinity/anti-affinity rules permit the pod.

[source,yaml]
----
{"name" : "MatchInterPodAffinity"}
----

[id="other-predicates_{context}"]
=== Other Static Predicates

{product-title} also supports the following predicates:

[NOTE]
====
The `CheckNode-*` predicates cannot be used if the Taint Nodes By Condition feature is enabled.
The Taint Nodes By Condition feature is enabled by default.
====

The `CheckNodeCondition` predicate checks if a pod can be scheduled on a node reporting *out of disk*, *network unavailable*, or *not ready* conditions.

[source,yaml]
----
{"name" : "CheckNodeCondition"}
----

The `CheckNodeLabelPresence` predicate checks if all of the specified labels exist on a node, regardless of their value.
<commit_msg>Updates MaxCSIVolumeCount namespace<commit_after>// Module included in the following assemblies:
//
// * nodes/nodes-scheduler-default.adoc

[id="nodes-scheduler-default-predicates_{context}"]
= Understanding the scheduler predicates

Predicates are rules that filter out unqualified nodes.

There are several predicates provided by default in {product-title}. Some of
these predicates can be customized by providing certain parameters. Multiple
predicates can be combined to provide additional filtering of nodes.

[id="static-predicates_{context}"]
== Static Predicates
These predicates do not take any configuration parameters or inputs from the
user. These are specified in the scheduler configuration using their exact
name.

[id="default-predicates_{context}"]
=== Default Predicates

The default scheduler policy includes the following predicates:

The `NoVolumeZoneConflict` predicate checks that the volumes a pod requests
are available in the zone.

[source,yaml]
----
{"name" : "NoVolumeZoneConflict"}
----

The `MaxEBSVolumeCount` predicate checks the maximum number of volumes that can be attached to an AWS instance.

[source,yaml]
----
{"name" : "MaxEBSVolumeCount"}
----

The `MaxAzureDiskVolumeCount` predicate checks the maximum number of Azure Disk Volumes.

[source,yaml]
----
{"name" : "MaxAzureDiskVolumeCount"}
----

The `PodToleratesNodeTaints` predicate checks if a pod can tolerate the node taints.

[source,yaml]
----
{"name" : "PodToleratesNodeTaints"}
----

The `CheckNodeUnschedulable` predicate checks if a pod can be scheduled on a node with `Unschedulable` spec.

[source,yaml]
----
{"name" : "CheckNodeUnschedulable"}
----

The `CheckVolumeBinding` predicate evaluates if a pod can fit based on the volumes, it requests, for both bound and unbound PVCs.

* For PVCs that are bound, the predicate checks that the corresponding PV's node affinity is satisfied by the given node.
* For PVCs that are unbound, the predicate searched for available PVs that can satisfy the PVC requirements and that
the PV node affinity is satisfied by the given node.

The predicate returns true if all bound PVCs have compatible PVs with the node, and if all unbound PVCs can be matched with an available and node-compatible PV.

[source,yaml]
----
{"name" : "CheckVolumeBinding"}
----

// The `CheckVolumeBinding` predicate must be enabled in non-default schedulers.

The `NoDiskConflict` predicate checks if the volume requested by a pod is available.

[source,yaml]
----
{"name" : "NoDiskConflict"}
----

The `MaxGCEPDVolumeCount` predicate checks the maximum number of Google Compute Engine (GCE) Persistent Disks (PD).

[source,yaml]
----
{"name" : "MaxGCEPDVolumeCount"}
----

The `MaxCSIVolumeCountPred` predicate determines how many Container Storage Interface (CSI) volumes should be attached to a node and whether that number exceeds a configured limit.

[source,yaml]
----
{"name" : "MaxCSIVolumeCountPred"}
----

The `MatchInterPodAffinity` predicate checks if the pod affinity/anti-affinity rules permit the pod.

[source,yaml]
----
{"name" : "MatchInterPodAffinity"}
----

[id="other-predicates_{context}"]
=== Other Static Predicates

{product-title} also supports the following predicates:

[NOTE]
====
The `CheckNode-*` predicates cannot be used if the Taint Nodes By Condition feature is enabled.
The Taint Nodes By Condition feature is enabled by default.
====

The `CheckNodeCondition` predicate checks if a pod can be scheduled on a node reporting *out of disk*, *network unavailable*, or *not ready* conditions.

[source,yaml]
----
{"name" : "CheckNodeCondition"}
----

The `CheckNodeLabelPresence` predicate checks if all of the specified labels exist on a node, regardless of their value.

{'fraction_non_alphanumeric': 0.09671336206896551, 'fraction_numerical': 0.0, 'mean_word_length': 4.612244897959184, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '246263', 'n_tokens_mistral': 2086, 'n_tokens_neox': 1986, 'n_words': 890}