terraform-google-gke-gitlab icon indicating copy to clipboard operation
terraform-google-gke-gitlab copied to clipboard

Bucket not found: registry

Open compalmanel opened this issue 5 years ago • 6 comments

I've deployed GitLab using the terraform-google-gke-gitlab module. Everything looks great, the container registry has been used without any issues.

However we've noticed that the backup-utility emits this warning:

Bucket not found: registry. Skipping backup of registry ...

In values.yaml.tpl the registry is being assigned storage, and that seems to work... However we might also need to expose the bucket to the backup utility?

Just to be clear, the issue is that the bundled backup utility is not being able to access the registry bucket and doesn't include that in the tarball.

Can you please help?

Thank you

compalmanel avatar Oct 02 '20 11:10 compalmanel

Based on this doc it looks like we need to configure global.appConfig.backups.bucket=gitlab-backup-storage and global.appConfig.backups.tmpBucket=gitlab-tmp-storage. The bucket is already created though.

morgante avatar Oct 05 '20 15:10 morgante

Based on this doc it looks like we need to configure global.appConfig.backups.bucket=gitlab-backup-storage and global.appConfig.backups.tmpBucket=gitlab-tmp-storage. The bucket is already created though.

I've also been playing around with that. Adding the link to a tmpBucket is necessary to have a clean restore, I have a patch for that and can submit it if you find it useful.

But this is a different issue.

compalmanel avatar Oct 05 '20 16:10 compalmanel

I wonder if the registry bucket also needs to be mentioned in the appConfig section of values.yaml.tpl?

compalmanel avatar Oct 06 '20 10:10 compalmanel

@compalmanel That seems likely. A PR would be welcome.

morgante avatar Oct 06 '20 15:10 morgante

I've tried adding both:

    registry:
      bucket: ${PROJECT_ID}-registry
      connection:
        secret: gitlab-rails-storage
        key: connection

and

    registry:
      bucket: ${PROJECT_ID}-registry
      connection:
        secret: gitlab-registry-storage
        key: connection

to appConfig, but neither worked. I still get

Bucket not found: registry. Skipping backup of registry ...

when trying to execute backup-utility.

compalmanel avatar Oct 06 '20 18:10 compalmanel

At that point I don't think it's an issue with the Terraform module - it might be worth checking with GitLab about how those values must be provided (possibly the Helm chart isn't correct).

morgante avatar Oct 06 '20 18:10 morgante