Duplicate Tolerations #124881
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
sig/api-machinery
Categorizes an issue or PR as relevant to SIG API Machinery.
sig/architecture
Categorizes an issue or PR as relevant to SIG Architecture.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What would you like to be added?
I have encountered an issue where duplicate tolerations exist within the tolerations array of Kubernetes Deployment YAML. Despite being duplicates, these tolerations are not being ignored as I would have expected, which in my case led to duplicate metric samples produced by the kube-state-metrics.
A validation check within the Kubernetes API server to reject manifests with duplicate tolerations, ensuring adherence to Kubernetes best practices and avoiding potential issues related to duplicate toleration definitions would be great.
The whole thing was noticed after the update to prometheus v2.52.0 which includes a new check for duplicates during the scrape phase. I created the following issue for that prometheus/prometheus#14089
I have meanwhile also created an issue for the kube-state-metrics project requesting some changes in order to tackle such situations in the future. kubernetes/kube-state-metrics#2390
Steps to reproduce:
2.) Check the tolerations of the scheduled pod for instance:
Why is this needed?
Duplicate tolerations are not being ignored and are applied to resources, potentially resulting in unintended behaviors.
The text was updated successfully, but these errors were encountered: