Skip to content

docs/troubleshooting.md describes CRD auto-registration that doesn't exist #563

Description

@phaedrus1992

Found while reviewing #556 — pre-existing, unrelated to that PR.

docs/troubleshooting.md:53 recommends granting
customresourcedefinitions.apiextensions.k8s.io -- get, create, patch -- "for CRD
self-registration", and a few lines below says "The operator auto-registers the CRD on startup, but
if RBAC blocks that, install it manually."

There's no such code. crates/servarr-operator/src/main.rs's only apiextensions-adjacent behavior is
the servarr-operator crd subcommand, which prints the CRD YAML to stdout for the user to
kubectl apply themselves (main.rs, Commands::Crd => { controller::print_crd()?; ... }) — it
never touches the cluster's apiextensions.k8s.io API. Grepping the whole operator crate for
apiextensions/CustomResourceDefinition outside that doc turns up nothing that creates or patches a
CRD.

So either this was aspirational documentation for a feature that was never built, or it described a
feature that was since removed. Either way the RBAC guidance is currently wrong twice over: it
recommends create/patch on a cluster-scoped resource the operator never writes to, and the
"auto-registers on startup" troubleshooting step sends someone chasing a problem that doesn't exist.

Fix: either implement CRD auto-registration for real (get+create+patch would then be justified), or
strike both the "auto-registers" troubleshooting step and the create/patch verbs from the doc, leaving
just the manual servarr-operator crd | kubectl apply -f - path that already exists a few lines below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions