Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
456262c4
Commit
456262c4
authored
May 21, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8475 from dchen1107/clean
Create default LimitRange object for cluster: 100m cpu.share per container
parents
ad47b2d2
061155c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
kube-addons.sh
cluster/saltbase/salt/kube-addons/kube-addons.sh
+8
-0
init.sls
cluster/saltbase/salt/kube-admission-controls/init.sls
+10
-0
limit-range.yaml
...salt/kube-admission-controls/limit-range/limit-range.yaml
+9
-0
top.sls
cluster/saltbase/salt/top.sls
+1
-0
No files found.
cluster/saltbase/salt/kube-addons/kube-addons.sh
View file @
456262c4
...
@@ -112,6 +112,14 @@ while read line; do
...
@@ -112,6 +112,14 @@ while read line; do
create-kubeconfig-secret
"
${
token
}
"
"
${
username
}
"
create-kubeconfig-secret
"
${
token
}
"
"
${
username
}
"
done
< /srv/kubernetes/known_tokens.csv
done
< /srv/kubernetes/known_tokens.csv
# Create admission_control objects if defined before any other addon services. If the limits
# are defined in a namespace other than default, we should still create the limits for the
# default namespace.
for
obj
in
$(
find /etc/kubernetes/admission-controls
\(
-name
\*
.yaml
-o
-name
\*
.json
\)
)
;
do
start_addon
${
obj
}
100 10 &
echo
"++ obj
${
obj
}
is created ++"
done
for
obj
in
$(
find /etc/kubernetes/addons
\(
-name
\*
.yaml
-o
-name
\*
.json
\)
)
;
do
for
obj
in
$(
find /etc/kubernetes/addons
\(
-name
\*
.yaml
-o
-name
\*
.json
\)
)
;
do
start_addon
${
obj
}
100 10 &
start_addon
${
obj
}
100 10 &
echo
"++ addon
${
obj
}
starting in pid
$!
++"
echo
"++ addon
${
obj
}
starting in pid
$!
++"
...
...
cluster/saltbase/salt/kube-admission-controls/init.sls
0 → 100644
View file @
456262c4
{% 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 %}
cluster/saltbase/salt/kube-admission-controls/limit-range/limit-range.yaml
0 → 100644
View file @
456262c4
apiVersion
:
"
v1beta3"
kind
:
"
LimitRange"
metadata
:
name
:
"
limits"
spec
:
limits
:
-
type
:
"
Container"
default
:
cpu
:
"
100m"
cluster/saltbase/salt/top.sls
View file @
456262c4
...
@@ -39,6 +39,7 @@ base:
...
@@ -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 %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment