Skip to content
Snippets Groups Projects

Fix object purge during Thanos migration

Merged Steve Starke requested to merge sstrk/fix-thanos-migration into devel
  1. Sep 18, 2023
    • Steve Starke's avatar
      Fix object purge during Thanos migration · 14fbca54
      Steve Starke authored
      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.
      14fbca54
Loading