Have default LimitRange created for cluster: 100m cpu.share per container

This commit is contained in:
Dawn Chen
2015-05-18 17:55:56 -07:00
parent e1a153e841
commit 55501a6314
3 changed files with 20 additions and 0 deletions

View 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 %}

View File

@@ -0,0 +1,9 @@
apiVersion: "v1beta3"
kind: "LimitRange"
metadata:
name: "limits"
spec:
limits:
- type: "Container"
default:
cpu: "100m"

View File

@@ -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 %}