- Move flat service manifests into structured subdirs (apps/, bootstrap-jobs/, repair-jobs/, migration-jobs/, validation-jobs/, node-ops/, networking/) - Retire oneoffs/ directories across services - Remove oceanus cluster and its host roles; add aether cluster + terraform scaffolding - Reorganize scripts/ into ops/, render/, sync/, manual-tests/ - Add Makefile with render/validate/test/flux targets and repo-structure tests - Update flux-system application CRs to the new paths - Add hermes-automated-triage-24h-plan knowledge doc (+ comms mirror) - Refresh knowledge catalogs, dashboards, vmalert rules, quality contract Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
limit_line="LimitNOFILE=1048576"
|
|
sysctl_file="/host/etc/sysctl.d/99-atlas-inotify.conf"
|
|
changed=0
|
|
|
|
for unit in k3s k3s-agent; do
|
|
unit_file="/host/etc/systemd/system/${unit}.service"
|
|
if [ -f "${unit_file}" ]; then
|
|
dropin_dir="/host/etc/systemd/system/${unit}.service.d"
|
|
dropin_file="${dropin_dir}/99-nofile.conf"
|
|
if [ ! -f "${dropin_file}" ] || ! grep -q "${limit_line}" "${dropin_file}"; then
|
|
mkdir -p "${dropin_dir}"
|
|
printf "[Service]\n%s\n" "${limit_line}" > "${dropin_file}"
|
|
changed=1
|
|
fi
|
|
fi
|
|
done
|
|
|
|
mkdir -p "$(dirname "${sysctl_file}")"
|
|
cat > "${sysctl_file}" <<'EOF'
|
|
fs.inotify.max_user_instances = 8192
|
|
fs.inotify.max_user_watches = 524288
|
|
fs.inotify.max_queued_events = 32768
|
|
EOF
|
|
|
|
printf "8192" > /host/proc/sys/fs/inotify/max_user_instances
|
|
printf "524288" > /host/proc/sys/fs/inotify/max_user_watches
|
|
printf "32768" > /host/proc/sys/fs/inotify/max_queued_events
|
|
|
|
if [ "${changed}" -eq 1 ]; then
|
|
sleep "$(( (RANDOM % 300) + 10 ))"
|
|
chroot /host /bin/systemctl daemon-reload
|
|
for unit in k3s k3s-agent; do
|
|
if [ -f "/host/etc/systemd/system/${unit}.service" ]; then
|
|
chroot /host /bin/systemctl restart "${unit}"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
sleep infinity
|