How can I confirm that I'm using the CE GitLab runner?

Problem to solve

GitLab runner uses the enterprise edition (EE) rather than the community edition (CE) edition by default, and I want to use the CE version. I upgraded the helm chart with a configuration to select CE, but I don’t know whether that version was successfully selected, or if the config was ignored because helm was simply performing an upgrade of an existing chart. How can I confirm which version I’m using?

Steps to reproduce

With some basic defaults in the yml file, this should install EE edition:

$ helm install --namespace my-namespace --version 0.61.3 -f /etc/gitlab/values.yml gitlab-runner gitlab/gitlab-runner

Add the following to the .yml file:

## use community edition (CE) for runners:
image:
  repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-webservice-ce
workhorse:
  image: registry.gitlab.com/gitlab-org/build/cng/gitlab-workhorse-ce

Then try to install the CE edition:

$ helm upgrade --namespace my-namespace --version 0.62.0 -f /etc/gitlab/values.yml gitlab-runner gitlab/gitlab-runner

Now which version is installed?

This doesn’t tell us:

$ helm ls -n my-namespace
NAME            NAMESPACE               REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
gitlab-runner   my-namespace            28              2024-02-29 09:55:32.199872276 -0500 EST deployed        gitlab-runner-0.62.0    16.9.0

https://stackoverflow.com/a/73328999 suggests something like the following:

$ SECRET_NAME="sh.helm.release.v1.gitlab-runner.v28"
$ kubectl get secret -n my-namespace $SECRET_NAME -o json | jq .data.release | tr -d '"' | base64 -d | base64 -d | gzip -d | jq '.chart.metadata'
{
  "name": "gitlab-runner",
  "sources": [
    "https://gitlab.com/gitlab-org/charts/gitlab-runner",
    "https://gitlab.com/gitlab-org/gitlab-runner",
    "https://docs.gitlab.com/runner/"
  ],
  "version": "0.62.0",
  "description": "GitLab Runner",
  "keywords": [
    "git",
    "ci",
    "deploy"
  ],
  "maintainers": [
    {
      "name": "GitLab Inc.",
      "email": "support@gitlab.com"
    }
  ],
  "icon": "https://gitlab.com/uploads/-/system/project/avatar/250833/runner_logo.png",
  "apiVersion": "v1",
  "appVersion": "16.9.0"
}

But that doesn’t tell us if we’re running the CE version.

I also tried:

$ for x in $(seq 0 13) ; do kubectl get secret -n my-namespace $SECRET_NAME -o json | jq .data.release | tr -d '"' | base64 -d | base64 -d | gzip -d | jq '.chart.templates['"$x"'].data' | tr -d '"' | base64 -d ; done | less

but that doesn’t show any metion of “-ce” or “-ee”. A similar command, but with .chart.files instead of .chart.templates also doesn’t contain info I’m looking for.

The following does show the config that was read from, but it doesn’t answer my question of whether a helm chart upgrade will honor the new repo, or if this is just printing out all of the variables that have been set.

$ kubectl get secret -n my-namespace $SECRET_NAME -o json | jq .data.release | tr -d '"' | base64 -d | base64 -d | gzip -d | jq '.config'
{
  "gitlabUrl": "https://gitlab.example.org",
  "image": {
    "repository": "registry.gitlab.com/gitlab-org/build/cng/gitlab-webservice-ce"
  },
  "metrics": {
    "enabled": true
  },
  "rbac": {
    "clusterWideAccess": true,
    "create": true
  },
  "replicas": 1,
  "runnerRegistrationToken": "XXXXXX",
  "workhorse": {
    "image": "registry.gitlab.com/gitlab-org/build/cng/gitlab-workhorse-ce"
  }
}

How can I tell which edition of GitLab runner I’m running, and if it’s the EE, how do I switch to CE? Is it safe to uninstall the old chart and to install a new one, or will that remove unrecoverable data?

Thanks : )

Configuration

/etc/gitlab/values.yml:

runnerRegistrationToken: "XXXXXX"

gitlabUrl: "https://gitlab.example.org"

replicas: 1

rbac:
  create: true
  ## Define specific rbac permissions.
  # resources: ["pods", "pods/exec", "secrets"]
  # verbs: ["get", "list", "watch", "create", "patch", "delete"]
  ## Run the gitlab-bastion container with the ability to deploy/manage containers of jobs
  ## cluster-wide or only within namespace
  clusterWideAccess: true
  ## Use the following Kubernetes Service Account name if RBAC is disabled in this Helm chart (see rbac.create)
  ##
  # serviceAccountName: default
## Configure integrated Prometheus metrics exporter
## ref: https://docs.gitlab.com/runner/monitoring/#configuration-of-the-metrics-http-server
metrics:
  enabled: true

## use community edition (CE) for runners:
image:
  repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-webservice-ce
workhorse:
  image: registry.gitlab.com/gitlab-org/build/cng/gitlab-workhorse-ce

Versions

Versions

  • GitLab v16.9.1

Okay, it looks like I was confused… The following link that I misunderstood was:

I was missing the context that the page was part of a series about how to install GitLab itself as a Helm Chart, and was separate from the Omnibus instructions. :smile:

https://gitlab.com/gitlab-org/charts/gitlab-runner appears to be the only version of the GitLab runner, so we haven’t found a proprietary version yet.

Correct, GitLab Runner is open source and available under the MIT license. GitLab.org / gitlab-runner · GitLab GitLab as Server is distributed in Community and Enterprise Editions.