An Explanation of MySQl/PostGres Tables Involved in Armory Agent for Kubernetes
Armory Agent for Kubernetes requires an SQL-based database (MySQL/Postgres).
Before starting
Please refer to the following instructions before installing the Agent plugin and the Agent:https://docs.armory.io/armory-enterprise/armory-agent/armory-agent-install/#before-you-begin For instructions on how to enable an SQL-based database for Clouddriver, please refer to:https://docs.armory.io/armory-enterprise/armory-admin/clouddriver-sql-configure/.
Table Structure
The tables involved with the Armory Agent plugin begin with the name kubesvc_%. These tables are all necessary for the functionality of Armory Agent. Below is an example of the tables involved in the Armory Agent operations and the data they contain
mysql> show tables like '%kubesvc%';
+-----------------------------------+
| Tables_in_clouddriver (%kubesvc%) |
+-----------------------------------+
| kubesvc_accounts |
| kubesvc_assignments |
| kubesvc_cache |
| kubesvc_cache_rel |
| kubesvc_ops |
| kubesvc_ops_history |
| kubesvc_resourceversion |
+-----------------------------------+kubesvc_accounts
kubesvc_accounts contains the list of accounts that are onboarded through Agent.
kubesvc_assignments
kubesvc_assignments contains the account, agent pod id and the Clouddriver pod that that the Agent is registered with along with the current status of the connection
kubesvc_cache
kubesvc_cache contains all the objects that Agents have discovered. Querying this table would display all discovered objects. It is advised to query this table with a where condition to limit the output.
kubesvc_cache_rel
kubesvc_cache_rel contains the relations between the discovered objects. For example:A kubernetes deployment would have a relationship to a replicaset that would also have a relationship to a pod. Querying this table would result in all the objects registered, and it is advised to query this table with a where condition to limit the output.
kubesvc_ops
kubesvc_ops contains the status of the live operations before they are moved to kubesvc_ops_history table.
kubesvc_ops_history
kubesvc_ops_history contains the operations history and Clouddriver and the Agents that processed them. The table contains the data returned as an output when invoking the below endpoint. curl -kv http://spin-clouddriver:7002/armory/agent/operations/{opId}
kubesvc_resourceversion
kubesvc_resourceversion contains the resource kinds that Agent caches.
Last updated
Was this helpful?