1.7 KiB
1.7 KiB
- 101: TECHINICAL How works a hierarchical data lookup?
- Query a key
- Can be a simple string or complex data
- Can be anything in json compatible
- Kheops will resolve query in 2 parts:
- It will first look in different locations the key. It is usually files, but it can also be an url or anything. The queried data must be a valid json data type (TOFIX: So it works also for yaml, toml .... it supports anyconfig )
- Example: The
pathstrategy will allow you to target
- Example: The
- Then it will process all results and load a strategy to resolve which results to keep.
Example: The
laststrategy consists in keeping always the last result while themergestrategy consists in merging inteligentelly data. This is quite useful for dict or lists.
- It will first look in different locations the key. It is usually files, but it can also be an url or anything. The queried data must be a valid json data type (TOFIX: So it works also for yaml, toml .... it supports anyconfig )
- Lookup data in a tree of files
- Goes sequentially according the backends list
- Backend/Engine list is modular
- Engine Plugin: Jerakia/HIera/Ansible/Curl
- Backend Plugin: loop/hier
- All result are returned, and then the rules are applied
- Rules match to a key and apply a strategy (essentially determine if and how the different value are merged or replaced). It can also apply filter to the result and modify its content (future).
- Then it returns the result
- Goes sequentially according the backends list
- Use cases
- Ansible integration
- Generic SOT
- Rest API (Future)
- More !!!!
- Query a key