Skip to content

Conversation

@eusebiu-constantin-petu-dbk
Copy link
Collaborator

@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk commented Aug 16, 2022

closes #268, closes #698

Signed-off-by: Petu Eusebiu [email protected]

What does this PR do / Why do we need it:

  • added a http handler to GET current zot config or POST a new one

  • only admins can GET/POST configs

  • after zot successfully starts its server it will back up the current configuration

  • after a POST config, zot will validate it and restart the server with the new configuration if the server crashes because of config errors zot will restore the config to the last backup. (not anymore)

  • the config file which zot starts with is the single source of configuration and it will always reflect the current configuration of a running zot.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the api_config_reload branch 2 times, most recently from b01598f to c4a8343 Compare August 16, 2022 14:49
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk marked this pull request as ready for review August 16, 2022 14:49
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the api_config_reload branch 6 times, most recently from 19df363 to b8eeb82 Compare August 19, 2022 12:02
@codecov
Copy link

codecov bot commented Aug 19, 2022

Codecov Report

❌ Patch coverage is 94.91803% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.85%. Comparing base (2d877aa) to head (8efbe56).
⚠️ Report is 768 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cli/config_reloader.go 80.95% 8 Missing and 4 partials ⚠️
pkg/api/config/loader.go 92.00% 8 Missing and 2 partials ⚠️
pkg/cli/root.go 72.41% 6 Missing and 2 partials ⚠️
pkg/api/authn.go 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #729      +/-   ##
==========================================
+ Coverage   88.75%   88.85%   +0.10%     
==========================================
  Files          73       77       +4     
  Lines       13847    14009     +162     
==========================================
+ Hits        12290    12448     +158     
- Misses       1212     1215       +3     
- Partials      345      346       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the api_config_reload branch 15 times, most recently from d117f37 to 4925a11 Compare September 1, 2022 16:32
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the api_config_reload branch 3 times, most recently from d870f38 to 4bc9813 Compare September 7, 2022 16:37
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the api_config_reload branch 3 times, most recently from 0422c39 to 48b0b95 Compare September 26, 2022 09:01
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the api_config_reload branch 3 times, most recently from 5f131e9 to 9229444 Compare October 27, 2022 10:14
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk changed the title Added support for changing config via API feat: added support for changing config via API Oct 27, 2022
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the api_config_reload branch 9 times, most recently from 630b3bf to ffa9e91 Compare October 28, 2022 12:16
@github-actions
Copy link

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zot should expose the current configuration using an API call support configuration change using API calls

3 participants