prometheus-operator / poctl

[EXPERIMENTAL] Manage, troubleshoot and validate Prometheus-Operator resources via Command Line Interface!
Apache License 2.0
18 stars 2 forks source link

Object etcd migration #26

Open nicolastakashi opened 3 months ago

nicolastakashi commented 3 months ago

Introduce a command in poctl to assist Prometheus Operator users in migrating objects managed by the operator (e.g., Prometheus, Alertmanager, PrometheusRules) between versions at the etcd level.

Background:

When a Custom Resource Definition (CRD) supports multiple API versions, it defines a storage version that is used to persist objects in etcd. During an upgrade, such as moving from v1alpha1 to v1beta1, all objects need to be updated to the new storage version to ensure they are stored correctly in etcd.

Problem:

Currently, users must manually update each object to transition them to the new storage version. This process is necessary before removing the old API version from the CRD.

Proposed Solution:

Implement a poctl command that automates this migration process. The command would systematically update all relevant objects to the new storage version, streamlining the upgrade process and reducing the risk of errors.