{"record":{"id":"e17e4dca9d4e20d0","repo":"istio/istio","slug":"cannot-remove-tag-q-cannot-find-mutatingwebhookc","errorCode":null,"errorMessage":"cannot remove tag %q: cannot find MutatingWebhookConfiguration or Service for tag","messagePattern":"cannot remove tag %q: cannot find MutatingWebhookConfiguration or Service for tag","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"istioctl/pkg/tag/tag.go","lineNumber":373,"sourceCode":"\treturn nil\n}\n\n// removeTag removes an existing revision tag.\nfunc removeTag(ctx context.Context, kubeClient kubernetes.Interface, tagName string, skipConfirmation bool, istioNS string, w io.Writer) error {\n\tservices, err := GetServicesWithTag(ctx, kubeClient, istioNS, tagName)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttagServiceExists := len(services) != 0\n\n\twebhooks, err := GetWebhooksWithTag(ctx, kubeClient, tagName)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttagWebhookExists := len(webhooks) != 0\n\n\tif !tagServiceExists && !tagWebhookExists {\n\t\treturn fmt.Errorf(\"cannot remove tag %q: cannot find MutatingWebhookConfiguration or Service for tag\", tagName)\n\t}\n\n\ttaggedNamespaces, err := GetNamespacesWithTag(ctx, kubeClient, tagName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to retrieve namespaces dependent on tag %q\", tagName)\n\t}\n\t// warn user if deleting a tag that still has namespaces pointed to it\n\tif len(taggedNamespaces) > 0 && !skipConfirmation {\n\t\tif !util.Confirm(buildDeleteTagConfirmation(tagName, taggedNamespaces), w) {\n\t\t\tfmt.Fprintf(w, \"Aborting operation.\\n\")\n\t\t\treturn nil\n\t\t}\n\t}\n\n\t// proceed with webhook deletion\n\tif tagWebhookExists {\n\t\terr = DeleteTagWebhooks(ctx, kubeClient, tagName)\n\t\tif err != nil {","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/istio/istio/blob/8dc789c5cf17517c64e3c36cb3288230f149dfae/istioctl/pkg/tag/tag.go#L355-L391","documentation":"Error \"cannot remove tag %q: cannot find MutatingWebhookConfiguration or Service for tag\" thrown in istio/istio.","triggerScenarios":"Thrown at istioctl/pkg/tag/tag.go:373 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"}