code: func (t *Toleration) ToleratesTaint(taint *Taint) bool {
  	if len(t.Effect) > 0 && t.Effect != taint.Effect {
  		return false
  	}
  
  	if len(t.Key) > 0 && t.Key != taint.Key {
  		return false
  	}
  
  	// TODO: Use proper defaulting when Toleration becomes a field of PodSpec
  	switch t.Operator {
  	// empty operator means Equal
  	case "", TolerationOpEqual:
  		return t.Value == taint.Value
  	case TolerationOpExists:
  		return true
  	default:
  		return false
  	}
  }
docs: // ToleratesTaint checks if the toleration tolerates the taint.
  // The matching follows the rules below:
  // (1) Empty toleration.effect means to match all taint effects,
  //     otherwise taint effect must equal to toleration.effect.
  // (2) If toleration.operator is 'Exists', it means to match all taint values.
  // (3) Empty toleration.key means to match all taint keys.
  //     If toleration.key is empty, toleration.operator must be 'Exists';
  //     this combination means to match all taint values and all taint keys.