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

Installs GitLab on Kubernetes Engine
https://registry.terraform.io/modules/terraform-google-modules/gke-gitlab/google
Apache License 2.0
90 stars 71 forks source link

Bucket not found: registry #58

Open compalmanel opened 4 years ago

compalmanel commented 4 years ago

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

morgante commented 4 years ago

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.

compalmanel commented 4 years ago

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 commented 4 years ago

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

morgante commented 4 years ago

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

compalmanel commented 4 years ago

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.

morgante commented 4 years ago

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