diff --git a/.gitattributes b/.gitattributes index 86b8c43..9849507 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ *.service linguist-language=systemd +*.slice linguist-language=systemd *.timer linguist-language=systemd *.path linguist-language=systemd diff --git a/etc/systemd/system/coredns.slice b/etc/systemd/system/coredns.slice new file mode 100644 index 0000000..d69faf0 --- /dev/null +++ b/etc/systemd/system/coredns.slice @@ -0,0 +1,16 @@ +[Unit] +Description=Slice that limits coredns.service +Before=slices.target +; Wants=network.target + +[Slice] +; CPUAccounting=yes +; CPUQuota=5% + +MemoryAccounting=yes +MemoryHigh=120M +MemoryMax=128M +MemorySwapMax=64M + +[Install] +WantedBy=multi-user.target