{"record":{"id":"082b962246e6a5a6","repo":"derailed/k9s","slug":"s-082b96","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/render/crd.go","lineNumber":114,"sourceCode":"\treturn nil\n}\n\nfunc (CustomResourceDefinition) diagnose(n string, vv []v1.CustomResourceDefinitionVersion) error {\n\tif len(vv) == 0 {\n\t\treturn fmt.Errorf(\"unable to assert CRD servers versions for %s\", n)\n\t}\n\n\tvar (\n\t\tee     []error\n\t\tserved bool\n\t)\n\tfor _, v := range vv {\n\t\tif v.Served {\n\t\t\tserved = true\n\t\t}\n\t\tif v.Deprecated {\n\t\t\tif v.DeprecationWarning != nil {\n\t\t\t\tee = append(ee, fmt.Errorf(\"%s\", *v.DeprecationWarning))\n\t\t\t} else {\n\t\t\t\tee = append(ee, fmt.Errorf(\"%s[%s] is deprecated\", n, v.Name))\n\t\t\t}\n\t\t}\n\t}\n\tif !served {\n\t\tee = append(ee, fmt.Errorf(\"CRD %s is no longer served by the api server\", n))\n\t}\n\n\tif len(ee) == 0 {\n\t\treturn nil\n\t}\n\terrs := make([]string, 0, len(ee))\n\tfor _, e := range ee {\n\t\terrs = append(errs, e.Error())\n\t}\n\n\treturn errors.New(strings.Join(errs, \" - \"))","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/derailed/k9s/blob/2d3ccc6ba2ce98c3781bfc441bb3e884f072774f/internal/render/crd.go#L96-L132","documentation":"Not a failure per se: the CRD diagnose pass-through. When a served CRD version has deprecated: true and a deprecationWarning string set, that warning text is surfaced verbatim as the row status so users see the upstream deprecation reason.","triggerScenarios":"Listing CRDs where an installed operator marked a version deprecated with a custom deprecationWarning, e.g. 'example.com/v1beta1 will be removed in v3.0; migrate to v1'.","commonSituations":"After upgrading operators (cert-manager, prometheus-operator, etc.) that deprecate old API versions with explicit migration warnings.","solutions":["Follow the warning: migrate manifests/CRs off the deprecated version","Bump the operator to a release where the version is either supported or removed cleanly","Treat as informational if you already migrated — suppress by removing the deprecated version from the CRD","Track the operator's release notes for removal timelines"],"exampleFix":"# before\napiVersion: monitoring.example.com/v1beta1\n# after\napiVersion: monitoring.example.com/v1","handlingStrategy":"fallback","validationCode":"for _, v := range crd.Spec.Versions {\n\tif v.Deprecated && v.DeprecationWarning != nil {\n\t\tlog.Printf(\"deprecation: %s\", *v.DeprecationWarning)\n\t}\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Track operator release notes for version removal timelines","Migrate CRs promptly when deprecation warnings appear","Set explicit deprecationWarning text on your own CRDs"],"tags":["crd","deprecation","kubernetes-api"],"backgroundTag":null,"analyzedSha":"2d3ccc6ba2ce98c3781bfc441bb3e884f072774f","analyzedAt":"2026-08-15T16:09:14.432Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}