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