mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Apply davidopps comments to TaintController PR
This commit is contained in:
@@ -403,6 +403,9 @@ func DeleteTaint(taints []Taint, taintToDelete *Taint) ([]Taint, bool) {
|
||||
|
||||
// Returns true and list of Tolerations matching all Taints if all are tolerated, or false otherwise.
|
||||
func GetMatchingTolerations(taints []Taint, tolerations []Toleration) (bool, []Toleration) {
|
||||
if len(taints) == 0 {
|
||||
return true, []Toleration{}
|
||||
}
|
||||
if len(tolerations) == 0 && len(taints) > 0 {
|
||||
return false, []Toleration{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user