terraform-google-modules/terraform-google-gke-gitlab

Bucket not found: registry

compalmanel opened this issue · 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

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.

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.

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

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

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.

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).