{"record":{"id":"00119864f31e5919","repo":"istio/istio","slug":"failed-to-create-injection-webhook-v","errorCode":null,"errorMessage":"failed to create injection webhook: %v","messagePattern":"failed to create injection webhook: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pilot/pkg/bootstrap/sidecarinjector.go","lineNumber":88,"sourceCode":"\t\twatcher = inject.NewConfigMapWatcher(s.kubeClient, args.Namespace, configMapName, \"config\", \"values\")\n\t} else {\n\t\tlog.Infof(\"Skipping sidecar injector, template not found\")\n\t\treturn nil, nil\n\t}\n\n\tlog.Info(\"initializing sidecar injector\")\n\n\tparameters := inject.WebhookParameters{\n\t\tWatcher:      watcher,\n\t\tEnv:          s.environment,\n\t\tMux:          s.httpsMux,\n\t\tRevision:     args.Revision,\n\t\tMultiCluster: s.multiclusterController,\n\t}\n\n\twh, err := inject.NewWebhook(parameters)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create injection webhook: %v\", err)\n\t}\n\t// Patch cert if a webhook config name is provided.\n\t// This requires RBAC permissions - a low-priv Istiod should not attempt to patch but rely on\n\t// operator or CI/CD\n\tif features.InjectionWebhookConfigName != \"\" {\n\t\ts.addStartFunc(\"injection patcher\", func(stop <-chan struct{}) error {\n\t\t\t// No leader election - different istiod revisions will patch their own cert.\n\t\t\t// update webhook configuration by watching the cabundle\n\t\t\tpatcher, err := webhooks.NewWebhookCertPatcher(s.kubeClient, args.Revision, webhookName, s.istiodCertBundleWatcher)\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"failed to create webhook cert patcher: %v\", err)\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tgo patcher.Run(stop)\n\t\t\treturn nil\n\t\t})\n\t}","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/istio/istio/blob/8dc789c5cf17517c64e3c36cb3288230f149dfae/pilot/pkg/bootstrap/sidecarinjector.go#L70-L106","documentation":"Error \"failed to create injection webhook: %v\" thrown in istio/istio.","triggerScenarios":"Thrown at pilot/pkg/bootstrap/sidecarinjector.go:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8dc789c5cf17517c64e3c36cb3288230f149dfae","analyzedAt":"2026-08-15T15:16:55.434Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}