canonical / hardware-observer-operator

A charm to setup prometheus exporter for IPMI, RedFish and RAID devices from different vendors.
Apache License 2.0
7 stars 14 forks source link

Config changed event handler has unnecessary logic #208

Closed dashmage closed 3 months ago

dashmage commented 4 months ago

The config changed event handler does not need to use stored state and subsequently maintain a set of changed configs and then check which of them changed. This can simply be accomplished by directly parsing the exporter config file for any changes and rendering it again if required. This would allow us to remove the _stored.config dictionary usage and anyone adding a new config option will not have to modify an extra location.