Skip to content

Fix documentation issue in Kubernetes node_selector

What does this MR do?

Updates the documentation to show the correct format for the KUBERNETES_NODE_SELECTOR environment variable.

Why was this MR needed?

The existing documentation was misleading users.

What's the best way to test this MR?

Run the following command:

KUBERNETES_NODE_SELECTOR='beta.kubernetes.io/instance-type:n1-standard-2' gitlab-runner register --executor "kubernetes" --url "https://gitlab.com/" --description 'test executor' --tag-list "kubernetes,gitlab.com" --locked="false" --access-level="not_protected" --registration-token="<your-token>" --non-interactive
Resulting config.toml
[[runners]]
  name = "test executor"
  url = "https://gitlab.com/"
  token = "pcYsa4wHeKpzx5Nb3QsB"
  executor = "kubernetes"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.kubernetes]
    host = ""
    bearer_token_overwrite_allowed = false
    image = ""
    namespace = ""
    namespace_overwrite_allowed = ""
    privileged = false
    service_account_overwrite_allowed = ""
    pod_annotations_overwrite_allowed = ""
    [runners.kubernetes.node_selector]
      "beta.kubernetes.io/instance-type" = "n1-standard-2"
    [runners.kubernetes.affinity]
    [runners.kubernetes.pod_security_context]
    [runners.kubernetes.volumes]
    [runners.kubernetes.dns_config]

What are the relevant issue numbers?

Closes #2968 (closed)

Merge request reports