mirror of https://github.com/easzlab/kubeasz.git
fix系统ulimit设置
parent
b925682d25
commit
1e4b3147bd
|
@ -49,8 +49,12 @@
|
|||
shell: "sysctl -p /etc/sysctl.d/95-k8s-sysctl.conf"
|
||||
ignore_errors: true
|
||||
|
||||
# 设置系统 ulimits
|
||||
- name: 创建 systemd 配置目录
|
||||
file: name=/etc/systemd/system.conf.d state=directory
|
||||
|
||||
- name: 设置系统 ulimits
|
||||
template: src=30-k8s-ulimits.conf.j2 dest=/etc/security/limits.d/30-k8s-ulimits.conf
|
||||
template: src=30-k8s-ulimits.conf.j2 dest=/etc/systemd/system.conf.d/30-k8s-ulimits.conf
|
||||
|
||||
- name: 把SCTP列入内核模块黑名单
|
||||
copy: src=sctp.conf dest=/etc/modprobe.d/sctp.conf
|
||||
|
|
|
@ -23,12 +23,6 @@
|
|||
- ipvsadm
|
||||
state: present
|
||||
|
||||
- name: 设置 ulimits
|
||||
lineinfile:
|
||||
dest: /etc/profile
|
||||
regexp: "ulimit -SHn"
|
||||
line: "ulimit -SHn 65535"
|
||||
|
||||
# 优化设置 journal 日志相关,避免日志重复搜集,浪费系统资源
|
||||
- name: 准备 journal 日志相关目录
|
||||
file: name={{ item }} state=directory
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
* soft nofile 65536
|
||||
* hard nofile 65536
|
||||
* soft nproc 65536
|
||||
* hard nproc 65536
|
||||
[Manager]
|
||||
DefaultLimitCORE=infinity
|
||||
DefaultLimitNOFILE=100000
|
||||
DefaultLimitNPROC=100000
|
||||
|
|
Loading…
Reference in New Issue