Skip to content

Commit

Permalink
Updates inotify.max_user_watches from a daemonset on all hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagerod committed Sep 28, 2024
1 parent 18729ed commit 83e07d3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ resources:
- JOBS_SHELL_MONITOR_SCRIPT=infra/delete-manual-jobs-script.sh
tags: [namespaces, rmq, tasks]
# endregion
- name: node-setup
file: infra/cluster/node-setup.yaml
- name: calico
file: infra/cluster/calico.yaml
tags: [network]
Expand Down
33 changes: 33 additions & 0 deletions infra/cluster/node-setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-setup
labels:
k8s-app: node-setup
spec:
selector:
matchLabels:
name: node-setup
template:
metadata:
labels:
name: node-setup
spec:
containers:
- name: node-setup
image: registry.internal.aleemhaji.com/busybox:1.35.0
command:
- sh
- -xefc
- |
sysctl -w fs.inotify.max_user_watches="$INOTIFY_MAX_USER_WATCHES"
cat /proc/sys/fs/inotify/max_user_watches
while true; do
echo >&2 "Still sleeping..."
sleep 3600
done
env:
- name: INOTIFY_MAX_USER_WATCHES
value: "1048576"
securityContext:
privileged: true

0 comments on commit 83e07d3

Please sign in to comment.