fix(network-agent): 容器加 NET_ADMIN 能力——agent 清除切换静态后残留的动态地址需要 ip addr del,默认能力集无此权限被静默拒绝
This commit is contained in:
1 parent
f0f67afbcb
commit
0c105e5224
1 file changed
+4
-1
@@ -52,9 +52,12 @@ spec:
|
||||
value: {{ .Values.k3sRestartOnIpChange | quote }}
|
||||
securityContext:
|
||||
# 只需 root + D-Bus socket,无需 privileged
|
||||
# NET_ADMIN: 清除切换静态后残留的动态地址(ip addr del 需要此能力)
|
||||
runAsUser: 0
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: false
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/network/health
|
||||
|
||||
Reference in new issue
Block a user