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.
Found while reviewing #556 — pre-existing, unrelated to that PR.
docs/troubleshooting.md:53recommends grantingcustomresourcedefinitions.apiextensions.k8s.io-- get, create, patch -- "for CRDself-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 isthe
servarr-operator crdsubcommand, which prints the CRD YAML to stdout for the user tokubectl applythemselves (main.rs,Commands::Crd => { controller::print_crd()?; ... }) — itnever touches the cluster's
apiextensions.k8s.ioAPI. Grepping the whole operator crate forapiextensions/CustomResourceDefinitionoutside that doc turns up nothing that creates or patches aCRD.
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/patchon 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.