From 5addb80f91856c7f1062e73733e08c30f9473738 Mon Sep 17 00:00:00 2001 From: Adriano Pezzuto <2222461+bsctl@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:17:53 +0200 Subject: [PATCH] docs: using private images for datastore migration (#537) --- docs/content/guides/datastore-migration.md | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/content/guides/datastore-migration.md b/docs/content/guides/datastore-migration.md index 5cc2d275..6a05f76e 100644 --- a/docs/content/guides/datastore-migration.md +++ b/docs/content/guides/datastore-migration.md @@ -172,4 +172,25 @@ After a while, depending on the amount of data to migrate, the Tenant Control Pl > Please, note the datastore migration leaves the data on the default datastore, so you have to remove it manually. ## Post migration -After migrating data to the new datastore, complete the migration procedure by restarting the `kubelet.service` on all the tenant worker nodes. \ No newline at end of file +After migrating data to the new datastore, complete the migration procedure by restarting the `kubelet.service` on all the tenant worker nodes. + +## Troubleshooting + +### Migration Job Image Version +When migrating between datastores, the Kamaji controller automatically creates a migration job to transfer data from the source to the destination datastore. By default, this job uses the same image version as the running Kamaji controller. If you need to use a different image version for the migration job, you can specify it by passing extra arguments to the controller: + +```shell +helm upgrade kamaji clastix/kamaji -n kamaji-system +--set extraArgs[0]=--migrate-image=custom/kamaji:version` +``` + +### Handling Private Registry Images +If the Kamaji controller images are stored in a private registry that requires authentication, the migration job will fail because it does not use any `ImagePullSecret` by default. You need to attach your registry secret to the `kamaji-controller-manager` service account, which is used by the migration job. You can do this with the following command: + +```shell +kubectl -n kamaji-system patch serviceaccount kamaji-controller-manager \ + -p '{"imagePullSecrets": [{"name": "myregistry-credentials"}]}' +``` + +This command patches the kamaji-controller-manager service account to include your registry secret, allowing the migration job to pull images from the private registry successfully. +