[kg] Create chatops command for managing knowledge graph enabled table

Problem to solve

As we're building the Knowledge Graph, we need the service to be able to recognize enabled namespaces for the indexing process.

Proposed solution

Implement a solution based on zoekt to track enabled namespace.

  • Create the PostgreSQL table that tracks which root namespaces have access to the Knowledge Graph. This table will be the source of truth for namespace access control.
  • Create an admin endpoint that allows to enable a namespace for the Knowledge Graph. Example: POST api/v4/admin/knowledge-graph/namespaces/:id.
  • Re-use the existing knowledge_graph_indexing feature flag for the Knowledge Graph related stuff.
  • Create a chatops command to enable the Knowledge Graph to namespaces.

Out of scope for this iteration

  • Create an admin setting to automatically add all top-level namespaces to that table (for SM & Dedicated customers). This is out of scope for now since we're focused on getting this feature out to .com first.
  • Having a worker for creating and removing the records in that table based on the namespace license and trial statuses.
Edited by Jean-Gabriel Doyon