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
3ffa01d7
Commit
3ffa01d7
authored
Nov 16, 2015
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Salt changes to enable using non-default Kubelet port
parent
32c240b3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
4 deletions
+18
-4
config-test.sh
cluster/gce/config-test.sh
+1
-0
configure-vm.sh
cluster/gce/configure-vm.sh
+1
-0
helper.sh
cluster/gce/debian/helper.sh
+0
-1
node.yaml
cluster/gce/trusty/node.yaml
+2
-1
util.sh
cluster/gce/util.sh
+1
-0
default
cluster/saltbase/salt/kubelet/default
+6
-1
init.sls
cluster/saltbase/salt/supervisor/init.sls
+1
-0
kubelet-checker.sh
cluster/saltbase/salt/supervisor/kubelet-checker.sh
+6
-1
No files found.
cluster/gce/config-test.sh
View file @
3ffa01d7
...
@@ -25,6 +25,7 @@ MASTER_DISK_TYPE=pd-ssd
...
@@ -25,6 +25,7 @@ MASTER_DISK_TYPE=pd-ssd
MASTER_DISK_SIZE
=
${
MASTER_DISK_SIZE
:-
20GB
}
MASTER_DISK_SIZE
=
${
MASTER_DISK_SIZE
:-
20GB
}
MINION_DISK_TYPE
=
pd-standard
MINION_DISK_TYPE
=
pd-standard
MINION_DISK_SIZE
=
${
MINION_DISK_SIZE
:-
100GB
}
MINION_DISK_SIZE
=
${
MINION_DISK_SIZE
:-
100GB
}
KUBELET_PORT
=
10250
REGISTER_MASTER_KUBELET
=
${
REGISTER_MASTER
:-
false
}
REGISTER_MASTER_KUBELET
=
${
REGISTER_MASTER
:-
false
}
KUBE_APISERVER_REQUEST_TIMEOUT
=
300
KUBE_APISERVER_REQUEST_TIMEOUT
=
300
PREEMPTIBLE_MINION
=
${
PREEMPTIBLE_MINION
:-
false
}
PREEMPTIBLE_MINION
=
${
PREEMPTIBLE_MINION
:-
false
}
...
...
cluster/gce/configure-vm.sh
View file @
3ffa01d7
...
@@ -287,6 +287,7 @@ manifest_url: '$(echo "$MANIFEST_URL" | sed -e "s/'/''/g")'
...
@@ -287,6 +287,7 @@ manifest_url: '$(echo "$MANIFEST_URL" | sed -e "s/'/''/g")'
manifest_url_header: '
$(
echo
"
$MANIFEST_URL_HEADER
"
|
sed
-e
"s/'/''/g"
)
'
manifest_url_header: '
$(
echo
"
$MANIFEST_URL_HEADER
"
|
sed
-e
"s/'/''/g"
)
'
num_nodes:
$(
echo
"
${
NUM_MINIONS
}
"
)
num_nodes:
$(
echo
"
${
NUM_MINIONS
}
"
)
e2e_storage_test_environment: '
$(
echo
"
$E2E_STORAGE_TEST_ENVIRONMENT
"
|
sed
-e
"s/'/''/g"
)
'
e2e_storage_test_environment: '
$(
echo
"
$E2E_STORAGE_TEST_ENVIRONMENT
"
|
sed
-e
"s/'/''/g"
)
'
kubelet_port: '
$(
echo
"
$KUBELET_PORT
"
)
'
EOF
EOF
if
[
-n
"
${
APISERVER_TEST_ARGS
:-}
"
]
;
then
if
[
-n
"
${
APISERVER_TEST_ARGS
:-}
"
]
;
then
...
...
cluster/gce/debian/helper.sh
View file @
3ffa01d7
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
# A library of helper functions and constant for debian os distro
# A library of helper functions and constant for debian os distro
# create-master-instance creates the master instance. If called with
# create-master-instance creates the master instance. If called with
# an argument, the argument is used as the name to a reserved IP
# an argument, the argument is used as the name to a reserved IP
# address for the master. (In the case of upgrade/repair, we re-use
# address for the master. (In the case of upgrade/repair, we re-use
...
...
cluster/gce/trusty/node.yaml
View file @
3ffa01d7
...
@@ -262,7 +262,8 @@ script
...
@@ -262,7 +262,8 @@ script
echo "Docker daemon failed!"
echo "Docker daemon failed!"
pkill docker
pkill docker
fi
fi
if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:10250/healthz > /dev/null; then
. /etc/kube-env
if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:${KUBELET_PORT:-10250}/healthz > /dev/null; then
echo "Kubelet is unhealthy!"
echo "Kubelet is unhealthy!"
pkill kubelet
pkill kubelet
fi
fi
...
...
cluster/gce/util.sh
View file @
3ffa01d7
...
@@ -1302,6 +1302,7 @@ OPENCONTRAIL_TAG: $(yaml-quote ${OPENCONTRAIL_TAG:-})
...
@@ -1302,6 +1302,7 @@ OPENCONTRAIL_TAG: $(yaml-quote ${OPENCONTRAIL_TAG:-})
OPENCONTRAIL_KUBERNETES_TAG:
$(
yaml-quote
${
OPENCONTRAIL_KUBERNETES_TAG
:-})
OPENCONTRAIL_KUBERNETES_TAG:
$(
yaml-quote
${
OPENCONTRAIL_KUBERNETES_TAG
:-})
OPENCONTRAIL_PUBLIC_SUBNET:
$(
yaml-quote
${
OPENCONTRAIL_PUBLIC_SUBNET
:-})
OPENCONTRAIL_PUBLIC_SUBNET:
$(
yaml-quote
${
OPENCONTRAIL_PUBLIC_SUBNET
:-})
E2E_STORAGE_TEST_ENVIRONMENT:
$(
yaml-quote
${
E2E_STORAGE_TEST_ENVIRONMENT
:-})
E2E_STORAGE_TEST_ENVIRONMENT:
$(
yaml-quote
${
E2E_STORAGE_TEST_ENVIRONMENT
:-})
KUBELET_PORT:
$(
yaml-quote
${
KUBELET_PORT
:-})
EOF
EOF
if
[
-n
"
${
KUBE_APISERVER_REQUEST_TIMEOUT
:-}
"
]
;
then
if
[
-n
"
${
KUBE_APISERVER_REQUEST_TIMEOUT
:-}
"
]
;
then
cat
>>
$file
<<
EOF
cat
>>
$file
<<
EOF
...
...
cluster/saltbase/salt/kubelet/default
View file @
3ffa01d7
...
@@ -116,5 +116,10 @@
...
@@ -116,5 +116,10 @@
{% set network_plugin = "--network-plugin=opencontrail" %}
{% set network_plugin = "--network-plugin=opencontrail" %}
{% endif -%}
{% endif -%}
{% set kubelet_port = "" -%}
{% if pillar['kubelet_port'] is defined -%}
{% set kubelet_port="--port=" + pillar['kubelet_port'] %}
{% 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}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{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}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{
kubelet_port}} {{
test_args}}"
cluster/saltbase/salt/supervisor/init.sls
View file @
3ffa01d7
...
@@ -47,6 +47,7 @@ monit:
...
@@ -47,6 +47,7 @@ monit:
file:
file:
- managed
- managed
- source: salt://supervisor/kubelet-checker.sh
- source: salt://supervisor/kubelet-checker.sh
- template: jinja
- user: root
- user: root
- group: root
- group: root
- mode: 755
- mode: 755
...
...
cluster/saltbase/salt/supervisor/kubelet-checker.sh
View file @
3ffa01d7
...
@@ -18,6 +18,11 @@
...
@@ -18,6 +18,11 @@
# it detects a failure. It then exits, and supervisord restarts it
# it detects a failure. It then exits, and supervisord restarts it
# which in turn restarts the kubelet.
# which in turn restarts the kubelet.
{
%
set
kubelet_port
=
"10250"
-%
}
{
%
if
pillar[
'kubelet_port'
]
is defined -%
}
{
%
set
kubelet_port
=
pillar[
'kubelet_port'
]
-%
}
{
% endif -%
}
/etc/init.d/kubelet stop
/etc/init.d/kubelet stop
/etc/init.d/kubelet start
/etc/init.d/kubelet start
...
@@ -27,7 +32,7 @@ sleep 60
...
@@ -27,7 +32,7 @@ sleep 60
max_seconds
=
10
max_seconds
=
10
while
true
;
do
while
true
;
do
if
!
curl
--insecure
-m
${
max_seconds
}
-f
-s
https://127.0.0.1:
10250
/healthz
>
/dev/null
;
then
if
!
curl
--insecure
-m
${
max_seconds
}
-f
-s
https://127.0.0.1:
{{
kubelet_port
}}
/healthz
>
/dev/null
;
then
echo
"kubelet failed!"
echo
"kubelet failed!"
exit
2
exit
2
fi
fi
...
...
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