{"record":{"id":"d45c5507f66e0051","repo":"kubesphere/kubesphere","slug":"resource-s-is-not-supported","errorCode":null,"errorMessage":"resource %s is not supported","messagePattern":"resource (.+?) is not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/models/quotas/quotas.go","lineNumber":73,"sourceCode":"\t\tpersistentvolumeclaimsKey: {Group: \"\", Version: \"v1\", Kind: \"PersistentVolumeClaimList\"},\n\t\tingressKey:                {Group: \"networking.k8s.io\", Version: \"v1\", Kind: \"IngressList\"},\n\t\tjobsKey:                   {Group: \"batch\", Version: \"v1\", Kind: \"JobList\"},\n\t\tcronJobsKey:               {Group: \"batch\", Version: \"v1\", Kind: \"CronJobList\"},\n\t}\n\tif k8sutil.ServeBatchV1beta1(k8sVersion) {\n\t\tcronJobs := supportedResources[cronJobsKey]\n\t\tcronJobs.Version = \"v1beta1\"\n\t\tsupportedResources[cronJobsKey] = cronJobs\n\t}\n\n\treturn &resourceQuotaGetter{client: client, supportedResources: supportedResources}\n}\n\nfunc (c *resourceQuotaGetter) getUsage(namespace, resource string) (int, error) {\n\tvar obj runtimeclient.ObjectList\n\tgvk, ok := c.supportedResources[resource]\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"resource %s is not supported\", resource)\n\t}\n\n\tif c.client.Scheme().Recognizes(gvk) {\n\t\tgvkObject, err := c.client.Scheme().New(gvk)\n\t\tif err != nil {\n\t\t\treturn 0, nil\n\t\t}\n\t\tobj = gvkObject.(runtimeclient.ObjectList)\n\t} else {\n\t\tu := &unstructured.UnstructuredList{}\n\t\tu.SetGroupVersionKind(gvk)\n\t\tobj = u\n\t}\n\n\tif err := c.client.List(context.Background(), obj, runtimeclient.InNamespace(namespace)); err != nil {\n\t\treturn 0, err\n\t}\n","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/kubesphere/kubesphere/blob/04a29b5c601470fa6bc2f2e92358dcb802a0d414/pkg/models/quotas/quotas.go#L55-L91","documentation":"resourceQuotaGetter.getUsage guard: the requested quota resource key (e.g. a specific resource name in a ResourceQuota spec) is not present in the supportedResources map of listable resource types built at construction (with version adjustments for the cluster's K8s version). The unsupported resource name is included in the message.","triggerScenarios":"Thrown at pkg/models/quotas/quotas.go:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unsupported resource from the quota request or use one of the supported keys (pods, deployments, services, etc.)","Extend the supportedResources map if the cluster genuinely provides that resource","Check for typos/pluralization in the resource key"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"04a29b5c601470fa6bc2f2e92358dcb802a0d414","analyzedAt":"2026-09-03T18:33:15.017Z","contentChangedAt":"2026-09-03T18:33:15.017Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}