-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node selector / Node affinity behavior is inconsistent with Kubernetes Scheduler #1957
Comments
nonylene
changed the title
Node selector / Node affinity behavior is inconsistent with Kubernetes
Node selector / Node affinity behavior is inconsistent with Kubernetes Scheduler
Feb 1, 2024
nonylene
added a commit
to nonylene/sonobuoy
that referenced
this issue
Feb 5, 2024
Align node filter behavior with Kuberntes scheduler to avoid errors when both of nodeSelctor and nodeAffinity are set to PodSpec. > If you specify both nodeSelector and nodeAffinity, both must be satisfied for the Pod to be scheduled onto a node. > > https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ Issue: vmware-tanzu#1957 Signed-off-by: nonylene <nonylene@gmail.com>
nonylene
added a commit
to nonylene/sonobuoy
that referenced
this issue
Feb 5, 2024
Align nodeAffinity matching behavior with Kubernetes schduler. > If you specify multiple expressions in a single matchExpressions field associated with a term in nodeSelectorTerms, then the Pod can be scheduled onto a node only if all the expressions are satisfied (expressions are ANDed). > > https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ Close vmware-tanzu#1957 Signed-off-by: nonylene <nonylene@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
a: b
andc: d
a: b
DaemonSet
driverCase X
Case Y
On our environment, node A is the Fargate node and node B is the normal node. DaemonSets cannot run on Fargate nodes, resulting the plugin always fails with
No pod aws scheduleded on node A
error.What did you expect to happen:
Sonobuoy should not count the node A as an available node.
This issue is caused by inconsistency in handling
nodeSelector
andnodeAffinity
between Kubernetes Scheduler and Sonobuoy.Case X: Kubernetes schedules a Pod on a node that satisfies both
nodeSelector
andnodeAffinity
.Currently Sonobuoy performs like
OR
ofnodeSelector
andnodeAffinity
code.Case Y: In Kubernetes, match expressions in a single
matchExpressions
field are ANDed.Currently Sonobuoy counts a node as available if at least one expression is matched code.
Environment:
kubectl version
): Confirmed with multiple versions, 1.25~1.27/etc/os-release
): n/aThe text was updated successfully, but these errors were encountered: