WHAT Create a centralised configuration file/object to store all config values for the operator. WHY Currently there are different configuration values placed in every part of the operator. This makes it very hard to change these values in the future. If we create a config object which will store these values in a central location, the operator will become much more maintainable. Not all of these values need to be changeable at runtime. It can be mixed on a case-by-case basis to limit what can be altered by the person installing the operator. HOW There are two ways we could do this. File with constants Pros
- Quick to make changes
- Smaller file (by line numbers)
- Can use environment variables
Cons
- Less scalable
- Harder to write tests
Configuration object Pros
- Easy to maintain
- Values can be logically grouped together, OOP style.
- We already have a tried and tested working example
- Can use environment variables
Cons
|