{"record":{"id":"129087ad56678b2c","repo":"tailscale/tailscale","slug":"proxygroup-q-is-of-type-q-but-must-be-of-type-q-129087","errorCode":null,"errorMessage":"ProxyGroup %q is of type %q but must be of type %q","messagePattern":"ProxyGroup %q is of type %q but must be of type %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/k8s-operator/svc-for-pg.go","lineNumber":819,"sourceCode":"\tif err != nil {\n\t\treturn false, fmt.Errorf(\"failed to list EndpointSlices for Service %q: %w\", svc.Name, err)\n\t}\n\tfor _, eps := range epss {\n\t\tfor _, ep := range eps.Endpoints {\n\t\t\tif *ep.Conditions.Ready {\n\t\t\t\treturn true, nil\n\t\t\t}\n\t\t}\n\t}\n\n\tlogger.Debugf(\"could not find any ready Endpoints in EndpointSlice\")\n\treturn false, nil\n}\n\nfunc (r *HAServiceReconciler) validateService(ctx context.Context, svc *corev1.Service, pg *tsapi.ProxyGroup) error {\n\tvar errs []error\n\tif pg.Spec.Type != tsapi.ProxyGroupTypeIngress {\n\t\terrs = append(errs, fmt.Errorf(\"ProxyGroup %q is of type %q but must be of type %q\",\n\t\t\tpg.Name, pg.Spec.Type, tsapi.ProxyGroupTypeIngress))\n\t}\n\tif violations := validateService(svc); len(violations) > 0 {\n\t\terrs = append(errs, fmt.Errorf(\"invalid Service: %s\", strings.Join(violations, \", \")))\n\t}\n\tsvcList := &corev1.ServiceList{}\n\tif err := r.List(ctx, svcList); err != nil {\n\t\terrs = append(errs, fmt.Errorf(\"error listing Services: %w\", err))\n\t\treturn errors.Join(errs...)\n\t}\n\tsvcName := nameForService(svc)\n\tfor _, s := range svcList.Items {\n\t\tif s.UID == svc.UID {\n\t\t\tcontinue\n\t\t}\n\t\t// Only check services managed by the ProxyGroup reconciler. Services\n\t\t// exposed via the single-proxy path in svc.go have their own\n\t\t// hostname tracking and live in a separate per-proxy tailnet","sourceCodeStart":801,"sourceCodeEnd":837,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/cmd/k8s-operator/svc-for-pg.go#L801-L837","documentation":"Error \"ProxyGroup %q is of type %q but must be of type %q\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at cmd/k8s-operator/svc-for-pg.go:819 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":"cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042","analyzedAt":"2026-08-15T19:58:31.583Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}