π Description
pkg/hub/controllers/cluster/reconciler.go, updateDashboardCreds (lines 506β571) reads credentials via sa.Secrets[0].Name. The ServiceAccount.Secrets field was deprecated in Kubernetes 1.22 and removed in 1.24. In modern clusters this field is always empty, causing updateDashboardCreds to return an error "ServiceAccount has no secret" on every reconcile.
π Reproduction steps
- Run the operator against a Kubernetes 1.24+ cluster.
- Observe
Error getting service account secret: ServiceAccount has no secret in logs on every cluster reconcile until the dashboard is manually disabled.
π Expected behavior
Dashboard credentials should be fetched by listing secrets with the kubernetes.io/service-account.name annotation, or the feature should be gated behind a capability check.
π Actual Behavior
Dashboard credential update always fails on Kubernetes 1.24+, generating an error event and blocking the reconcile early return.
π Relevant log output
Version
No response
π₯οΈ What operating system are you seeing the problem on?
No response
β
Proposed Solution
Use r.MeshClient.List to find secrets annotated with kubernetes.io/service-account.name=kubeslice-kubernetes-dashboard instead of reading sa.Secrets.
π Have you spent some time to check if this issue has been raised before?
Code of Conduct
π Description
pkg/hub/controllers/cluster/reconciler.go,updateDashboardCreds(lines 506β571) reads credentials viasa.Secrets[0].Name. TheServiceAccount.Secretsfield was deprecated in Kubernetes 1.22 and removed in 1.24. In modern clusters this field is always empty, causingupdateDashboardCredsto return an error"ServiceAccount has no secret"on every reconcile.π Reproduction steps
Error getting service account secret: ServiceAccount has no secretin logs on every cluster reconcile until the dashboard is manually disabled.π Expected behavior
Dashboard credentials should be fetched by listing secrets with the
kubernetes.io/service-account.nameannotation, or the feature should be gated behind a capability check.π Actual Behavior
Dashboard credential update always fails on Kubernetes 1.24+, generating an error event and blocking the reconcile early return.
π Relevant log output
Version
No response
π₯οΈ What operating system are you seeing the problem on?
No response
β Proposed Solution
Use
r.MeshClient.Listto find secrets annotated withkubernetes.io/service-account.name=kubeslice-kubernetes-dashboardinstead of readingsa.Secrets.π Have you spent some time to check if this issue has been raised before?
Code of Conduct