Admin

Note: Starting with v0.12.0, Prometheus Operator requires use of Kubernetes v1.7.x and up.

Migration from TPR to CRDs

ThirdPartyResources (TPRs) are now being deprecated in favor of CustomResourceDefinitions (CRDs) and the Prometheus Operator automatically migrates TPRs to CRDs when it can. If it encounters an error during the migration, it will rollback the changes done until that point. To deal with edge cases, like the operator dying in the middle of a rollback, we store the data safely so that it can always be restored manually. This doc outlines the process of migration and the manual recovery.

Migration happens in the following steps:

Take all TPR data and store it in a ConfigMap

Delete the TPR data

Delete the TPR registration

Create the CRD

Restore data from ConfigMap

ConfigMap layout

We store the data in 3 configmaps:

crd-migrate-alertmanager-1501479108

crd-migrate-prometheus-1501479108

crd-migrate-servicemonitor-1501479108

Where the number at the end is the timestamp at which the migration ran.

The data is stored as stringified json inside the backup field in the config map.
For example:
kubectl get cm crd-migrate-prometheus-1501479108 -oyaml