This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable] velero-minio: fix the data loss issue (#200)
* velero: copy from previous revision To prepare for upgrade. (cherry picked from commit 29a4fdb) * velero: fix the data loss issue Velero chart 3.0.0 and 3.0.1 have data loss issue. The reason is because we didn't set the `mountPath` for PV properly in minio. The default mountPath is `/export` while the bucketRoot is at `/data`. This cause velero-minio to start a fresh disk from the container imagefs, rather than from the PV. However, after fixing the `mountPath`, we noticed that the minio server won't start due to "invalid credentials". After researching a bit, we found that minio requires the original access secret to decrypt the data on the PV. As a result, we cannot use a delete and re-install policy because the minio credential secret (namely `minio-creds-secret) created by the init container has an owner reference to the velero deployment. Previously, we annotate the Addon to use a delete and re-install policy to avoid the helm upgrade error because the statefulset `minio` already exists (created by the minio operator in ealier 2.x.y versions, thus is not tracked by helm). And we have to use the same statefulset name beacuse PVC name is derived from the statefulset name. To solve the issue, we have to make the helm upgrade work. Thus in this patch, we install a `pre-install` job to delete objects created by the minio operator in earlier 2.x.y versions, including the statefulset `minio`. For future upgrade (upgrade from helm based minio), this cleanup job should be a no-op.
- Loading branch information