Skip to content

In-memory clusterGroups map loses all state on server restart diverging from Kubernetes labels permanently #7013

@aashu2006

Description

@aashu2006

User Request

Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 9276255f-4cbe-4f3e-88ab-a240f6558541

Description

What happened:
In pkg/api/handlers/workloads.go:367-371, all cluster groups are stored exclusively in a process-local map with no disk persistence. On server restart, the map resets to empty while Kubernetes labels applied by previous operations survive. After restart, group definitions are gone — no further label updates can be made and DeleteClusterGroup can never clean up labels because the group list is empty.

What I expected:
Cluster group definitions should be persisted to the database or a Kubernetes ConfigMap so they survive server restarts.

Steps to reproduce:

  1. Create cluster groups via the API
  2. Restart the server
  3. Observe all cluster groups are gone but Kubernetes labels remain
  4. Observe DeleteClusterGroup cannot clean up the orphaned labels

This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedai-processingAI is currently processing this issuekind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.triage/neededNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions