docs/internal/V2-MIGRATION.md
helm upgrade \
pyroscope \
./operations/pyroscope/helm/pyroscope \
--install \
--set architecture.storage.v1=true \
--set architecture.storage.v2=false \
--set pyroscope.persistence.enabled=true
helm upgrade \
pyroscope \
./operations/pyroscope/helm/pyroscope \
--set architecture.storage.v1=true \
--set architecture.storage.v2=true \
--set pyroscope.persistence.enabled=true \
--set architecture.storage.migration.queryBackendFrom=$(python3 -c "import datetime; print((datetime.datetime.now(datetime.UTC)+ datetime.timedelta(minutes = 10)).strftime('%Y-%m-%dT%H:%M:%SZ'))")
Once data before Step 2 is no longer relevant, we can get rid of the v1 components. This will loose all data before Step 2.
helm upgrade \
pyroscope \
./operations/pyroscope/helm/pyroscope \
--set architecture.storage.v1=false \
--set architecture.storage.v2=true \
--set pyroscope.persistence.enabled=true
--set architecture.overwriteResources.requests.cpu=10m allow this to be tested without allocation many resources, this should not be used in productionhelm upgrade \
pyroscope \
./operations/pyroscope/helm/pyroscope \
--install \
--set architecture.microservices.enabled=true \
--set architecture.overwriteResources.requests.cpu=10m \
--set minio.enabled=true \
--set architecture.storage.v1=true \
--set architecture.storage.v2=false \
--set pyroscope.persistence.enabled=true
helm upgrade \
pyroscope \
./operations/pyroscope/helm/pyroscope \
--set architecture.microservices.enabled=true \
--set architecture.overwriteResources.requests.cpu=10m \
--set minio.enabled=true \
--set architecture.storage.v1=true \
--set architecture.storage.v2=true \
--set pyroscope.persistence.enabled=true \
--set architecture.storage.migration.queryBackendFrom=$(python3 -c "import datetime; print((datetime.datetime.now(datetime.UTC)+ datetime.timedelta(minutes = 10)).strftime('%Y-%m-%dT%H:%M:%SZ'))")
Once data before Step 2 is no longer relevant, we can get rid of the v1 components. This will loose all data before Step 2.
helm upgrade \
pyroscope \
./operations/pyroscope/helm/pyroscope \
--set architecture.microservices.enabled=true \
--set minio.enabled=true \
--set architecture.storage.v1=false \
--set architecture.storage.v2=true \
--set pyroscope.persistence.enabled=true