Allow to set secrets using prepare scripts #17498
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
core.secret
optioncore.xsrf_token
optionjobservice.secret
optionSigned-off-by: Dmitry G [email protected]
These configuration options are supported by Helm chart, but they were not available for docker-compose setup.
This change allows to share the same secrets between multiple instances of Harbor. To maintain high availability we would like to run several instances of Harbor that share the same external database, redis and storage. While these external components work fine for HA setup, the core and jobservice secrets and XSRF token being different between applications do not allow to properly run Harbor.
When using only one instance of Harbor, it requires about 30 seconds to restart docker-compose application and the whole registry becomes unreachable. We use Chef for automation of Harbor installation, configuration and updates (chef cookbook to be released soon), so when configuration is changed, that single instance of Harbor becomes unavailable during restart.
Currently prepare scripts can only generate random secrets for every install. Using shared secrets would allow to use a set of applications for high availability.
This change is not breaking. If the options are not specified, they will be automatically generated the same way as before. Also, configuration keys are named in the same manner as Helm chart values.
Please indicate you've done the following: