Document that the Operator overrides the template namespace
What does this MR do?
A namespace set in a configuration template for the GitLab Runner Operator has no effect. By default, job pods start in the namespace of the Runner resource. The Operator sets KUBERNETES_NAMESPACE on the runner pod (where it is set, where the value comes from), and GitLab Runner prefers that value over the template at registration, as the registration docs describe.
This MR adds kubernetes.namespace to the known-issue table on the Operator configuration page, next to the other settings that need an environment variable. The default value is the namespace of the Runner resource.
With Operator v1.54.0 and GitLab Runner v19.5.0, job pods run in:
- the namespace of the
Runnerresource, when the template setsnamespaceor sets nothing; - the namespace in
KUBERNETES_NAMESPACE, when the ConfigMap named inspec.envof theRunnerresource sets it; - the namespace in
spec.namespaceof theRunnerresource, when that field is set.
Outside the Operator, gitlab-runner register with KUBERNETES_NAMESPACE set also replaces the template's namespace. gitlab-runner run with the same namespace in config.toml, and no registration step, keeps it.
The Operator MR gitlab-org/gl-openshift/gitlab-runner-operator!306 changes this precedence. The row can go once that ships.
Related issues
gitlab-org/gl-openshift/gitlab-runner-operator#229 (closed) reports the same precedence, and the table already links it. The bot auto-closed it as stale on 21 September, and the Operator MR above still closes it.
Author's checklist
- Optional. Consider taking the GitLab Technical Writing Fundamentals course.
- Follow the:
- If you're adding or changing the main heading of the page (H1), ensure that the product availability details are added.
- If you are a GitLab team member, request a review based on:
- The documentation page's metadata.
- The associated Technical Writer.
If you are a GitLab team member and only adding documentation, do not add any of the following labels:
~"frontend"~"backend"~"type::bug"~"database"
These labels cause the MR to be added to code verification QA issues.
Reviewer's checklist
Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.
If you aren't sure which tech writer to ask, use roulette or ask in the #docs Slack channel.
- If the content requires it, ensure the information is reviewed by a subject matter expert.
- Technical writer review items:
- Ensure docs metadata is present and up-to-date.
- Ensure the appropriate labels are added to this MR.
- Ensure a release milestone is set.
- If relevant to this MR, ensure content topic type principles are in use, including:
- The headings should be something you'd do a Google search for. Instead of
Default behavior, say something likeDefault behavior when you close an issue. - The headings (other than the page title) should be active. Instead of
Configuring GDK, say something likeConfigure GDK. - Any task steps should be written as a numbered list.
- If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
- The headings should be something you'd do a Google search for. Instead of
- Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
An AI coding assistant wrote this change. The assistant also checked the Operator behavior against environments.go at Operator v1.54.0 and the text of the linked Operator MR and issue, ran each described behavior on a disposable Kubernetes cluster on a GCE VM, and ran markdownlint, lychee and Vale on the changed page.