integr8ly / application-monitoring-operator

Operator for installing the Application Monitoring Stack on OpenShift (Prometheus, AlertManager, Grafana)
Apache License 2.0
30 stars 44 forks source link

Reconcile additional scrape config #73

Closed pb82 closed 5 years ago

pb82 commented 5 years ago

Watch the integreatly additional scrape config secret for modifications and update the prometheus config accordingly.

Verification steps:

  1. deploy the operator from this branch or use the 0.0.21 tag
  2. Deploy a monitoring stack
  3. 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)
  4. Make sure the monitoring stack has been deployed successfully
  5. Check the secret additional-scrape-config: it should have all the entries from integreatly-additional-scrape-config.
  6. Create a backup of integreatly-additional-scrape-config and delete it (the secret, not the backup)
  7. Check additional-scrape-config: the contents from the integreatly secret should be gone.
  8. There should be a message in the log saying that a delete event for the secret was received
  9. Create the secret from the backup and make sure it's contents are added again to additional-scrape-config
  10. Uninstall the monitoring stack by removing the applicationmonitoring CR
  11. Make sure there is a log saying stop watching for additional scrape config
  12. Deploy it again without restarting the operator
  13. Make sure the secret watch still works (by modifying or deleting the integreatly secret)