diff --git a/charts/gitlab/charts/sidekiq/templates/configmap.yaml b/charts/gitlab/charts/sidekiq/templates/configmap.yaml index 01848bd6714cd091817492b3d58301710b20f8b2..684ae7f38b77a858303600d53c0791d9c2c7ca31 100644 --- a/charts/gitlab/charts/sidekiq/templates/configmap.yaml +++ b/charts/gitlab/charts/sidekiq/templates/configmap.yaml @@ -53,11 +53,11 @@ data: enabled: {{ eq .Values.artifacts.enabled true }} object_store: enabled: true - remote_directory: {{ .Values.artifacts.bucket }} + remote_directory: {{ template "gitlab.objectstorage.artifacts.bucket" . }} direct_upload: true background_upload: false proxy_download: {{ eq .Values.artifacts.proxy_download true }} - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} connection: provider: AWS region: us-east-1 @@ -66,19 +66,18 @@ data: host: {{ template "gitlab.minio.hostname" . }} endpoint: {{ template "gitlab.minio.endpoint" . }} path_style: true - {{- else if .Values.artifacts.connection}} - connection: -{{ toYaml .Values.artifacts.connection | indent 12}} + {{- else if .Values.global.objectStorage.artifacts.connection }} + connection: <%= YAML.load_file("/etc/gitlab/objectstorage/artifacts").to_json() %> {{- end }} lfs: enabled: {{ eq .Values.lfs.enabled true }} object_store: enabled: true - remote_directory: {{ .Values.lfs.bucket }} + remote_directory: {{ template "gitlab.objectstorage.lfs.bucket" . }} direct_upload: true background_upload: false proxy_download: {{ eq .Values.lfs.proxy_download true }} - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} connection: provider: AWS region: us-east-1 @@ -87,19 +86,18 @@ data: host: {{ template "gitlab.minio.hostname" . }} endpoint: {{ template "gitlab.minio.endpoint" . }} path_style: true - {{- else if .Values.lfs.connection}} - connection: -{{ toYaml .Values.lfs.connection | indent 12}} + {{- else if .Values.global.objectStorage.lfs.connection }} + connection: <%= YAML.load_file("/etc/gitlab/objectstorage/lfs").to_json() %> {{- end }} uploads: enabled: {{ eq .Values.uploads.enabled true }} object_store: enabled: true - remote_directory: {{ .Values.uploads.bucket }} + remote_directory: {{ template "gitlab.objectstorage.uploads.bucket" . }} direct_upload: true background_upload: false proxy_download: {{ eq .Values.uploads.proxy_download true }} - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} connection: provider: AWS region: us-east-1 @@ -108,9 +106,8 @@ data: host: {{ template "gitlab.minio.hostname" . }} endpoint: {{ template "gitlab.minio.endpoint" . }} path_style: true - {{- else if .Values.uploads.connection}} - connection: -{{ toYaml .Values.uploads.connection | indent 12}} + {{- else if .Values.global.objectStorage.uploads.connection }} + connection: <%= YAML.load_file("/etc/gitlab/objectstorage/uploads").to_json() %> {{- end }} pages: enabled: false @@ -179,6 +176,10 @@ data: mkdir -p /sidekiq-secrets/minio cp /init-secrets/minio/* /sidekiq-secrets/minio/ fi + if [ -e /init-secrets/objectstorage ]; then + mkdir -p /sidekiq-secrets/objectstorage + cp /init-secrets/objectstorage/* /sidekiq-secrets/objectstorage/ + fi if [ -e /init-secrets/smtp/smtp-password ]; then mkdir -p /sidekiq-secrets/smtp cp /init-secrets/smtp/smtp-password /sidekiq-secrets/smtp/ diff --git a/charts/gitlab/charts/sidekiq/templates/deployment.yaml b/charts/gitlab/charts/sidekiq/templates/deployment.yaml index 07316d3f06c61412b47aba62da1e34941cc17d30..98e8054e63fc1d25853c2d083dcaf8a3d36030ec 100644 --- a/charts/gitlab/charts/sidekiq/templates/deployment.yaml +++ b/charts/gitlab/charts/sidekiq/templates/deployment.yaml @@ -9,7 +9,7 @@ {{- $timeout := .Values.timeout -}} {{- $resources := .Values.resources -}} {{- $nodeSelector := .Values.nodeSelector -}} -{{- $minioEnabled := .Values.minio.enabled -}} +{{- $minioEnabled := .Values.global.minio.enabled -}} {{- $minioSecret := include "gitlab.minio.credentials.secret" . -}} {{- $redisSecret := include "gitlab.redis.password.secret" . -}} {{- $redisKey := include "gitlab.redis.password.key" . -}} @@ -216,6 +216,27 @@ spec: items: - key: {{ template "gitlab.psql.password.key" $ }} path: postgres/psql-password + {{- if $.Values.global.objectStorage.lfs.connection }} + - secret: + name: {{ template "gitlab.objectstorage.lfs.secret" $ }} + items: + - key: {{ template "gitlab.objectstorage.lfs.key" $ }} + path: objectstorage/lfs + {{- end }} + {{- if $.Values.global.objectStorage.artifacts.connection }} + - secret: + name: {{ template "gitlab.objectstorage.artifacts.secret" $ }} + items: + - key: {{ template "gitlab.objectstorage.artifacts.key" $ }} + path: objectstorage/artifacts + {{- end }} + {{- if $.Values.global.objectStorage.uploads.connection }} + - secret: + name: {{ template "gitlab.objectstorage.uploads.secret" $ }} + items: + - key: {{ template "gitlab.objectstorage.uploads.key" $ }} + path: objectstorage/uploads + {{- end }} {{- if $minioEnabled }} - secret: name: {{ $minioSecret }} diff --git a/charts/gitlab/charts/sidekiq/values.yaml b/charts/gitlab/charts/sidekiq/values.yaml index 1d269215a4b5d4102820b957f861110d3cdd9964..fcd19e485010e63b9f623ca77d88e895b96bf06c 100644 --- a/charts/gitlab/charts/sidekiq/values.yaml +++ b/charts/gitlab/charts/sidekiq/values.yaml @@ -53,6 +53,18 @@ global: password: {} gitaly: authToken: {} + minio: + enabled: + objectStorage: + lfs: + bucket: + connection: {} + artifacts: + bucket: + connection: {} + uploads: + bucket: + connection: {} gitaly: # host: '0.0.0.0' # port: 8075 @@ -63,18 +75,15 @@ gitaly: artifacts: enabled: true proxy_download: true - bucket: gitlab-artifacts - # connection: {} + bucket: lfs: enabled: true proxy_download: true - bucket: git-lfs - # connection: {} + bucket: uploads: enabled: true proxy_download: true - bucket: gitlab-uploads - # connection: {} + bucket: minio: enabled: true credentials: diff --git a/charts/gitlab/charts/task-runner/templates/configmap.yaml b/charts/gitlab/charts/task-runner/templates/configmap.yaml index c164f1453705a435807d3d424132cc41473a5c11..c1a10301ab490e40e4bcc89b12c3f3b0351ca475 100644 --- a/charts/gitlab/charts/task-runner/templates/configmap.yaml +++ b/charts/gitlab/charts/task-runner/templates/configmap.yaml @@ -49,15 +49,11 @@ data: enabled: {{ eq .Values.lfs.enabled true }} object_store: enabled: true - {{- if .Values.minio.enabled }} - remote_directory: {{ .Values.minio.bucket }} - {{- else }} - remote_directory: {{ .Values.lfs.bucket }} - {{- end }} + remote_directory: {{ template "gitlab.objectstorage.lfs.bucket" . }} direct_upload: true background_upload: false proxy_download: {{ eq .Values.lfs.proxy_download true }} - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} connection: provider: AWS region: us-east-1 @@ -66,9 +62,8 @@ data: host: {{ template "gitlab.minio.hostname" . }} endpoint: {{ template "gitlab.minio.endpoint" . }} path_style: true - {{- else if .Values.lfs.connection}} - connection: -{{ toYaml .Values.lfs.connection | indent 12}} + {{- else if .Values.global.objectStorage.lfs.connection }} + connection: <%= YAML.load_file("/etc/gitlab/objectstorage/lfs").to_json() %> {{- end }} pages: enabled: false @@ -129,6 +124,10 @@ data: mkdir /init-secrets/minio cp /init-config/minio/* /init-secrets/minio/ fi + if [ -e /init-config/objectstorage ]; then + mkdir -p /init-secrets/objectstorage + cp /init-config/objectstorage/* /init-secrets/objectstorage/ + fi cat << EOF > /init-secrets/.s3cfg [default] diff --git a/charts/gitlab/charts/task-runner/templates/deployment.yaml b/charts/gitlab/charts/task-runner/templates/deployment.yaml index ac49a56935c0f92aef7aa7caee558eadab77c604..8102e27d10e72aa6982ad549fa3715f79133bdc6 100644 --- a/charts/gitlab/charts/task-runner/templates/deployment.yaml +++ b/charts/gitlab/charts/task-runner/templates/deployment.yaml @@ -49,17 +49,21 @@ spec: {{ template "gitlab.imagePullPolicy" . }} env: - name: ARTIFACTS_BUCKET_NAME - value: {{ .Values.backups.bucketNames.artifacts }} - - name: REGISTRY_BUCKET_NAME - value: {{ .Values.backups.bucketNames.registry }} + value: {{ template "gitlab.objectstorage.artifacts.bucket" . }} - name: LFS_BUCKET_NAME - value: {{ .Values.backups.bucketNames.lfs }} + value: {{ template "gitlab.objectstorage.lfs.bucket" . }} + - name: UPLOADS_BUCKET_NAME + value: {{ template "gitlab.objectstorage.uploads.bucket" . }} + - name: REGISTRY_BUCKET_NAME + value: {{ .Values.global.objectStorage.registry.bucket }} - name: BACKUP_BUCKET_NAME - value: {{ .Values.backups.bucketNames.backups }} + value: {{ .Values.global.objectStorage.backups.bucket }} + {{- if .Values.global.minio.enabled }} - name: S3_CONFIG_DIR value: "/etc/gitlab/minio" - name: S3_ENDPOINT value: {{ template "gitlab.minio.endpoint" .}} + {{- end }} - name: GITALY_FEATURE_DEFAULT_ON value: "1" - name: CONFIG_TEMPLATE_DIRECTORY @@ -115,7 +119,28 @@ spec: items: - key: registry-auth.key path: registry/gitlab-registry.key - {{- if .Values.minio.enabled }} + {{- if .Values.global.objectStorage.lfs.connection }} + - secret: + name: {{ template "gitlab.objectstorage.lfs.secret" . }} + items: + - key: {{ template "gitlab.objectstorage.lfs.key" . }} + path: objectstorage/lfs + {{- end }} + {{- if .Values.global.objectStorage.artifacts.connection }} + - secret: + name: {{ template "gitlab.objectstorage.artifacts.secret" . }} + items: + - key: {{ template "gitlab.objectstorage.artifacts.key" . }} + path: objectstorage/artifacts + {{- end }} + {{- if .Values.global.objectStorage.uploads.connection }} + - secret: + name: {{ template "gitlab.objectstorage.uploads.secret" . }} + items: + - key: {{ template "gitlab.objectstorage.uploads.key" . }} + path: objectstorage/uploads + {{- end }} + {{- if .Values.global.minio.enabled }} - secret: name: {{ template "gitlab.minio.credentials.secret" . }} items: diff --git a/charts/gitlab/charts/task-runner/values.yaml b/charts/gitlab/charts/task-runner/values.yaml index d1bc20d1a4cc42c3641953920b3b7046a6671a4f..55a1e5560d52f23196fd94c6b1133dd716e079d6 100644 --- a/charts/gitlab/charts/task-runner/values.yaml +++ b/charts/gitlab/charts/task-runner/values.yaml @@ -31,13 +31,18 @@ global: password: {} gitaly: authToken: {} -backups: - bucketNames: - backups: gitlab-backups - artifacts: gitlab-artifacts - uploads: gitlab-uploads - registry: registry - lfs: git-lfs + minio: + enabled: + objectStorage: + lfs: + connection: {} + artifacts: + connection: {} + uploads: + connection: {} + registry: {} + backups: {} + extra: {} rack_attack: @@ -62,11 +67,18 @@ gitaly: authToken: {} # secret: gitaly-secret # key: token +artifacts: + enabled: true + proxy_download: true + bucket: lfs: enabled: true proxy_download: true - # bucket: - # connection: {} + bucket: +uploads: + enabled: true + proxy_download: true + bucket: minio: enabled: true bucket: git-lfs diff --git a/charts/gitlab/charts/unicorn/templates/configmap.yml b/charts/gitlab/charts/unicorn/templates/configmap.yml index 94264cf0760c54892304ab41acd09a466a17f96e..510111ec8a14eedebb43071b6bae589ca03c093c 100644 --- a/charts/gitlab/charts/unicorn/templates/configmap.yml +++ b/charts/gitlab/charts/unicorn/templates/configmap.yml @@ -87,11 +87,11 @@ data: enabled: {{ eq .Values.artifacts.enabled true }} object_store: enabled: true - remote_directory: {{ .Values.artifacts.bucket }} + remote_directory: {{ template "gitlab.objectstorage.artifacts.bucket" . }} direct_upload: true background_upload: false proxy_download: {{ eq .Values.artifacts.proxy_download true }} - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} connection: provider: AWS region: us-east-1 @@ -100,19 +100,18 @@ data: host: {{ template "gitlab.minio.hostname" . }} endpoint: {{ template "gitlab.minio.endpoint" . }} path_style: true - {{- else if .Values.artifacts.connection}} - connection: -{{ toYaml .Values.artifacts.connection | indent 12}} + {{- else if .Values.global.objectStorage.artifacts.connection }} + connection: <%= YAML.load_file("/etc/gitlab/objectstorage/artifacts").to_json() %> {{- end }} lfs: enabled: {{ eq .Values.lfs.enabled true }} object_store: enabled: true - remote_directory: {{ .Values.lfs.bucket }} + remote_directory: {{ template "gitlab.objectstorage.lfs.bucket" . }} direct_upload: true background_upload: false proxy_download: {{ eq .Values.lfs.proxy_download true }} - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} connection: provider: AWS region: us-east-1 @@ -121,19 +120,18 @@ data: host: {{ template "gitlab.minio.hostname" . }} endpoint: {{ template "gitlab.minio.endpoint" . }} path_style: true - {{- else if .Values.lfs.connection}} - connection: -{{ toYaml .Values.lfs.connection | indent 12}} + {{- else if .Values.global.objectStorage.lfs.connection }} + connection: <%= YAML.load_file("/etc/gitlab/objectstorage/lfs").to_json() %> {{- end }} uploads: enabled: {{ eq .Values.uploads.enabled true }} object_store: enabled: true - remote_directory: {{ .Values.uploads.bucket }} + remote_directory: {{ template "gitlab.objectstorage.uploads.bucket" . }} direct_upload: true background_upload: false proxy_download: {{ eq .Values.uploads.proxy_download true }} - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} connection: provider: AWS region: us-east-1 @@ -142,9 +140,8 @@ data: host: {{ template "gitlab.minio.hostname" . }} endpoint: {{ template "gitlab.minio.endpoint" . }} path_style: true - {{- else if .Values.uploads.connection}} - connection: -{{ toYaml .Values.uploads.connection | indent 12}} + {{- else if .Values.global.objectStorage.uploads.connection }} + connection: <%= YAML.load_file("/etc/gitlab/objectstorage/uploads").to_json() %> {{- end }} pages: enabled: false @@ -236,6 +233,10 @@ data: mkdir -p /init-secrets/minio cp /init-config/minio/* /init-secrets/minio/ fi + if [ -e /init-config/objectstorage ]; then + mkdir -p /init-secrets/objectstorage + cp /init-config/objectstorage/* /init-secrets/objectstorage/ + fi if [ -e /init-config/omniauth ]; then mkdir -p /init-secrets/omniauth cp -r /init-config/omniauth/* /init-secrets/omniauth/ diff --git a/charts/gitlab/charts/unicorn/templates/deployment.yaml b/charts/gitlab/charts/unicorn/templates/deployment.yaml index 429bfe9ac4df6f510b0bcde1a6f643d5a6640f52..b338d84f4c4ba943c99b6a6844611d2e1cd8510f 100644 --- a/charts/gitlab/charts/unicorn/templates/deployment.yaml +++ b/charts/gitlab/charts/unicorn/templates/deployment.yaml @@ -186,7 +186,7 @@ spec: items: - key: registry-auth.key path: registry/gitlab-registry.key - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} - secret: name: {{ template "gitlab.minio.credentials.secret" . }} items: @@ -195,6 +195,27 @@ spec: - key: secretkey path: minio/secretkey {{- end }} + {{- if .Values.global.objectStorage.lfs.connection }} + - secret: + name: {{ template "gitlab.objectstorage.lfs.secret" . }} + items: + - key: {{ template "gitlab.objectstorage.lfs.key" . }} + path: objectstorage/lfs + {{- end }} + {{- if .Values.global.objectStorage.artifacts.connection }} + - secret: + name: {{ template "gitlab.objectstorage.artifacts.secret" . }} + items: + - key: {{ template "gitlab.objectstorage.artifacts.key" . }} + path: objectstorage/artifacts + {{- end }} + {{- if .Values.global.objectStorage.uploads.connection }} + - secret: + name: {{ template "gitlab.objectstorage.uploads.secret" . }} + items: + - key: {{ template "gitlab.objectstorage.uploads.key" . }} + path: objectstorage/uploads + {{- end }} {{- if .Values.omniauth.providers }} {{- range $index, $entry := .Values.omniauth.providers }} - secret: diff --git a/charts/gitlab/charts/unicorn/values.yaml b/charts/gitlab/charts/unicorn/values.yaml index 63e84fb6e014243a2f930a428e219ba9dc9c6703..d0fe5d59ccc025a673a3fc30140eaffa89c7694b 100644 --- a/charts/gitlab/charts/unicorn/values.yaml +++ b/charts/gitlab/charts/unicorn/values.yaml @@ -96,6 +96,18 @@ global: password: {} gitaly: authToken: {} + minio: + enabled: + objectStorage: + lfs: + bucket: + connection: {} + artifacts: + bucket: + connection: {} + uploads: + bucket: + connection: {} redis: password: {} gitaly: @@ -108,18 +120,15 @@ gitaly: artifacts: enabled: true proxy_download: true - bucket: gitlab-artifacts - # connection: {} + bucket: lfs: enabled: true proxy_download: true - bucket: git-lfs - # connection: {} + bucket: uploads: enabled: true proxy_download: true - bucket: gitlab-uploads - # connection: {} + bucket: minio: enabled: true serviceName: 'minio-svc' diff --git a/charts/gitlab/templates/_minio.tpl b/charts/gitlab/templates/_minio.tpl deleted file mode 100644 index 8f49c92a97220f354068a3e31ea78362a64c7e73..0000000000000000000000000000000000000000 --- a/charts/gitlab/templates/_minio.tpl +++ /dev/null @@ -1,10 +0,0 @@ -{{/* ######### Minio related templates */}} - -{{/* -Return the minio service endpoint -*/}} -{{- define "gitlab.minio.endpoint" -}} -{{- $name := default "minio-svc" .Values.minio.serviceName -}} -{{- $port := default 9000 .Values.minio.port | int -}} -{{- printf "http://%s-%s:%d" .Release.Name $name $port -}} -{{- end -}} diff --git a/charts/gitlab/templates/_objectstorage.tpl b/charts/gitlab/templates/_objectstorage.tpl new file mode 100644 index 0000000000000000000000000000000000000000..92c17f9ce08f2da5bed311e985f65e9ba865d9b5 --- /dev/null +++ b/charts/gitlab/templates/_objectstorage.tpl @@ -0,0 +1,76 @@ +{{/* ######### object storage related templates */}} + +{{/* +Return the minio service endpoint +*/}} +{{- define "gitlab.minio.endpoint" -}} +{{- $name := default "minio-svc" .Values.minio.serviceName -}} +{{- $port := default 9000 .Values.minio.port | int -}} +{{- printf "http://%s-%s:%d" .Release.Name $name $port -}} +{{- end -}} + +{{/* +Return the secret for lfs storage connection +*/}} +{{- define "gitlab.objectstorage.lfs.secret" -}} +{{- .Values.global.objectStorage.lfs.connection.secret -}} +{{- end -}} + +{{/* +Return the key for lfs storage connection +*/}} +{{- define "gitlab.objectstorage.lfs.key" -}} +{{- coalesce .Values.global.objectStorage.lfs.connection.key "connection" -}} +{{- end -}} + +{{/* +Return the key for lfs storage bucket +- This template presents an upgrade path from local->global +*/}} +{{- define "gitlab.objectstorage.lfs.bucket" -}} +{{- coalesce .Values.lfs.bucket .Values.global.objectStorage.lfs.bucket -}} +{{- end -}} + +{{/* +Return the secret for artifacts storage connection +*/}} +{{- define "gitlab.objectstorage.artifacts.secret" -}} +{{- .Values.global.objectStorage.artifacts.connection.secret -}} +{{- end -}} + +{{/* +Return the key for artifacts storage connection +*/}} +{{- define "gitlab.objectstorage.artifacts.key" -}} +{{- coalesce .Values.global.objectStorage.artifacts.connection.key "connection" -}} +{{- end -}} + +{{/* +Return the key for artifacts storage bucket +- This template presents an upgrade path from local->global +*/}} +{{- define "gitlab.objectstorage.artifacts.bucket" -}} +{{- coalesce .Values.artifacts.bucket .Values.global.objectStorage.artifacts.bucket -}} +{{- end -}} + +{{/* +Return the secret for uploads storage connection +*/}} +{{- define "gitlab.objectstorage.uploads.secret" -}} +{{- .Values.global.objectStorage.uploads.connection.secret -}} +{{- end -}} + +{{/* +Return the key for uploads storage connection +*/}} +{{- define "gitlab.objectstorage.uploads.key" -}} +{{- coalesce .Values.global.objectStorage.uploads.connection.key "connection" -}} +{{- end -}} + +{{/* +Return the key for uploads storage bucket +- This template presents an upgrade path from local->global +*/}} +{{- define "gitlab.objectstorage.uploads.bucket" -}} +{{- coalesce .Values.uploads.bucket .Values.global.objectStorage.uploads.bucket -}} +{{- end -}} diff --git a/charts/registry/templates/configmap.yaml b/charts/registry/templates/configmap.yaml index 53d74e1aefe2a29bd54d19860829f742fa672bf5..e16acaee556c232a7ab2c099c47a29d78c7cb332 100644 --- a/charts/registry/templates/configmap.yaml +++ b/charts/registry/templates/configmap.yaml @@ -37,15 +37,14 @@ data: # This is provided from the initContainer execution, at a known path. rootcertbundle: /etc/docker/registry/certificate.crt storage: - {{- if .Values.storage }} -{{ toYaml .Values.storage | indent 6}} - {{- else if .Values.minio.enabled }} + {{- if .Values.global.objectStorage.registry.storage.secret }} + {{- else if .Values.global.minio.enabled }} s3: accesskey: "ACCESS_KEY" secretkey: "SECRET_KEY" region: us-east-1 regionendpoint: {{ template "registry.minio.url" . }} - bucket: {{ .Values.minio.bucket }} + bucket: {{ coalesce .Values.minio.bucket .Values.global.objectStorage.registry.bucket }} secure: true v4auth: true rootdirectory: / diff --git a/charts/registry/templates/deployment.yaml b/charts/registry/templates/deployment.yaml index ff12a55f40e06883f4a2be7b5055c96bd639a279..f0507cfabfd7a60bebc8f1464359e563b7ca4d6b 100644 --- a/charts/registry/templates/deployment.yaml +++ b/charts/registry/templates/deployment.yaml @@ -80,8 +80,19 @@ spec: items: - key: registry-auth.crt path: certificate.crt - {{- if .Values.minio.enabled }} + {{- if .Values.global.minio.enabled }} - secret: name: {{ template "gitlab.minio.credentials.secret" . }} {{- end }} + {{- if .Values.global.objectStorage.registry.storage.secret }} + - secret: + name: {{ .Values.global.objectStorage.registry.storage.secret }} + items: + - key: {{ default "config" .Values.global.objectStorage.registry.storage.key }} + path: storage/config + {{- if .Values.global.objectStorage.registry.storage.extraKey }} + - key: {{ .Values.global.objectStorage.registry.storage.extraKey }} + path: storage/{{ .Values.global.objectStorage.registry.storage.extraKey }} + {{- end }} + {{- end }} {{- end -}} diff --git a/charts/registry/values.yaml b/charts/registry/values.yaml index 87c01645a003b4031cd5e631308b515a76f71466..82ebbf506988e0a1f333e040816d04695832e7d4 100644 --- a/charts/registry/values.yaml +++ b/charts/registry/values.yaml @@ -58,6 +58,17 @@ init: else cp /config/config.yml /registry/config.yml fi + if [ -d /config/storage ]; then + # copy the contents of /config/storage to /registry/storage. + mkdir -p /registry/storage/ + cp /config/storage/* /registry/storage/ + # Indent /registry/storage/config 2 spaces to place into /registry/config.yml + sed -i 's/^/ /' /registry/storage/config + # Insert into /registry/config.yml after `storage:` + sed -i '/storage:/ r /registry/storage/config' /registry/config.yml + # remove extra file + rm /registry/storage/config + fi # Set to known path, to used ConfigMap cat /config/certificate.crt > /registry/certificate.crt diff --git a/values.yaml b/values.yaml index f6326d5b57c887d9c3998b2d99e81d6695bb621a..47d64fbaeb21c865125c22c6cac8f8cf1fa282bf 100644 --- a/values.yaml +++ b/values.yaml @@ -25,7 +25,24 @@ global: gitaly: authToken: {} minio: + enabled: true credentials: {} + objectStorage: + lfs: + bucket: git-lfs + connection: {} + artifacts: + bucket: gitlab-artifacts + connection: {} + uploads: + bucket: gitlab-uploads + connection: {} + registry: + bucket: registry + storage: {} + backups: + bucket: gitlab-backups + # `gitlab-runner` objectStorage configured at `gitlab-runner.runners.cache` below. shell: authToken: {} hostKeys: {}