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
38c28177
Commit
38c28177
authored
Aug 03, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Propagate cluster size through salt
parent
8a8cd06e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+6
-0
configure-helper.sh
cluster/gce/trusty/configure-helper.sh
+6
-0
kube-apiserver.manifest
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
+12
-3
No files found.
cluster/gce/gci/configure-helper.sh
View file @
38c28177
...
@@ -635,6 +635,12 @@ function start-kube-apiserver {
...
@@ -635,6 +635,12 @@ function start-kube-apiserver {
if
[[
-n
"
${
ENABLE_GARBAGE_COLLECTOR
:-}
"
]]
;
then
if
[[
-n
"
${
ENABLE_GARBAGE_COLLECTOR
:-}
"
]]
;
then
params+
=
" --enable-garbage-collector=
${
ENABLE_GARBAGE_COLLECTOR
}
"
params+
=
" --enable-garbage-collector=
${
ENABLE_GARBAGE_COLLECTOR
}
"
fi
fi
if
[[
-n
"
${
NUM_NODES
:-}
"
]]
;
then
# Set amount of memory available for apiserver based on number of nodes.
# TODO: Once we start setting proper requests and limits for apiserver
# we should reuse the same logic here instead of current heuristic.
params+
=
" --target-ram-mb=
$((${
NUM_NODES
}
*
60
))
"
fi
if
[[
-n
"
${
SERVICE_CLUSTER_IP_RANGE
:-}
"
]]
;
then
if
[[
-n
"
${
SERVICE_CLUSTER_IP_RANGE
:-}
"
]]
;
then
params+
=
" --service-cluster-ip-range=
${
SERVICE_CLUSTER_IP_RANGE
}
"
params+
=
" --service-cluster-ip-range=
${
SERVICE_CLUSTER_IP_RANGE
}
"
fi
fi
...
...
cluster/gce/trusty/configure-helper.sh
View file @
38c28177
...
@@ -519,6 +519,12 @@ start_kube_apiserver() {
...
@@ -519,6 +519,12 @@ start_kube_apiserver() {
params
=
"
${
params
}
--authorization-policy-file=/etc/srv/kubernetes/abac-authz-policy.jsonl"
params
=
"
${
params
}
--authorization-policy-file=/etc/srv/kubernetes/abac-authz-policy.jsonl"
params
=
"
${
params
}
--etcd-servers-overrides=/events#http://127.0.0.1:4002"
params
=
"
${
params
}
--etcd-servers-overrides=/events#http://127.0.0.1:4002"
if
[
-n
"
${
NUM_NODES
:-}
"
]
;
then
# Set amount of memory available for apiserver based on number of nodes.
# TODO: Once we start setting proper requests and limits for apiserver
# we should reuse the same logic here instead of current heuristic.
params
=
"
${
params
}
--target-ram-mb=
$((${
NUM_NODES
}
*
60
))
"
fi
if
[
-n
"
${
SERVICE_CLUSTER_IP_RANGE
:-}
"
]
;
then
if
[
-n
"
${
SERVICE_CLUSTER_IP_RANGE
:-}
"
]
;
then
params
=
"
${
params
}
--service-cluster-ip-range=
${
SERVICE_CLUSTER_IP_RANGE
}
"
params
=
"
${
params
}
--service-cluster-ip-range=
${
SERVICE_CLUSTER_IP_RANGE
}
"
fi
fi
...
...
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
View file @
38c28177
...
@@ -57,6 +57,15 @@
...
@@ -57,6 +57,15 @@
{% set etcd_servers = "--etcd-servers=http://127.0.0.1:4001" -%}
{% set etcd_servers = "--etcd-servers=http://127.0.0.1:4001" -%}
{% set etcd_servers_overrides = "--etcd-servers-overrides=/events#http://127.0.0.1:4002" -%}
{% set etcd_servers_overrides = "--etcd-servers-overrides=/events#http://127.0.0.1:4002" -%}
{% set target_ram_mb = "" -%}
{% if pillar['num_nodes'] is defined -%}
# Set amount of memory available for apiserver based on number of nodes.
# TODO: Once we start setting proper requests and limits for apiserver
# we should reuse the same logic here instead of current heuristic.
{% set tmp_ram_mb = pillar['num_nodes']|int * 60 %}
{% set target_ram_mb = "--target-ram-mb=" + tmp_ram_mb|string -%}
{% endif -%}
{% set service_cluster_ip_range = "" -%}
{% set service_cluster_ip_range = "" -%}
{% if pillar['service_cluster_ip_range'] is defined -%}
{% if pillar['service_cluster_ip_range'] is defined -%}
{% set service_cluster_ip_range = "--service-cluster-ip-range=" + pillar['service_cluster_ip_range'] -%}
{% set service_cluster_ip_range = "--service-cluster-ip-range=" + pillar['service_cluster_ip_range'] -%}
...
@@ -124,15 +133,15 @@
...
@@ -124,15 +133,15 @@
{% set enable_garbage_collector = "" -%}
{% set enable_garbage_collector = "" -%}
{% if pillar['enable_garbage_collector'] is defined -%}
{% if pillar['enable_garbage_collector'] is defined -%}
{% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%}
{% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%}
{% endif -%}
{% endif -%}
{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector -%}
{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " +
target_ram_mb + " " +
service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector -%}
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + token_auth_file + " " + bind_address + " " + log_level + " " + advertise_address + " " + proxy_ssh_options + authz_mode + abac_policy_file + webhook_authentication_config + webhook_authorization_config -%}
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + token_auth_file + " " + bind_address + " " + log_level + " " + advertise_address + " " + proxy_ssh_options + authz_mode + abac_policy_file + webhook_authentication_config + webhook_authorization_config -%}
# 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
{% if pillar['apiserver_test_args'] is defined -%}
{% if pillar['apiserver_test_args'] is defined -%}
{% set params = params + " " + pillar['apiserver_test_args'] -%}
{% set params = params + " " + pillar['apiserver_test_args'] -%}
{% 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