{"record":{"id":"fdbdae9a32877d89","repo":"cilium/cilium","slug":"s-use-s","errorCode":null,"errorMessage":"%s (use %s)","messagePattern":"(.+?) \\(use (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"operator/cmd/flags.go","lineNumber":109,"sourceCode":"\t\trecommendInstead := func() string {\n\t\t\tswitch ipamFlagValue {\n\t\t\tcase ipamOption.IPAMENI:\n\t\t\t\treturn \"cilium-operator-aws\"\n\t\t\tcase ipamOption.IPAMAzure:\n\t\t\t\treturn \"cilium-operator-azure\"\n\t\t\tcase ipamOption.IPAMAlibabaCloud:\n\t\t\t\treturn \"cilium-operator-alibabacloud\"\n\t\t\tcase ipamOption.IPAMKubernetes, ipamOption.IPAMClusterPool, ipamOption.IPAMCRD:\n\t\t\t\treturn \"cilium-operator-generic\"\n\t\t\tdefault:\n\t\t\t\treturn \"\"\n\t\t\t}\n\t\t}\n\n\t\tunsupporterErr := func() error {\n\t\t\terrMsg := fmt.Sprintf(\"%s doesn't support --%s=%s\", binaryName, option.IPAM, ipamFlagValue)\n\t\t\tif recommendation := recommendInstead(); recommendation != \"\" {\n\t\t\t\treturn fmt.Errorf(\"%s (use %s)\", errMsg, recommendation)\n\t\t\t}\n\t\t\treturn errors.New(errMsg)\n\t\t}\n\n\t\tswitch binaryName {\n\t\tcase \"cilium-operator\":\n\t\t\tif recommendation := recommendInstead(); recommendation != \"\" {\n\t\t\t\tlogger.Warn(fmt.Sprintf(\"cilium-operator will be deprecated in the future, for --%s=%s use %s as it has lower memory footprint\", option.IPAM, ipamFlagValue, recommendation))\n\t\t\t}\n\t\tcase \"cilium-operator-aws\":\n\t\t\tif ipamFlagValue != ipamOption.IPAMENI {\n\t\t\t\treturn unsupporterErr()\n\t\t\t}\n\t\tcase \"cilium-operator-azure\":\n\t\t\tif ipamFlagValue != ipamOption.IPAMAzure {\n\t\t\t\treturn unsupporterErr()\n\t\t\t}\n\t\tcase \"cilium-operator-alibabacloud\":","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/operator/cmd/flags.go#L91-L127","documentation":"The cilium-operator CLI validates the --ipam flag against the modes supported by the selected binary; when the requested IPAM mode is unsupported it builds \"<binary> doesn't support --ipam=<value>\" and appends \" (use <recommended>)\" when a replacement mode can be recommended. It is a configuration-time validation error from cmd/flags.go, thrown before the operator starts.","triggerScenarios":"Starting cilium-operator (or a variant like clustermesh-apiserver) with --ipam set to a mode the binary doesn't handle, e.g. cilium-operator-generic with a k8s-specific IPAM mode such as \"cilium-block-cidr\" or an ENI/Azure mode on the wrong binary.","commonSituations":"Copying Helm/manifest flags between operator variants (cilium-operator vs cilium-operator-generic) after changing cloud or IPAM mode; upgrading Cilium and a flag value was renamed or became binary-specific; hand-edited DaemonSet args.","solutions":["Use the recommended IPAM mode from the error message (e.g. switch to \"cluster-pool\" or \"kubernetes\")","Run the correct operator binary for the environment: cloud-specific IPAM modes require the cloud-enabled cilium-operator image, not the generic one","Fix the operator Deployment/flags in your Helm values or manifests and redeploy","Check Cilium version docs for supported --ipam values if upgrading changed the accepted set"],"exampleFix":"// before\nargs: [\"cilium-operator-generic\", \"--ipam=cilium-block-cidr\"]\n// after\nargs: [\"cilium-operator-generic\", \"--ipam=kubernetes\"]","handlingStrategy":"validation","validationCode":"validIPAM := map[string]bool{\"kubernetes\": true, \"cluster-pool\": true, \"eni\": true, \"azure\": true}\nmode := flags.IPAM\nbinary := \"cilium-operator-generic\" // or cilium-operator\nif !validIPAM[mode] || (binary == \"cilium-operator-generic\" && mode != \"kubernetes\" && mode != \"cluster-pool\") {\n\treturn fmt.Errorf(\"%s doesn't support --ipam=%s\", binary, mode)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Render operator args from Helm values rather than hand-editing DaemonSet manifests","Match the operator image variant (generic vs cloud-specific) to the IPAM mode","Diff operator flags after Cilium upgrades against the release notes","Smoke-test operator startup in CI with the exact flag set"],"tags":["cli","flags","ipam","cilium-operator","config"],"backgroundTag":"invalid-cli-flag-value","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}