planetscale/vitess-operator

Annotations not being removed on VTTablets

Opened this issue · 0 comments

When updating annotations for a keyspace:

....
          annotations:
            prometheus.io/path: /metrics
            prometheus.io/port: "15000"
            prometheus.io/scrape: "true"
          backupLocationName: gcs
          cell: useast4b0
          dataVolumeClaimTemplate:
....

to remove:

....
          annotations:
            prometheus.io/path: /metrics
            prometheus.io/scrape: "true"
          backupLocationName: gcs
          cell: useast4b0
          dataVolumeClaimTemplate:
....

The VTTablet pods end up in an inconsistent state and retain the old annotation:

...
  annotations:
....
    drain.planetscale.com/supported: ensure that the tablet is not a master
    planetscale.com/observed-shard-generation: "8"
    prometheus.io/path: /metrics
    prometheus.io/port: "15000"
    prometheus.io/scrape: "true"
...

and even after removing them manually, the operator will try to bring it back:

  annotations:
...
    drain.planetscale.com/supported: ensure that the tablet is not a master
    planetscale.com/observed-shard-generation: "8"
    prometheus.io/path: /metrics
    prometheus.io/scrape: "true"
    rollout.planetscale.com/scheduled: |
      metadata:
        annotations:
          prometheus.io/port: "15000"