From 3d20bad9bc3e198451f487fcd82aff613d8ae9eb Mon Sep 17 00:00:00 2001 From: Lemegeton Clavicula Salomonis <19424305-lemegeton@users.noreply.gitlab.com> Date: Thu, 26 Jun 2025 21:31:33 +0200 Subject: [PATCH 1/3] fix(toolbox): ensure minio works properly over HTTP --- .../charts/toolbox/templates/configmap.yaml | 1 + templates/_helpers.tpl | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/charts/gitlab/charts/toolbox/templates/configmap.yaml b/charts/gitlab/charts/toolbox/templates/configmap.yaml index f465e6a7a5..fc98c12bab 100644 --- a/charts/gitlab/charts/toolbox/templates/configmap.yaml +++ b/charts/gitlab/charts/toolbox/templates/configmap.yaml @@ -150,6 +150,7 @@ data: use_mime_magic = False verbosity = WARNING website_endpoint = {{ template "gitlab.minio.url" . }} + use_https = {{ template "gitlab.minio.https" . }} EOF else mv "/${secret_dir}/objectstorage/.s3cfg" "/${secret_dir}/.s3cfg" diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index d462d8a8fa..f29f198216 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -69,12 +69,32 @@ otherwise the hostname will be assembled using `minio` as the prefix, and the `g {{- coalesce .Values.global.hosts.minio.name (include "gitlab.assembleHost" (dict "name" "minio" "context" . )) -}} {{- end -}} +{{/* +Returns the minio protocol. +*/}} + +{{- define "gitlab.minio.https" -}} +{{- if hasKey .Values.global.hosts.minio "https" }} +{{- if .Values.global.hosts.minio.https }} +{{- printf "True" -}} +{{- else }} +{{- printf "False" -}} +{{- end }} +{{- else }} +{{- if .Values.global.hosts.https }} +{{- printf "True" -}} +{{- else }} +{{- printf "False" -}} +{{- end }} +{{- end }} +{{- end -}} + {{/* Returns the minio url. */}} {{- define "gitlab.minio.url" -}} -{{- if or .Values.global.hosts.https .Values.global.hosts.minio.https -}} +{{- if eq (include "gitlab.minio.https" .) "True" -}} {{- printf "https://%s" (include "gitlab.minio.hostname" .) -}} {{- else -}} {{- printf "http://%s" (include "gitlab.minio.hostname" .) -}} -- GitLab From 31e7ea8bf0ecd6f5385515d0fed1dd0d2be726c3 Mon Sep 17 00:00:00 2001 From: Lemegeton Clavicula Salomonis <19424305-lemegeton@users.noreply.gitlab.com> Date: Thu, 26 Jun 2025 21:49:44 +0200 Subject: [PATCH 2/3] removing wild tab character from YAML configmap --- charts/gitlab/charts/toolbox/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitlab/charts/toolbox/templates/configmap.yaml b/charts/gitlab/charts/toolbox/templates/configmap.yaml index fc98c12bab..da43181b10 100644 --- a/charts/gitlab/charts/toolbox/templates/configmap.yaml +++ b/charts/gitlab/charts/toolbox/templates/configmap.yaml @@ -150,7 +150,7 @@ data: use_mime_magic = False verbosity = WARNING website_endpoint = {{ template "gitlab.minio.url" . }} - use_https = {{ template "gitlab.minio.https" . }} + use_https = {{ template "gitlab.minio.https" . }} EOF else mv "/${secret_dir}/objectstorage/.s3cfg" "/${secret_dir}/.s3cfg" -- GitLab From 99a5397a7da866f83e2f1bf3e6f5ce930a828a1c Mon Sep 17 00:00:00 2001 From: Lemegeton Clavicula Salomonis <19424305-lemegeton@users.noreply.gitlab.com> Date: Sat, 28 Jun 2025 23:49:56 +0200 Subject: [PATCH 3/3] fix(runner): ensure caching using minio works properly over HTTP --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index 772ba9bb08..2d6ef1e0b6 100644 --- a/values.yaml +++ b/values.yaml @@ -1360,7 +1360,7 @@ gitlab-runner: ServerAddress = {{ include "gitlab-runner.cache-tpl.s3ServerAddress" . }} BucketName = "runner-cache" BucketLocation = "us-east-1" - Insecure = false + Insecure = {{ if eq (include "gitlab.minio.https" .) "True" }}false{{ else }}true{{ end }} {{ end }} podAnnotations: gitlab.com/prometheus_scrape: "true" -- GitLab