does not upsert the secret
the only way to create the secret again is to delete the robot account in harbor which is a bit confusing.
I think we should always upsert the image with the robot account, but I guess this might not be possible as we cannot get the token anymore from harbor after the robot account was created.
So maybe we need to check if the lagoon-internal-registry-secret does not exist, that we forcefully recreate the robot account?
during debugging and trying to find a workaround for https://github.com/amazeeio/lagoon-kbd/issues/57 I found that if:
lagoon-internal-registry-secret
does not existCreateOrRefreshRobot
returnsnil
and the following code: https://github.com/amazeeio/lagoon-kbd/blob/12419865e6ffc971d73befcc2b251420303b781f/controllers/lagoonbuild_controller.go#L945-L962I think we should always upsert the image with the robot account, but I guess this might not be possible as we cannot get the token anymore from harbor after the robot account was created. So maybe we need to check if the
lagoon-internal-registry-secret
does not exist, that we forcefully recreate the robot account?