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
ef0503b8
Commit
ef0503b8
authored
Aug 28, 2017
by
Matt Liggett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add KUBE_APISERVER_REQUEST_TIMEOUT_SEC env var.
If set, connect it to kube-apiserver's --request-timeout flag.
parent
6597f1ed
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
1 deletion
+24
-1
common.sh
cluster/common.sh
+7
-0
configure-vm.sh
cluster/gce/configure-vm.sh
+5
-0
configure-helper.sh
cluster/gce/container-linux/configure-helper.sh
+3
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+3
-0
kube-apiserver.manifest
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
+6
-1
No files found.
cluster/common.sh
View file @
ef0503b8
...
@@ -795,6 +795,13 @@ ETCD_CA_CERT: $(yaml-quote ${ETCD_CA_CERT_BASE64:-})
...
@@ -795,6 +795,13 @@ ETCD_CA_CERT: $(yaml-quote ${ETCD_CA_CERT_BASE64:-})
ETCD_PEER_KEY:
$(
yaml-quote
${
ETCD_PEER_KEY_BASE64
:-})
ETCD_PEER_KEY:
$(
yaml-quote
${
ETCD_PEER_KEY_BASE64
:-})
ETCD_PEER_CERT:
$(
yaml-quote
${
ETCD_PEER_CERT_BASE64
:-})
ETCD_PEER_CERT:
$(
yaml-quote
${
ETCD_PEER_CERT_BASE64
:-})
EOF
EOF
# KUBE_APISERVER_REQUEST_TIMEOUT_SEC (if set) controls the --request-timeout
# flag
if
[
-n
"
${
KUBE_APISERVER_REQUEST_TIMEOUT_SEC
:-}
"
]
;
then
cat
>>
$file
<<
EOF
KUBE_APISERVER_REQUEST_TIMEOUT_SEC:
$(
yaml-quote
${
KUBE_APISERVER_REQUEST_TIMEOUT_SEC
})
EOF
fi
# ETCD_IMAGE (if set) allows to use a custom etcd image.
# ETCD_IMAGE (if set) allows to use a custom etcd image.
if
[
-n
"
${
ETCD_IMAGE
:-}
"
]
;
then
if
[
-n
"
${
ETCD_IMAGE
:-}
"
]
;
then
cat
>>
$file
<<
EOF
cat
>>
$file
<<
EOF
...
...
cluster/gce/configure-vm.sh
View file @
ef0503b8
...
@@ -460,6 +460,11 @@ EOF
...
@@ -460,6 +460,11 @@ EOF
storage_media_type: '
$(
echo
"
$STORAGE_MEDIA_TYPE
"
|
sed
-e
"s/'/''/g"
)
'
storage_media_type: '
$(
echo
"
$STORAGE_MEDIA_TYPE
"
|
sed
-e
"s/'/''/g"
)
'
EOF
EOF
fi
fi
if
[
-n
"
${
KUBE_APISERVER_REQUEST_TIMEOUT_SEC
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
kube_apiserver_request_timeout_sec: '
$(
echo
"
$KUBE_APISERVER_REQUEST_TIMEOUT_SEC
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
ADMISSION_CONTROL
:-}
"
]
&&
[
${
ADMISSION_CONTROL
}
==
*
"ImagePolicyWebhook"
*
]
;
then
if
[
-n
"
${
ADMISSION_CONTROL
:-}
"
]
&&
[
${
ADMISSION_CONTROL
}
==
*
"ImagePolicyWebhook"
*
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
admission-control-config-file: /etc/admission_controller.config
admission-control-config-file: /etc/admission_controller.config
...
...
cluster/gce/container-linux/configure-helper.sh
View file @
ef0503b8
...
@@ -937,6 +937,9 @@ function start-kube-apiserver {
...
@@ -937,6 +937,9 @@ function start-kube-apiserver {
if
[[
-n
"
${
STORAGE_MEDIA_TYPE
:-}
"
]]
;
then
if
[[
-n
"
${
STORAGE_MEDIA_TYPE
:-}
"
]]
;
then
params+
=
" --storage-media-type=
${
STORAGE_MEDIA_TYPE
}
"
params+
=
" --storage-media-type=
${
STORAGE_MEDIA_TYPE
}
"
fi
fi
if
[[
-n
"
${
KUBE_APISERVER_REQUEST_TIMEOUT_SEC
:-}
"
]]
;
then
params+
=
" --request-timeout=
${
KUBE_APISERVER_REQUEST_TIMEOUT_SEC
}
s"
fi
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
...
...
cluster/gce/gci/configure-helper.sh
View file @
ef0503b8
...
@@ -1292,6 +1292,9 @@ function start-kube-apiserver {
...
@@ -1292,6 +1292,9 @@ function start-kube-apiserver {
if
[[
-n
"
${
STORAGE_MEDIA_TYPE
:-}
"
]]
;
then
if
[[
-n
"
${
STORAGE_MEDIA_TYPE
:-}
"
]]
;
then
params+
=
" --storage-media-type=
${
STORAGE_MEDIA_TYPE
}
"
params+
=
" --storage-media-type=
${
STORAGE_MEDIA_TYPE
}
"
fi
fi
if
[[
-n
"
${
KUBE_APISERVER_REQUEST_TIMEOUT_SEC
:-}
"
]]
;
then
params+
=
" --request-timeout=
${
KUBE_APISERVER_REQUEST_TIMEOUT_SEC
}
s"
fi
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
...
...
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
View file @
ef0503b8
...
@@ -66,6 +66,11 @@
...
@@ -66,6 +66,11 @@
{% set storage_media_type = "--storage-media-type=" + pillar['storage_media_type'] -%}
{% set storage_media_type = "--storage-media-type=" + pillar['storage_media_type'] -%}
{% endif -%}
{% endif -%}
{% set request_timeout = "" -%}
{% if pillar['kube_apiserver_request_timeout_sec'] is defined -%}
{% set request_timeout = "--request-timeout=" + pillar['kube_apiserver_request_timeout_sec'] + "s" -%}
{% endif -%}
{% set max_requests_inflight = "" -%}
{% set max_requests_inflight = "" -%}
{% set target_ram_mb = "" -%}
{% set target_ram_mb = "" -%}
{% if pillar['num_nodes'] is defined -%}
{% if pillar['num_nodes'] is defined -%}
...
@@ -196,7 +201,7 @@
...
@@ -196,7 +201,7 @@
{% endif %}
{% endif %}
{% endif -%}
{% endif -%}
{% set params = address + " " + storage_backend + " " + storage_media_type + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + feature_gates + " " + admission_control + " " + max_requests_inflight + " " + target_ram_mb + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector + " " + etcd_quorum_read + " " + audit_log -%}
{% set params = address + " " + storage_backend + " " + storage_media_type + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + feature_gates + " " + admission_control + " " + max_requests_inflight + " " + target_ram_mb + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector + " " + etcd_quorum_read + " " + audit_log
+ " " + request-timeout
-%}
{% set params = params + " " + cert_file + " " + key_file + " " + kubelet_cert_file + " " + kubelet_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 + image_review_config -%}
{% set params = params + " " + cert_file + " " + key_file + " " + kubelet_cert_file + " " + kubelet_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 + image_review_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
...
...
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