8000 fix: cadvisor can pickup oom events by michaellzc · Pull Request #4126 · sourcegraph/deploy-sourcegraph · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
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: 8 additions & 0 deletions base/cadvisor/cadvisor.DaemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,15 @@ spec:
- name: disk
mountPath: /dev/disk
readOnly: true
- name: kmsg
mountPath: /dev/kmsg
readOnly: true
ports:
- name: http
containerPort: 48080
protocol: TCP
securityContext:
privileged: true
automountServiceAccountToken: false
terminationGracePeriodSeconds: 30
volumes:
Expand All @@ -80,3 +85,6 @@ spec:
- name: disk
hostPath:
path: /dev/disk
- name: kmsg
hostPath:
path: /dev/kmsg
21 changes: 21 additions & 0 deletions overlays/non-privileged/cadvisor/cadvisor.DaemonSet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cadvisor
spec:
template:
spec:
containers:
- name: cadvisor
volumeMounts:
- name: kmsg
mountPath: /dev/kmsg
readOnly: true
$patch: delete
securityContext:
privileged: null
volumes:
- name: kmsg
hostPath:
path: /dev/kmsg
$patch: delete
1 change: 1 addition & 0 deletions overlays/non-privileged/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resources:
- frontend/sourcegraph-frontend.RoleBinding.yaml
- prometheus/prometheus.RoleBinding.yaml
patchesStrategicMerge:
- cadvisor/cadvisor.DaemonSet.yaml
- codeintel-db/codeintel-db.Deployment.yaml
- codeinsights-db/codeinsights-db.Deployment.yaml
- frontend/sourcegraph-frontend.Deployment.yaml
Expand Down
0