Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Create helm chart upgrade documentation #292

Merged
merged 6 commits into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions helm/flowforge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,83 @@ readinessProbe:
successThreshold: 1
failureThreshold: 3
```

## Upgrading Chart

### To 2.1.0

Following database-related values have been removed from the chart:

```
forgedbName
forge.dbUsername
forge.dbPassword
forge.postgres.host
forge.postgres.port
```

All database configuration is maintained in the `postgresql` configuration block.
Before upgrading to this version, please ensure that the [`postgresql`](#postgresql) block is correctly configured.
ppawlowski marked this conversation as resolved.
Show resolved Hide resolved
Please pay attention to `forge.dbUsername` and `forge.dbPassword` values, as they are now part of the `postgresql.auth` block - `postgresql.auth.username` and `postgresql.auth.password` respectively.


### To 2.0.0

Together with new application features, this release updates the Helm sub-chart, Bitnami's Postgresql, version.
If local PostgreSQL database instance is used, upgrading to this version, using our Helm chart, requires additional steps.

1. Backup the database ([yq](https://mikefarah.gitbook.io/yq/#install) and [ghead](https://formulae.brew.sh/formula/coreutils) (part of `coreutils` package, MacOS only) tools are required)

For linux:

```bash
DBPASSWORD=$(kubectl get cm flowforge-config -o jsonpath='{.data.flowforge\.yml}' | yq ".db.password")
kubectl run -it --rm db-backup --env="PGPASSWORD=$DBPASSWORD" --image ubuntu/postgres:14-22.04_edge -- bash -c "pg_dump -h flowforge-postgresql -U forge flowforge" | head -n -2 > db.sql
```

For macOS/BSD:

```bash
DBPASSWORD=$(kubectl get cm flowforge-config -o jsonpath='{.data.flowforge\.yml}' | yq ".db.password")
kubectl run -it --rm db-backup --env="PGPASSWORD=$DBPASSWORD" --image ubuntu/postgres:14-22.04_edge -- bash -c "pg_dump -h flowforge-postgresql -U forge flowforge" | ghead -n -2 > db.sql
```

2. Obtain the PVC name which stores the database data
Ó
```bash
export POSTGRESQL_PVC=$(kubectl --namespace default get pvc -l app.kubernetes.io/name=postgresql,role=primary -o jsonpath="{.items[0].metadata.name}")
```

3. Delete postgresql statefulset and secret

```bash
kubectl --namespace default delete statefulset.app flowforge-postgresql
kubectl --namespace default delete secret flowforge-postgresql
```

4. Get database image version and perform the upgrade

```bash
CURRENT_VERSION=$(kubectl --namespace defualt exec postgresql-postgresql-0 -- bash -c 'echo $BITNAMI_IMAGE_VERSION')

helm upgrade --install --atomic \
--namespace default \
--values $path/to/your/values.yaml \
--set postgresql.primary.persistance.existingClaim=$POSTGRESQL_PVC \
--set postgresql.image.tag=$CURRENT_VERSION \
flowforge flowforge/flowforge
```

### To 1.12.0

As of FlowFuse v1.12.0 the URL used to host the helm chart changed, so in order to upgrade from a previous
version you will need to update the repo.

- Run `helm repo remove flowforge`
- Run `helm repo add flowforge https://flowfuse.github.io/helm`

You can then run the following:

- Run `helm repo update flowforge` to pull the latest version
- Check the [README.md](https://github.com/FlowFuse/helm/blob/main/helm/flowforge/README.md) for any new options to configure in `customization.yml`
- Run the `helm upgrade --install flowforge flowforge -f customization.yml`
Loading