We have local data and upstreamRef
- use apiserver db to serve the apis -> load into apistore from commit ref
We assume the upstream reference is loaded, if not it needs to be processed first
- load apis, reconcilers, libraries, input to apiserver db from files
- apis
- internal/embedded apis() -> cannot be deleted -> not exposed in the apiextension server
- dynamic apis()
- we only allow file based api definitions
- issue with api based definitions ? need to add a dynamic reconciler that updates the APIStore construct (for simplicity we removed this option)
- What if someone tries to delete an api from the apiserver??? Do we block it with a flag ??
- How do we detect an api change
- On startup, read api(s) from db and compare with local api files and upsteam refs -> anything that is not needed cleanup
- We also need to cleanup the data associated with the api
- we only allow file based api definitions
- reconcilers
- On startup, read reconcilers(s) from db and compare with local api files and upsteam refs -> anything that is not needed cleanup
- libraries
- input
- upstream reference
we set an annotation
- source: file, upstreamref, nothing if it came from the api