Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf650519

Browse files
authored
feat: add run_as_non_root=True to Kubernetes Starter template (#16512)
This document sounds like `run_as_non_root=True` should be enabled forworkspaces.https://coder.com/docs/install/kubernetes#kubernetes-security-reference> All containers must run as non-root user> - Control plane - ...> - Workspaces - Workspace pod UID is [set in the Terraform templatehere](https://github.com/coder/coder/blob/f57ce97b5aadd825ddb9a9a129bb823a3725252b/examples/templates/kubernetes/main.tf#L274-L276),and are not required to run as root.Administrators of the Kubernetes of a cluster I am working on have addeda security check on it, and prevent creating pods, without`run_as_non_root=True`. So, I need to set it every time I create atemplate.According to the docs used with `run_as_user=1000` it should not havenegative effects and could be safely added.https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/
1 parentd7614a4 commitf650519

File tree

1 file changed

+3
-2
lines changed
  • examples/templates/kubernetes

1 file changed

+3
-2
lines changed

‎examples/templates/kubernetes/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,9 @@ resource "kubernetes_deployment" "main" {
278278
}
279279
spec {
280280
security_context {
281-
run_as_user=1000
282-
fs_group=1000
281+
run_as_user=1000
282+
fs_group=1000
283+
run_as_non_root=true
283284
}
284285

285286
container {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp