Fix monitoring resources create / delete loop
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
- install the Operator from master
- install prometheus CRDs (https://prometheus-operator.dev/docs/user-guides/getting-started/#installing-the-operator)
- deploy a GitLab CRD
- observe ServiceMonitors are continously created and deleted
- upgrade to this branch's image
- 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 integer10
, duration10s
, URIscheme://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