mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Have default LimitRange created for cluster: 100m cpu.share per container
This commit is contained in:
10
cluster/saltbase/salt/kube-admission-controls/init.sls
Normal file
10
cluster/saltbase/salt/kube-admission-controls/init.sls
Normal file
@@ -0,0 +1,10 @@
|
||||
{% if 'LimitRanger' in pillar.get('admission_control', '') %}
|
||||
/etc/kubernetes/admission-controls/limit-range:
|
||||
file.recurse:
|
||||
- source: salt://kube-admission-controls/limit-range
|
||||
- include_pat: E@(^.+\.yaml$|^.+\.json$)
|
||||
- user: root
|
||||
- group: root
|
||||
- dir_mode: 755
|
||||
- file_mode: 644
|
||||
{% endif %}
|
@@ -0,0 +1,9 @@
|
||||
apiVersion: "v1beta3"
|
||||
kind: "LimitRange"
|
||||
metadata:
|
||||
name: "limits"
|
||||
spec:
|
||||
limits:
|
||||
- type: "Container"
|
||||
default:
|
||||
cpu: "100m"
|
@@ -39,6 +39,7 @@ base:
|
||||
- cadvisor
|
||||
- kube-client-tools
|
||||
- kube-master-addons
|
||||
- kube-admission-controls
|
||||
{% if grains['cloud'] is defined and grains['cloud'] != 'vagrant' %}
|
||||
- logrotate
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user