Skip to content

story: Account contains resource counts of logical cluster #373

Description

@FWuermse

User Story

As a portal user,
I want the Account search index to include counts of resources/members bound to an account
so that I can see at a glance how many resources of each type an account owns, and filter or sort accounts by those counts.

Solution Path

Count fields should follow the same pattern as existing synthetic fields (But only for Accounts) such as account_fga_object and workspace_path. They are computed at reconcile time inside Process() in indexable_resource_watcher.go, injected directly into filterable_fields on the document, and registered by name in DefaultFilterableFields so that apibinding_watcher.go automatically includes them in SearchIndex.Spec.FilterableFields and the OpenSearch index mapping gets the correct field type.

Open Question

Should counts be updated on countable resource reconcile, Account reconcile or both?

Acceptance Criteria

  • Each Account resource contains counts of preconfigured "Citizen Resources" and member counts as int
  • Non-Account resources never contain counts of sub resources
  • Via static configuration users can choose which custom resources should be counted
  • Counts are updated upon reconcile

Parent Epic

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    No status
    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions