Fix object purge during Thanos migration
Version Control Information
Source branch: sstrk/fix-thanos-migration
Target branch: devel
Commits:
* Fix object purge during Thanos migration
The thanos-query ServiceMonitor has the same name for Thanos v1 and
Thanos v2. Previously we deleted it everytime the thanos_v2 role
has been executed. However, helm does not recreate it subsequently.
We also can't easily differentiate if the ServiceMonitor has been
created by Thanos v1 or Thanos v2 as the k8s Ansible module does not
filter for labels if a name for an object is presented.
Therefore, this commit introduces an additional migration guard task
which checks if the migration already has happened. This also has the
advantage that the deletion tasks do not get executed every time.
Description
Feel free to add further information about your MR in this section
Closes: #
Merge Prerequisites
-
MR title (and description) are descriptive -
Code is readable and syntactically correct -
Code is understandable -
Documentation has been updated, if necessary -
Commit messages look good
As a developer: please do not tick these boxes yourself. As a reviewer: please get yourself a hot cold beverage.