This guide is used to upgrade Harbor deployed by chart since version 0.3.0.
helm rollback is not supportedBackup 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:
1) Get the secret name which certificate is stored in:
```bash
kubectl get secret
```
Find the secret whose name ends with `-ingress` (expose service via `Ingress`) or `-harbor-nginx`(expose service via `ClusterIP` or `NodePort`)
2) Export the secret as yaml file:
```bash
kubectl get secret <secret-name-from-step-1> -o yaml > secret.yaml
```
3) Rename the secret by setting metadata.name in secret.yaml
4) Create a new secret:
```bash
kubectl create -f secret.yaml
```
5) Configure the chart to use the new secret by setting expose.tls.certSource as secret and expose.tls.secret.secretName as the value you set in step 3
Run upgrade command:
helm upgrade release-name --force .
The
--forceis necessary if upgrade from version 0.3.0 due to issue #30.
emptyDir in 0.3.0.harbor, e.g. my-harbor, and trying to upgrade it to 1.7+ you will get the issue https://github.com/goharbor/harbor-helm/issues/987.fullnameOverride with value release_name-harbor, e.g. my-harbor-harbor, in values.yaml or --set option