support configuration change using API calls
Currently the zot sync configuration can be changes only by modifying the zot configuration file. We should implement an API to update this sync configuration, so other service can modify it while zot is running.
At a minimum we should be able to specify what images and tags we need to sync for a given registry.
Originally for some specific parts of the configuration, but should really be generally be applicable.
This can be a mgmt "extension".
POST, PUT /v2/_zot/mgmt/<>
IMO, this feature should be designed as a "config" extension [1]
When a user wants to know if this is a zot that can dynamically update mgmt via APIs, then GET /v2/_oci/ext/discover should return /v2/_zot/ext/config in the supported extensions list.
A user can assume /v2/_zot/ext/config and interact with it directly.
A user can GET /v2/_zot/ext/config/ to get the current configuration POST /v2/_zot/ext/config/ to do a full POST of configuration PATCH /v2/_zot/ext/config/ to patch specific sections of configuration
Before applying any config changes: Validate config Evaluate impact Permissions, authN, authZ
References: [1] https://github.com/opencontainers/distribution-spec/tree/main/extensions
In review.