zot icon indicating copy to clipboard operation
zot copied to clipboard

support configuration change using API calls

Open andaaron opened this issue 4 years ago • 3 comments

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.

andaaron avatar Nov 04 '21 16:11 andaaron

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/<>

rchincha avatar Jun 05 '22 03:06 rchincha

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

rchincha avatar Jun 09 '22 11:06 rchincha

In review.

andaaron avatar Nov 09 '22 08:11 andaaron