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
aff9ee5a
Commit
aff9ee5a
authored
Sep 01, 2015
by
derekwaynecarr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable CFS quota in vagrant setup
parent
5dc74e8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
1 deletion
+11
-1
default
cluster/saltbase/salt/kubelet/default
+6
-1
config-default.sh
cluster/vagrant/config-default.sh
+3
-0
provision-master.sh
cluster/vagrant/provision-master.sh
+1
-0
util.sh
cluster/vagrant/util.sh
+1
-0
No files found.
cluster/saltbase/salt/kubelet/default
View file @
aff9ee5a
...
@@ -97,10 +97,15 @@
...
@@ -97,10 +97,15 @@
{% set pod_cidr = "--pod-cidr=" + grains['cbr-cidr'] %}
{% set pod_cidr = "--pod-cidr=" + grains['cbr-cidr'] %}
{% endif %}
{% endif %}
{% set cpu_cfs_quota = "" %}
{% if pillar['enable_cpu_cfs_quota'] is defined -%}
{% set cpu_cfs_quota = "--cpu-cfs-quota=" + pillar['enable_cpu_cfs_quota'] -%}
{% endif -%}
{% set test_args = "" -%}
{% set test_args = "" -%}
{% if pillar['kubelet_test_args'] is defined -%}
{% if pillar['kubelet_test_args'] is defined -%}
{% set test_args=pillar['kubelet_test_args'] %}
{% set test_args=pillar['kubelet_test_args'] %}
{% endif -%}
{% endif -%}
# test_args has to be kept at the end, so they'll overwrite any prior configuration
# test_args has to be kept at the end, so they'll overwrite any prior configuration
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{test_args}}"
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{
cpu_cfs_quota}} {{
test_args}}"
cluster/vagrant/config-default.sh
View file @
aff9ee5a
...
@@ -76,6 +76,9 @@ ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
...
@@ -76,6 +76,9 @@ ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
#EXTRA_DOCKER_OPTS="-b=cbr0 --selinux-enabled --insecure-registry 10.0.0.0/8"
#EXTRA_DOCKER_OPTS="-b=cbr0 --selinux-enabled --insecure-registry 10.0.0.0/8"
EXTRA_DOCKER_OPTS
=
"-b=cbr0 --insecure-registry 10.0.0.0/8"
EXTRA_DOCKER_OPTS
=
"-b=cbr0 --insecure-registry 10.0.0.0/8"
# Flag to tell the kubelet to enable CFS quota support
ENABLE_CPU_CFS_QUOTA
=
"
${
KUBE_ENABLE_CPU_CFS_QUOTA
:-
true
}
"
# Optional: Install cluster DNS.
# Optional: Install cluster DNS.
ENABLE_CLUSTER_DNS
=
"
${
KUBE_ENABLE_CLUSTER_DNS
:-
true
}
"
ENABLE_CLUSTER_DNS
=
"
${
KUBE_ENABLE_CLUSTER_DNS
:-
true
}
"
DNS_SERVER_IP
=
"10.247.0.10"
DNS_SERVER_IP
=
"10.247.0.10"
...
...
cluster/vagrant/provision-master.sh
View file @
aff9ee5a
...
@@ -126,6 +126,7 @@ cat <<EOF >/srv/salt-overlay/pillar/cluster-params.sls
...
@@ -126,6 +126,7 @@ cat <<EOF >/srv/salt-overlay/pillar/cluster-params.sls
dns_domain: '
$(
echo
"
$DNS_DOMAIN
"
|
sed
-e
"s/'/''/g"
)
'
dns_domain: '
$(
echo
"
$DNS_DOMAIN
"
|
sed
-e
"s/'/''/g"
)
'
instance_prefix: '
$(
echo
"
$INSTANCE_PREFIX
"
|
sed
-e
"s/'/''/g"
)
'
instance_prefix: '
$(
echo
"
$INSTANCE_PREFIX
"
|
sed
-e
"s/'/''/g"
)
'
admission_control: '
$(
echo
"
$ADMISSION_CONTROL
"
|
sed
-e
"s/'/''/g"
)
'
admission_control: '
$(
echo
"
$ADMISSION_CONTROL
"
|
sed
-e
"s/'/''/g"
)
'
enable_cpu_cfs_quota: '
$(
echo
"
$ENABLE_CPU_CFS_QUOTA
"
|
sed
-e
"s/'/''/g"
)
'
EOF
EOF
# Configure the salt-master
# Configure the salt-master
...
...
cluster/vagrant/util.sh
View file @
aff9ee5a
...
@@ -153,6 +153,7 @@ function create-provision-scripts {
...
@@ -153,6 +153,7 @@ function create-provision-scripts {
echo
"KUBELET_TOKEN='
${
KUBELET_TOKEN
:-}
'"
echo
"KUBELET_TOKEN='
${
KUBELET_TOKEN
:-}
'"
echo
"KUBE_PROXY_TOKEN='
${
KUBE_PROXY_TOKEN
:-}
'"
echo
"KUBE_PROXY_TOKEN='
${
KUBE_PROXY_TOKEN
:-}
'"
echo
"MASTER_EXTRA_SANS='
${
MASTER_EXTRA_SANS
:-}
'"
echo
"MASTER_EXTRA_SANS='
${
MASTER_EXTRA_SANS
:-}
'"
echo
"ENABLE_CPU_CFS_QUOTA='
${
ENABLE_CPU_CFS_QUOTA
}
'"
awk
'!/^#/'
"
${
KUBE_ROOT
}
/cluster/vagrant/provision-network.sh"
awk
'!/^#/'
"
${
KUBE_ROOT
}
/cluster/vagrant/provision-network.sh"
awk
'!/^#/'
"
${
KUBE_ROOT
}
/cluster/vagrant/provision-master.sh"
awk
'!/^#/'
"
${
KUBE_ROOT
}
/cluster/vagrant/provision-master.sh"
)
>
"
${
KUBE_TEMP
}
/master-start.sh"
)
>
"
${
KUBE_TEMP
}
/master-start.sh"
...
...
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