kubernetes Gitlab:使用对象存储时如何配置备份

ukdjmx9f  于 2023-02-03  发布在  Kubernetes
关注(0)|答案(1)|浏览(233)

我们正在运行安装在Kubernetes集群中的GitLab,使用rook-ceph Rados-Gateway作为S3存储后端。我们希望使用gitlab工具容器中提供的备份实用程序。作为备份目标,我们配置了一个外部minio示例。使用备份实用程序时,出现以下错误消息:

Bucket not found: gitlab-registry-bucket. Skipping backup of registry ...
Bucket not found: gitlab-uploads-bucket. Skipping backup of uploads ...
Bucket not found: gitlab-artifacts-bucket. Skipping backup of artifacts ...
Bucket not found: gitlab-lfs-bucket. Skipping backup of lfs ...
Bucket not found: gitlab-packages-bucket. Skipping backup of packages ...
Bucket not found: gitlab-mr-diffs. Skipping backup of external_diffs ...
Bucket not found: gitlab-terraform-state. Skipping backup of terraform_state ...
Bucket not found: gitlab-pages-bucket. Skipping backup of pages ...

当我执行s3cmd ls时,我只看到minio示例上的两个备份存储桶,而不是“源”存储桶。
有人能告诉我,如何配置备份实用程序或s3 cmd,以便它可以访问两者,源桶的Rados网关和作为备份目标的迷你?
我曾尝试将多个连接插入.s3cfg文件,如下所示:

[target]
host_base = file01.xxx.xxx:80
host_bucket = file01.xxx.xxx:80
use_https = false
bucket_location = us-east-1
access_key = xxx
secret_key = xxx
[source]
host_base = s3.xxx.xxx:80
host_bucket = s3.xxx.xxx:80
use_https = false
bucket_location = us-east-1
access_key = xxx
secret_key = xxx

但在使用s3cmd ls时未显示任何来自目标的存储桶。

omqzjyyz

omqzjyyz1#

@勒皮纳特:请点击GitLab文档链接查看values.yaml,示例配置如下所示:

global:
  .
  .
  .
  pages:  #pages bucket to be added with connection
    enabled: true
    host: <hostname>
    artifactsServer: true
    objectStore:
      enabled: true
      bucket: <s3-bucket-name>
      # proxy_download: true
      connection:
        secret: <secret-for-s3-connection>
  
    .
    .
    .
  appConfig:
    .
    .
    .
    object_store:
      enabled: true
      proxy_download: true
      connection:
        secret: <secret-for-s3-connection>
    lfs:
      enabled: true
      proxy_download: false
      bucket: <s3-bucket-name>
      connection: {}
    artifacts:
      enabled: true
      proxy_download: true
      bucket: <s3-bucket-name>
      connection: {}
    uploads:
      enabled: true
      proxy_download: true
      bucket: <s3-bucket-name>
      connection: {}
    packages:
      enabled: true
      proxy_download: true
      bucket: <s3-bucket-name>
      connection: {}
    externalDiffs:
      enabled: true
      proxy_download: true
      bucket: <s3-bucket-name>
      connection: {}
    terraformState:
      enabled: true
      bucket: <s3-bucket-name>
      connection: {}
    ciSecureFiles:
      enabled: true
      bucket: <s3-bucket-name>
      connection: {}
    dependencyProxy:
      enabled: true
      proxy_download: true
      bucket: <s3-bucket-name>
      connection: {}
    backups:
      bucket: <s3-bucket-name>
      tmpBucket: <s3-bucket-name>
      
  registry:  #registry bucket also should be added in S3 and no connection is required here
    bucket: <s3-bucket-name>

你必须检查缩进,以考虑页面和注册表桶,这将是在全局配置和其余的桶将在appConfig下,如果你看到我的代码以上。
希望这对你有帮助!

相关问题