Kubernetes workspace init fails with custom trust certificates because chown traverses a read-only ConfigMap mount
#2955
-
State changed as build OD-7986 (16.4.0) is successful
-
OneDev
changed state to 'Closed' 3 weeks ago
Previous Value Current Value Open
Closed
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
16.3.4
|
| Labels |
No labels
|
Issue Votes (0)
Environment:
1dev/codexRun As:1001:1001/opt/onedev/conf/trust-certsProblem:
Kubernetes workspaces fail to start when custom trusted certificates are configured in OneDev.
This currently also prevents AI pull request reviews from running, as recent OneDev versions create a workspace to perform the review.
The repository itself is cloned successfully. However, the workspace initialization fails while attempting to change the ownership of
/onedev-workspace:The init container exits with code
1, after which the workspace is stopped.Suspected cause:
KubernetesProvisionercreates a ConfigMap containing OneDev's trusted certificates and mounts it at:Kubernetes ConfigMap volumes are read-only. The
WorkspaceInitcontainer subsequently runs:The recursive ownership change enters the nested ConfigMap mount and fails, even though the actual workspace PVC is writable.
This appears to affect Kubernetes workspaces using a non-root
Run Asvalue whenever custom trusted certificates are configured.Could you please have a look and confirm whether this is a bug or whether there is a recommended workaround?
Thank you very much!