Skip to content

Fix monitoring resources create / delete loop

Clemens Beck requested to merge fix-servicemonitor-create-delete-loop into master

What does this MR do?

Fix monitoring resources create / delete loop

Metric related objects had no type information set, causing them
to be deleted at the end of the reconciliation loop.

Changelog: fixed

The objects were not created with explicit type information. As a result, they do not match with the K8s live objects GVR, and are marked for deletion.

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Test Plan

  1. install the Operator from master
  2. install prometheus CRDs (https://prometheus-operator.dev/docs/user-guides/getting-started/#installing-the-operator)
  3. deploy a GitLab CRD
  4. observe ServiceMonitors are continously created and deleted
  5. upgrade to this branch's image
  6. observe ServiceMonitors are created but not deleted

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.

Related issues

Relates #621 (closed)

Relates #1392 (closed)

Relates #889 (closed)

Edited by Clemens Beck

Merge request reports