{"record":{"id":"2048f13e1f38060b","repo":"kubernetes/kubernetes","slug":"concurrent-statefulset-syncs-must-be-greater-than","errorCode":null,"errorMessage":"concurrent-statefulset-syncs must be greater than 0, but got %d","messagePattern":"concurrent-statefulset-syncs must be greater than 0, but got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kube-controller-manager/app/options/statefulsetcontroller.go","lineNumber":60,"sourceCode":"func (o *StatefulSetControllerOptions) ApplyTo(cfg *statefulsetconfig.StatefulSetControllerConfiguration) error {\n\tif o == nil {\n\t\treturn nil\n\t}\n\n\tcfg.ConcurrentStatefulSetSyncs = o.ConcurrentStatefulSetSyncs\n\n\treturn nil\n}\n\n// Validate checks validation of StatefulSetControllerOptions.\nfunc (o *StatefulSetControllerOptions) Validate() []error {\n\tif o == nil {\n\t\treturn nil\n\t}\n\n\terrs := []error{}\n\tif o.ConcurrentStatefulSetSyncs < 1 {\n\t\terrs = append(errs, fmt.Errorf(\"concurrent-statefulset-syncs must be greater than 0, but got %d\", o.ConcurrentStatefulSetSyncs))\n\t}\n\treturn errs\n}\n","sourceCodeStart":42,"sourceCodeEnd":64,"githubUrl":"https://github.com/kubernetes/kubernetes/blob/b882c60b4023bdf09264c2d5d30a2cadebc240fb/cmd/kube-controller-manager/app/options/statefulsetcontroller.go#L42-L64","documentation":"Thrown by StatefulSetControllerOptions.Validate() when --concurrent-statefulset-syncs (Int32) is <1. The StatefulSet controller reconciles StatefulSets with strict ordinal ordering per worker; zero workers means StatefulSets never advance. Part of the aggregated validation error slice.","triggerScenarios":"Launching KCM with --concurrent-statefulset-syncs=0 or negative, or a StatefulSetControllerConfiguration component-config with concurrentStatefulSetSyncs: 0.","commonSituations":"Operators scaling down KCM on small clusters and crossing zero; misconfigured kustomize/Helm patches that null out the field; attempting to disable statefulsets via sync count instead of --controllers.","solutions":["Set --concurrent-statefulset-syncs to >=1 (default is 5) or remove the flag.","Disable the controller with --controllers=-statefulset if stateful workloads are not used.","Clamp computed concurrency values to a minimum of 1."],"exampleFix":"# before\n--concurrent-statefulset-syncs=0\n# after\n--concurrent-statefulset-syncs=5","handlingStrategy":"validation","validationCode":"if opts.StatefulSetController.ConcurrentStatefulSetSyncs < 1 {\n    return fmt.Errorf(\"concurrent-statefulset-syncs must be >= 1\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Disable statefulsets via --controllers=-statefulset rather than zeroing workers.","Clamp derived worker counts to >=1.","Review Helm/kustomize patches that null out sync fields."],"tags":["kubernetes","go","kube-controller-manager","configuration","validation","statefulset","workloads"],"analyzedSha":"b882c60b4023bdf09264c2d5d30a2cadebc240fb","analyzedAt":"2026-08-07T04:07:48.144Z","schemaVersion":2},"datasetVersion":"2026-08-07T07:17:06.508Z"}