Skip to content
Snippets Groups Projects

Fix object purge during Thanos migration

Merged Steve Starke requested to merge sstrk/fix-thanos-migration into devel
2 files
+ 21
1
Compare changes
  • Side-by-side
  • Inline
Files
2
  • 14fbca54
    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.
+ 1
0
Fix Thanos v1 cleanup tasks during migration to prevent accidental double deletion of resources
Loading