Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening this PR to move forward to chart v5. Kind of a recap of the 5.0.0 milestone.
To-do
After
Upgrade notes
NetBox has been updated to version 4.x. This chart should still work with 3.7.x as well by overriding the
image
, but it is not officially supported.Potentially breaking changes
extraContainers
setting has been renamedsidecars
to match conventions.extraInitContainers
setting has been renamedinitContainers
to match conventions.metricsEnabled
setting has been renamedmetrics.enabled
to match conventions.serviceMonitor
setting has been moved tometrics.serviceMonitor
to match conventions.jobResultRetention
setting has been renamedjobRetention
to match the change in more recent versions of NetBox.remoteAuth.backend
setting has been renamedremoteAuth.backends
and is now an array.remoteAuth.autoCreateUser
setting now defaults tofalse
.Migration Guide
Caution
We still suggest moving to an external, high-availability PostgreSQL and Redis, rather than continuing to use the built-in ones in the chart which exist primarily for ease of trying out a proof-of-concept. Managing PostgreSQL and Redis separately lets you manage them and their versioning outside of the chart release cycle.
That said, here are the steps you can take to move from the 4.x chart running NetBox 3.2.8 (or higher), to the 5.x chart.
Back Up the PostgreSQL Database
kubectl get pods -A | grep postgres
Start a New Temporary PostgreSQL
You will need a temporary PostgreSQL so you can migrate the data before switching to the newer chart.
Bring up a temporary PostgreSQL, either in your cluster using the chart of your choice (postgres-operator, Crunchy Postgres, etc.) or in another machine/VM/whatever.
PostgreSQL 16 is the highest version supported by the Bitnami chart as of this writing, so if you intend to go back to the built-in chart after migrating, that's the recommended version to work with for now.
Restore the database dump you made earlier into your new PostgreSQL.
pg_restore -v -Fc -c -U netbox -d netbox < /tmp/netbox.sql
Point NetBox at the temporary database.
Once your temporary PostgreSQL is started and accessible, update the
externalDatabase
section of yourvalues.yaml
to match the new database and apply it, or update them usinghelm upgrade
:Upgrade to NetBox
3.5.9
(if starting with an older version)If you are currently using a version older than
3.5.9
, like the default value of3.2.8
the current chart defines, then it's best to upgrade to that version first.3.5.9
is the last release that supports the PostgreSQL 11 version that was provided with the 4.x charts.NETBOX_DELETE_LEGACY_DATA
in yourvalues.yaml
to allow deletion anyway.helm upgrade
to update the chart with new settings:helm upgrade netbox --reuse-values \ --set 'extraEnvs.NETBOX_DELETE_LEGACY_DATA=1'
3.5.9
Update the image to the
3.5.9
tag invalues.yaml
:Or, you can use
helm upgrade
to update in-place:helm upgrade netbox --reuse-values \ --set 'image.tag=3.5.9'
Note
You can pass more than one
--set
option, so you can combine the helm options when updating:Switch to the New Chart Repository
Note
It is recommended that you upgrade to the latest version of each minor release to make sure migrations run successfully, and give enough time for the migrations to finish running before moving to the next version.
Watch your pods and confirm everything is
Running
before doing the next step.Once NetBox is back up and talking to the new database, you can upgrade further until you are up-to-date.
3.5.9
⇒3.6.9
3.6.9
⇒3.7.8
3.7.8
⇒4.0.11
4.0.11
⇒4.1.8
Switch to the new chart repository.
Caveats
Don't forget to check the potentially breaking changes up above.
You may need to re-set some values to match the new schema.
If you are using other tools alongside Helm (like ArgoCD), you might run into additional issues. See issue #450 for details.