The upgrade migration added in v1.12.0 needs get on namespaces, but the classifier controller RBAC (config/rbac/role.yaml, mirrored into the helm chart) does not grant it. The migrate initContainer crash-loops and classifier-manager never becomes Ready.
Where
migration.go Gets the namespace of each matching cluster:
return fmt.Errorf("checking namespace %s: %w", d.ref.Namespace, err)
This runs for e.g. a management-cluster SveltosCluster registered in its own namespace (agent.managementCluster=true).
Symptom
main.go:291] "migration failed" err="migrating classifier default-classifier:
checking namespace <ns>: namespaces \"<ns>\" is forbidden:
User \"system:serviceaccount:projectsveltos:classifier-manager\" cannot get
resource \"namespaces\" in API group \"\" in the namespace \"<ns>\""
classifier-manager Deployment then reports ProgressDeadlineExceeded; any Argo/Flux app wrapping it stays Degraded.
Root cause
classifier-manager-role grants no namespaces verb. It needs, on the core ("") group:
resources: [namespaces], verbs: [get, list, watch]
Fix
Add the kubebuilder RBAC marker where the migration/reconciler reads namespaces so it propagates to config/rbac/role.yaml on make manifests:
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
I opened a chart-side stopgap so consumers are unblocked now: projectsveltos/helm-charts#199 — but it will be re-dropped on the next chart regen unless the marker lands here.
Repro
Install chart 1.12.1 with agent.managementCluster=true, let the mgmt SveltosCluster register, observe the classifier-manager migrate initContainer crash-loop.
The upgrade migration added in v1.12.0 needs
getonnamespaces, but the classifier controller RBAC (config/rbac/role.yaml, mirrored into the helm chart) does not grant it. ThemigrateinitContainer crash-loops andclassifier-managernever becomes Ready.Where
migration.goGets the namespace of each matching cluster:This runs for e.g. a management-cluster
SveltosClusterregistered in its own namespace (agent.managementCluster=true).Symptom
classifier-managerDeployment then reportsProgressDeadlineExceeded; any Argo/Flux app wrapping it stays Degraded.Root cause
classifier-manager-rolegrants nonamespacesverb. It needs, on the core ("") group:Fix
Add the kubebuilder RBAC marker where the migration/reconciler reads namespaces so it propagates to
config/rbac/role.yamlonmake manifests:// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watchI opened a chart-side stopgap so consumers are unblocked now: projectsveltos/helm-charts#199 — but it will be re-dropped on the next chart regen unless the marker lands here.
Repro
Install chart 1.12.1 with
agent.managementCluster=true, let the mgmt SveltosCluster register, observe theclassifier-managermigrate initContainer crash-loop.