Configure Operator dynamically from the REST API
Problem to solve
Currently the operator can be installed and upgraded only using helm chart. There is a mechanism to install the operator using a YAML file but in such case the installation can no longer be upgraded properly.
We need a mechanism that allow to install StackGres properly from any medium (YAML, helm, kustomizer, etc.) and also to allow a dynamic configuration to be performed from the Kubernetes API, StackGres REST API.
Proposal
Create an installer / upgrader that is capable of detecting change in the configuration and upgrade the operator on the fly without disrupting functionality (except in some cases like version upgrade or certificate upgrade).
Create a REST API endpoint that allow to read and change a global configuration of the operator.
The installer's corner cases should be documented properly:
- During upgrade of the operator version the clusters functionality may be interrupted
- During upgrade of the certificated the clusters functionality may be interrupted
Testing
- Check that the installer is able to install everything from scratch
- Check that the installer is able to upgrade any configuration parameter
- Check that the installer provide a default configuration (like current helm)
- Check that the installer interfere the minimum possible with the running clusters while updating things (expect some corner cases like upgrading the operator version)
- Check REST API endpoint is able to read the configuration
- Check REST API endpoint is able to write and validate the configuration
Acceptance Criteria
- Implement the installer
- Test installer
- Implement the REST API
- Test REST API