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
|
- cadvisor
|
||||||
- kube-client-tools
|
- kube-client-tools
|
||||||
- kube-master-addons
|
- kube-master-addons
|
||||||
|
- kube-admission-controls
|
||||||
{% if grains['cloud'] is defined and grains['cloud'] != 'vagrant' %}
|
{% if grains['cloud'] is defined and grains['cloud'] != 'vagrant' %}
|
||||||
- logrotate
|
- logrotate
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user