Commit cb1d4bb4 authored by Balasankar "Balu" C's avatar Balasankar "Balu" C

Keep object storage settings only in the template

Signed-off-by: Balasankar "Balu" C's avatarBalasankar "Balu" C <balasankar@gitlab.com>
parent 61df730d
......@@ -68,11 +68,21 @@ data:
{{- include "gitlab.appConfig.cronJobs" . | nindent 6 }}
{{ include "gitlab.appConfig.extra" . | indent 6 }}
{{- end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "packages" "config" $.Values.global.appConfig.packages "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 6 }}
artifacts:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.artifacts.enabled }}{{ eq $.Values.global.appConfig.artifacts.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts "context" $) | nindent 8 }}
lfs:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.lfs.enabled }}{{ eq $.Values.global.appConfig.lfs.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs "context" $) | nindent 8 }}
uploads:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.uploads.enabled }}{{ eq $.Values.global.appConfig.uploads.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads "context" $) | nindent 8 }}
packages:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.packages.enabled }}{{ eq $.Values.global.appConfig.packages.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "packages" "config" $.Values.global.appConfig.packages "context" $) | nindent 8 }}
external_diffs:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.externalDiffs.enabled }}{{ eq $.Values.global.appConfig.externalDiffs.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 8 }}
{{- include "gitlab.appConfig.pseudonymizer.configuration" $ | nindent 6 }}
pages:
enabled: false
......
......@@ -44,9 +44,15 @@ data:
{{- end }}
artifacts:
enabled: true
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "packages" "config" $.Values.global.appConfig.packages "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 6 }}
lfs:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.lfs.enabled }}{{ eq $.Values.global.appConfig.lfs.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs "context" $) | nindent 8 }}
packages:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.packages.enabled }}{{ eq $.Values.global.appConfig.packages.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "packages" "config" $.Values.global.appConfig.packages "context" $) | nindent 8 }}
external_diffs:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.externalDiffs.enabled }}{{ eq $.Values.global.appConfig.externalDiffs.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 8 }}
{{- include "gitlab.appConfig.pseudonymizer.configuration" $ | nindent 6 }}
pages:
enabled: false
......
......@@ -97,11 +97,21 @@ data:
ssl_url: {{ .gravatar.sslUrl }}
{{ include "gitlab.appConfig.extra" . | indent 6 }}
{{- end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "packages" "config" $.Values.global.appConfig.packages "context" $) | nindent 6 }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 6 }}
artifacts:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.artifacts.enabled }}{{ eq $.Values.global.appConfig.artifacts.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts "context" $) | nindent 8 }}
lfs:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.lfs.enabled }}{{ eq $.Values.global.appConfig.lfs.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs "context" $) | nindent 8 }}
uploads:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.uploads.enabled }}{{ eq $.Values.global.appConfig.uploads.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads "context" $) | nindent 8 }}
packages:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.packages.enabled }}{{ eq $.Values.global.appConfig.packages.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "packages" "config" $.Values.global.appConfig.packages "context" $) | nindent 8 }}
external_diffs:
enabled: {{ if kindIs "bool" $.Values.global.appConfig.externalDiffs.enabled }}{{ eq $.Values.global.appConfig.externalDiffs.enabled true }}{{ end }}
{{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 8 }}
pages:
enabled: false
mattermost:
......
......@@ -10,26 +10,24 @@ Usage:
) }}
*/}}
{{- define "gitlab.appConfig.objectStorage.configuration" -}}
{{ .name }}:
enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }}
object_store:
enabled: true
remote_directory: {{ .config.bucket }}
direct_upload: true
background_upload: false
proxy_download: {{ or (not (kindIs "bool" .config.proxy_download)) .config.proxy_download }}
{{- if .context.Values.global.minio.enabled }}
connection:
provider: AWS
region: us-east-1
aws_access_key_id: "<%= File.read('/etc/gitlab/minio/accesskey') %>"
aws_secret_access_key: "<%= File.read('/etc/gitlab/minio/secretkey') %>"
host: {{ template "gitlab.minio.hostname" .context }}
endpoint: {{ template "gitlab.minio.endpoint" .context }}
path_style: true
{{- else if .config.connection }}
connection: <%= YAML.load_file("/etc/gitlab/objectstorage/{{ .name }}").to_json() %>
{{- end -}}
object_store:
enabled: true
remote_directory: {{ .config.bucket }}
direct_upload: true
background_upload: false
proxy_download: {{ or (not (kindIs "bool" .config.proxy_download)) .config.proxy_download }}
{{- if .context.Values.global.minio.enabled }}
connection:
provider: AWS
region: us-east-1
aws_access_key_id: "<%= File.read('/etc/gitlab/minio/accesskey') %>"
aws_secret_access_key: "<%= File.read('/etc/gitlab/minio/secretkey') %>"
host: {{ template "gitlab.minio.hostname" .context }}
endpoint: {{ template "gitlab.minio.endpoint" .context }}
path_style: true
{{- else if .config.connection }}
connection: <%= YAML.load_file("/etc/gitlab/objectstorage/{{ .name }}").to_json() %>
{{- end -}}
{{- end -}}{{/* "gitlab.appConfig.objectStorage.configuration" */}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment