code: func parseTaint(st string) (v1.Taint, error) {
  	var taint v1.Taint
  
  	var key string
  	var value string
  	var effect v1.TaintEffect
  
  	parts := strings.Split(st, ":")
  	switch len(parts) {
  	case 1:
  		key = parts[0]
  	case 2:
  		effect = v1.TaintEffect(parts[1])
  		if err := validateTaintEffect(effect); err != nil {
  			return taint, err
  		}
  
  		partsKV := strings.Split(parts[0], "=")
  		if len(partsKV) > 2 {
  			return taint, fmt.Errorf("invalid taint spec: %v", st)
  		}
  		key = partsKV[0]
  		if len(partsKV) == 2 {
  			value = partsKV[1]
  			if errs := validation.IsValidLabelValue(value); len(errs) > 0 {
  				return taint, fmt.Errorf("invalid taint spec: %v, %s", st, strings.Join(errs, "; "))
  			}
  		}
  	default:
  		return taint, fmt.Errorf("invalid taint spec: %v", st)
  	}
  
  	if errs := validation.IsQualifiedName(key); len(errs) > 0 {
  		return taint, fmt.Errorf("invalid taint spec: %v, %s", st, strings.Join(errs, "; "))
  	}
  
  	taint.Key = key
  	taint.Value = value
  	taint.Effect = effect
  
  	return taint, nil
  }
docs: // parseTaint parses a taint from a string, whose form must be either
  // '<key>=<value>:<effect>', '<key>:<effect>', or '<key>'.