Skip to content

Gitaly, gitlab-shell fail to connect to unicorn/workhorse

Summary

#1506 (closed) was fixed in !1114 (merged), which means that deploy will fail for depending on the use of the previous configuration values, especially when a different service naming scheme is used than what is expected by the gitlab chart.

Steps to reproduce

use the following extra templates:

{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" $name .Release.Name | trunc 63 | trimSuffix "-" | lower -}}
{{- end -}}

Configuration used

(Please provide a sanitized version of the configuration used wrapped in a code block (```yaml))

unicorn:
  nameOverride: gitlab-unicorn # this will result in the Unicorn service being named `gitlab-unicorn-chartname`
gitaly:
  unicorn:
    host: gitlab-unicorn-chartname # note this is not the default. default would be `chartname-unicorn`
gitlab-shell:
  unicorn:
    host: gitlab-unicorn-chartname # same here

Current behavior

Gitaly, gitlab-shell configurations are updated to the default values, without a warning, and therefore will fail to connect

apiVersion: v1
kind: ConfigMap
metadata:
  name: gitaly-chartname
  namespace: gitlab
  ...
data:
  ...
  shell-config.yml.erb: |
    # GitLab user. git by default
    user: git

    # Url to gitlab instance. Used for api calls. Should end with a slash.
    gitlab_url: "http://chartname-unicorn:8181/" 

Expected behavior

An error is generated when updating use of the 'unicorn' configuration field of this chart is removed in favor of 'workhorse'. Renaming it should do the trick.

apiVersion: v1
kind: ConfigMap
metadata:
  name: gitaly-chartname
  namespace: gitlab
  ...
data:
  ...
  shell-config.yml.erb: |
    # GitLab user. git by default
    user: git

    # Url to gitlab instance. Used for api calls. Should end with a slash.
    gitlab_url: "http://gitlab-unicorn-chartname:8181/"

Versions

  • Chart: 3-1-stable
  • Platform:
    • Self-hosted: AWS via KOPS
  • Kubernetes: (kubectl version)
    • N/A
  • Helm: (helm version)
    • Client: v2.14.0

Relevant logs

N/A