Workspaces - unable to configure second container component - duplicate entries for key [mountPath="/projects"] error
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When specifying a second container definition in the .devfile.yaml file the workspace remains in the creating state and no pod is created.
The agent log shows the following error relating to a duplicate entry for a volumeMount:
"ApplyEvent{ GroupName: \"apply-0\", Status: \"Failed\", Identifier: \"gl-rd-ns-3-33-kwfqnj_workspace-3-33-kwfqnj_apps_Deployment\", Error: \"failed to create typed patch object (gl-rd-ns-3-33-kwfqnj/workspace-3-33-kwfqnj; apps/v1, Kind=Deployment): .spec.template.spec.containers[name=\\\"tooling-container2\\\"].volumeMounts: duplicate entries for key [mountPath=\\\"/projects\\\"]\" }"
The devfile is:
schemaVersion: 2.2.0
variables:
registry-root: registry.gitlab.com
components:
- name: tooling-container
attributes:
gl/inject-editor: true
container:
image: "{{registry-root}}/gitlab-org/remote-development/gitlab-remote-development-docs/ubuntu:22.04"
endpoints:
- name: example-app
protocol: https
targetPort: 8000
exposure: public
- name: tooling-container2
container:
image: "docker:dind"
endpoints:
- name: example-app2
protocol: https
targetPort: 8001
exposure: public
The documentation and this FAQ issue suggest it should be possible to provision service containers alongside the main editor container.
Am I missing some configuration? Or is this actually not supported?
Using GitLab version 17.7 and Agent version 17.7.0
Steps to reproduce
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:env:info\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:check SANITIZE=true\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\`) (we will only investigate if the tests are passing)
Possible fixes
Edited by 🤖 GitLab Bot 🤖