{"record":{"id":"85c6230df680f336","repo":"kubernetes/kops","slug":"taints-w","errorCode":null,"errorMessage":"taints: %w","messagePattern":"taints: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodeup/pkg/model/kubelet.go","lineNumber":421,"sourceCode":"\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"evictionMinimumReclaim: %w\", err)\n\t}\n\tcc.EvictionMinimumReclaim = evictionMinimumReclaim\n\n\tfeatureGates, err := parseFeatureGates(kubeletConfig.FeatureGates)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"featureGates: %w\", err)\n\t}\n\tcc.FeatureGates = featureGates\n\n\tif kubeletConfig.EnforceNodeAllocatable != \"\" {\n\t\tcc.EnforceNodeAllocatable = strings.Split(kubeletConfig.EnforceNodeAllocatable, \",\")\n\t}\n\n\tfor _, t := range kubeletConfig.Taints {\n\t\ttaint, err := parseTaint(t)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"taints: %w\", err)\n\t\t}\n\t\tcc.RegisterWithTaints = append(cc.RegisterWithTaints, taint)\n\t}\n\n\treturn cc, nil\n}\n\nfunc (b *KubeletBuilder) binaryPath() string {\n\tpath := \"/usr/local/bin\"\n\tif b.Distribution == distributions.DistributionFlatcar {\n\t\tpath = \"/opt/kubernetes/bin\"\n\t}\n\tif b.Distribution == distributions.DistributionContainerOS {\n\t\tpath = \"/home/kubernetes/bin\"\n\t}\n\treturn path\n}\n","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/nodeup/pkg/model/kubelet.go#L403-L439","documentation":"Each entry in kubeletConfig.Taints must be a \"key=value:Effect\" string; parseTaint (via kopsutil.ParseTaint) rejects malformed taints, and the failure is wrapped as \"taints: %w\". Valid effects are NoSchedule, PreferNoSchedule, NoExecute.","triggerScenarios":"kubeletConfiguration loops over spec.kubelet.taints and parseTaint(t) returns an error for a taint string missing '=', ':', or having an invalid effect.","commonSituations":"Writing taints without an effect (\"dedicated=gpu\"), wrong separator order (\"dedicated:gpu=NoSchedule\"), invalid effect names (\"noschedule\" lowercase, \"None\"), or extra colons.","solutions":["Format each taint as key=value:Effect, e.g. dedicated=gpu:NoSchedule","Use only NoSchedule, PreferNoSchedule, or NoExecute as the effect","Fix the specific taint named/wrapped in the error message","Re-run kops update cluster and nodeup"],"exampleFix":"// before\nkubelet:\n  taints:\n    - \"dedicated=gpu\"\n// after\nkubelet:\n  taints:\n    - \"dedicated=gpu:NoSchedule\"","handlingStrategy":"validation","validationCode":"func validTaints(taints []string) error {\n    for _, t := range taints {\n        parts := strings.Split(t, \":\")\n        if len(parts) != 2 || !strings.Contains(parts[0], \"=\") { return fmt.Errorf(\"bad taint %q\", t) }\n        switch parts[1] {\n        case \"NoSchedule\", \"PreferNoSchedule\", \"NoExecute\":\n        default: return fmt.Errorf(\"bad effect %q\", parts[1])\n        }\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"for _, t := range cfg.Taints {\n    if _, err := kopsutil.ParseTaint(t); err != nil {\n        return fmt.Errorf(\"taint %q must be key=value:Effect: %w\", t, err)\n    }\n}","preventionTips":["Always include an effect: key=value:Effect","Use only NoSchedule, PreferNoSchedule, NoExecute","Avoid extra colons or '=' in keys/values"],"tags":["kubelet","taints","config-parsing"],"backgroundTag":"kubelet-taint-format-invalid","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}