Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount proc #432

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion deploy/helm/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ spec:
name: cni
- mountPath: /opt/cni/bin
name: kmesh-cni-install-path
- mountPath: /host/proc
name: host-procfs
readOnly: true
- mountPath: /var/run/secrets/istio
name: istiod-ca-cert
- mountPath: /var/run/secrets/tokens
Expand All @@ -90,6 +93,10 @@ spec:
- hostPath:
path: /opt/cni/bin
name: kmesh-cni-install-path
- name: host-procfs
hostPath:
path: /proc
type: Directory
- configMap:
defaultMode: 420
name: istio-ca-root-cert
Expand All @@ -102,4 +109,3 @@ spec:
audience: istio-ca
expirationSeconds: 43200
path: istio-token
hostPID: true
8 changes: 7 additions & 1 deletion deploy/yaml/kmesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ spec:
- name: kmesh-cni-install-path
hostPath:
path: /opt/cni/bin
- name: host-procfs
hostPath:
path: /proc
type: Directory
- name: istiod-ca-cert
configMap:
defaultMode: 420
Expand Down Expand Up @@ -105,6 +109,9 @@ spec:
- name: kmesh-cni-install-path
mountPath: /opt/cni/bin
readOnly: false
- mountPath: /host/proc
name: host-procfs
readOnly: true
- name: istiod-ca-cert
mountPath: /var/run/secrets/istio
- name: istio-token
Expand All @@ -116,4 +123,3 @@ spec:
cpu: "1"
priorityClassName: system-node-critical
serviceAccountName: kmesh
hostPID: true
4 changes: 2 additions & 2 deletions pkg/controller/bypass/bypass_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func getnspath(pod *corev1.Pod) (string, error) {
if err != nil {
return "", err
}
res = path.Join("/proc", res)
res = path.Join("/host/proc", res)
return res, nil
}

Expand All @@ -287,7 +287,7 @@ func BuiltinOrDir(dir string) fs.FS {

func FindNetnsForPod(pod *corev1.Pod) (string, error) {
netnsObserved := sets.New[uint64]()
fd := BuiltinOrDir("/proc")
fd := BuiltinOrDir("/host/proc")

entries, err := fs.ReadDir(fd, ".")
if err != nil {
Expand Down
Loading