title |
---|
Upgrade Guide |
This guide is used to upgrade Harbor deployed by chart since version 0.3.0.
- As the database schema may change between different versions of Harbor, there is a progress to migrate the schema during the upgrade and the downtime cannot be avoid
- The database schema cannot be downgraded automatically, so the
helm rollback
is not supported
Backup the database used by Harbor in case the upgrade process fails.
Download the latest version of Harbor chart.
Configure the new chart to make sure that the configuration items have the same values with the old one.
Note: if TLS is enabled and the certificate is generated by chart automatically, a new certificate will be generated and overwrite the old one during the upgrade, this may cause some issues if you have distributed the certificate. You can follow the below steps to configure the new chart to use the old certificate:
-
Get the secret name which certificate is stored in:
kubectl get secret
Find the secret whose name ends with
-ingress
(expose service viaIngress
) or-harbor-nginx
(expose service viaClusterIP
orNodePort
) -
Export the secret as yaml file:
kubectl get secret <secret-name-from-step-1> -o yaml > secret.yaml
-
Rename the secret by setting
metadata.name
insecret.yaml
-
Create a new secret:
kubectl create -f secret.yaml
-
Configure the chart to use the new secret by setting
expose.tls.certSource
assecret
andexpose.tls.secret.secretName
as the value you set in step 3
Run upgrade command:
helm upgrade release-name --force .
The
--force
is necessary if upgrade from version 0.3.0 due to issue #30.
- The job logs will be lost if you upgrade from version 0.3.0 as the logs are store in a
emptyDir
in 0.3.0. - Installing the Harbor chart(1.6-) with a release name that contains
harbor
, e.g.my-harbor
, and trying to upgrade it to 1.7+ you will get the issue #987.
The workaround is performing the upgrade by setting the configurationfullnameOverride
with valuerelease_name-harbor
, e.g.my-harbor-harbor
, invalues.yaml
or--set
option