Watch the integreatly additional scrape config secret for modifications and update the prometheus config accordingly.
Verification steps:
deploy the operator from this branch or use the 0.0.21 tag
Deploy a monitoring stack
Make sure that a secret integreatly-additional-scrape-config is in the namespace and has the label monitoring-key=middleware (we only watch secrets with this label)
Make sure the monitoring stack has been deployed successfully
Check the secret additional-scrape-config: it should have all the entries from integreatly-additional-scrape-config.
Create a backup of integreatly-additional-scrape-config and delete it (the secret, not the backup)
Check additional-scrape-config: the contents from the integreatly secret should be gone.
There should be a message in the log saying that a delete event for the secret was received
Create the secret from the backup and make sure it's contents are added again to additional-scrape-config
Uninstall the monitoring stack by removing the applicationmonitoring CR
Make sure there is a log saying stop watching for additional scrape config
Deploy it again without restarting the operator
Make sure the secret watch still works (by modifying or deleting the integreatly secret)
Watch the integreatly additional scrape config secret for modifications and update the prometheus config accordingly.
Verification steps:
integreatly-additional-scrape-config
is in the namespace and has the labelmonitoring-key=middleware
(we only watch secrets with this label)additional-scrape-config
: it should have all the entries fromintegreatly-additional-scrape-config
.integreatly-additional-scrape-config
and delete it (the secret, not the backup)additional-scrape-config
: the contents from the integreatly secret should be gone.additional-scrape-config
stop watching for additional scrape config