docs: add self-hosted upgrade and rollback guide

CY
7h ago
+316-0

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Contributes to #7429

Changes

Adds a new page, "Upgrading and rolling back", to the self hosting docs. It covers:

  • what to do before an upgrade: release notes, the current Helm revision and a database backup
  • the upgrade command, and how migrations run (the migrate-db init container by default, and where to read its logs)
  • verifying the upgrade
  • why helm rollback does not revert the database, and a restore procedure that worked in testing
  • a troubleshooting table
  • the removal of the bundled InfluxDB in chart 0.85.0

How did you test this code?

I ran every command on a local kind cluster, upgrading chart 0.80.0 (Flagsmith 2.222.0) to chart 0.85.0 (Flagsmith
2.286.0) with default values and the PostgreSQL instance deployed by the chart. I took a pg_dump backup, upgraded (91
migrations applied), rolled back with helm rollback (Flagsmith 2.222.0 then failed with a missing table error), and
restored the backup, after which 2.222.0 worked again with the original data.

I ran npx prettier --check on the page and npm run build

Full write up with logs and screenshots: https://cydo73.github.io/Flagsmith-on-kubernetes/

Not tested: custom values, an external or managed database, the jobs.migrateDb Job, the analytics migration job,
other version pairs, and downtime during the upgrade. Happy to rerun any of these.

Tested: I retested the revised backup, verification, upgrade with --reset-then-reuse-values, rollback and restore commands on a fresh kind install.