Workhorse template uses deprecated `slice` function incompatible with gomplate v5 shipped in 18.9.x CNG images
## Summary GitLab 18.9.0 and 18.9.1 ship CNG images containing gomplate v5.0.0, but the chart templates on the `8-9-stable` release branch still use the deprecated `slice` function alias (removed in gomplate v5). This causes workhorse pods to crash-loop on startup with: ``` cannot index slice/array with type string ``` The fix ([commit d4272e4e](https://gitlab.com/gitlab-org/charts/gitlab/-/commit/d4272e4e6d665fcdfbdb6d1f49f8a69faac0fce5)) was merged to `master` on Feb 20, but was not backported to `8-9-stable` before the 18.9.1 release on Feb 24. ## Steps to reproduce 1. Deploy GitLab 18.9.0 or 18.9.1 using the GitLab Helm Chart (or GitLab Operator) with object storage configured 2. Observe workhorse pods crash-looping ## Configuration used Any configuration using consolidated object storage with a supported provider (AWS, AzureRM, or Google) will trigger this. ## Current behavior The workhorse ConfigMap template at `charts/gitlab/charts/webservice/templates/_helpers.tpl` on the `8-9-stable` branch contains: ``` {%- $supported_providers := slice "AWS" "AzureRM" "Google" -%} ``` gomplate v5.0.0 (shipped in the 18.9.x CNG images since [CNG commit 898bd871](https://gitlab.com/gitlab-org/build/CNG/-/commit/898bd8718b8cc3fe13015c721ab543cd0400cc71), Feb 17) removed the `slice` alias. In v5, `slice` resolves to Go's built-in `text/template` `slice` function, which expects an array and index arguments, not individual strings. This produces the error `cannot index slice/array with type string`. ## Expected behavior The template should use `coll.Slice` (available since gomplate v3.2.0) which is compatible with both gomplate v4.x and v5.x: ``` {%- $supported_providers := coll.Slice "AWS" "AzureRM" "Google" -%} ``` This fix already exists on `master` ([commit d4272e4e](https://gitlab.com/gitlab-org/charts/gitlab/-/commit/d4272e4e6d665fcdfbdb6d1f49f8a69faac0fce5)) and needs to be backported to `8-9-stable` for an 18.9.2 patch release. ## Timeline | Date | Event | |------|-------| | Feb 17 | CNG Renovate Bot bumps gomplate v4.3.2 → v5.0.0 | | Feb 18 | Chart 9.9.0 released (GitLab 18.9.0) — `8-9-stable` branch still has `slice` | | Feb 20 | `slice` → `coll.Slice` fix merged to `master` | | Feb 24 | Chart 9.9.1 released (GitLab 18.9.1) — fix still not on `8-9-stable` | ## Versions - Chart: 9.9.0 / 9.9.1 (`8-9-stable` branch) - CNG gomplate: v5.0.0 - Affects both Helm Chart and GitLab Operator deployments ## Related issues - https://gitlab.com/gitlab-org/charts/gitlab/-/issues/5981 (prior gomplate 4.x compatibility work, closed) - https://gitlab.com/gitlab-org/build/CNG/-/issues/2287 (gomplate v5 update, closed) - https://gitlab.com/gitlab-org/build/CNG/-/issues/2160 (renovate bot rules for gomplate, open) - https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/2266 (original gomplate v4 bump) ## Operator note Customers using the GitLab Operator cannot work around this by manually editing the ConfigMap, as the operator reconciles ConfigMaps via `ownerReferences` and will overwrite manual changes on the next reconciliation cycle.
issue