DoD-Platform-One / bigbang

BigBang the product
https://repo1.dso.mil/big-bang/bigbang
Apache License 2.0
169 stars 68 forks source link

Gitlab backup storage does not support minio s3 storage #41

Open p1-repo-sync-bot[bot] opened 9 months ago

p1-repo-sync-bot[bot] commented 9 months ago

Bug

Description

GitLab supports minio as the s3 storage location, however this cannot be used with the gitlab backup system using the current secret-object store configuration.

This currently reads as: https://repo1.dso.mil/big-bang/bigbang/-/blob/master/chart/templates/gitlab/secret-objectstore.yaml?ref_type=heads#L49

    backups: |-
      [default]
      {{- if eq .Values.addons.gitlab.objectStorage.iamProfile "" }} 
      access_key = {{ .Values.addons.gitlab.objectStorage.accessKey }}
      secret_key = {{ .Values.addons.gitlab.objectStorage.accessSecret }}
      host_bucket = %(bucket)s.{{ regexReplaceAll "http(s*)://" .Values.addons.gitlab.objectStorage.endpoint "" }}
      {{- end }}
      bucket_location = {{ .Values.addons.gitlab.objectStorage.region }}
      multipart_chunk_size_mb = 128

When it should read similar to:

    backups: |-
      [default]
      {{- if eq .Values.addons.gitlab.objectStorage.iamProfile "" }} 
      access_key = {{ .Values.addons.gitlab.objectStorage.accessKey }}
      secret_key = {{ .Values.addons.gitlab.objectStorage.accessSecret }}
      {{- if eq .Values.addons.gitlab.objectStorage.type "minio" }}
      host_base = {{ regexReplaceAll "http(s*)://" .Values.addons.gitlab.objectStorage.endpoint "" }}
      host_bucket = {{ regexReplaceAll "http(s*)://" .Values.addons.gitlab.objectStorage.endpoint "" }}
      use_https = False
      {{- else }}
      host_bucket = %(bucket)s.{{ regexReplaceAll "http(s*)://" .Values.addons.gitlab.objectStorage.endpoint "" }}      
      {{- end }}
      {{- end }}
      bucket_location = {{ .Values.addons.gitlab.objectStorage.region }}
      multipart_chunk_size_mb = 128