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
b8fd9e1a
Commit
b8fd9e1a
authored
Apr 15, 2016
by
Andy Zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trusty: Add debug supports for docker and kubelet
parent
a0e4a80e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
21 deletions
+20
-21
configure-helper.sh
cluster/gce/trusty/configure-helper.sh
+5
-1
helper.sh
cluster/gce/trusty/helper.sh
+3
-5
master.yaml
cluster/gce/trusty/master.yaml
+6
-7
node.yaml
cluster/gce/trusty/node.yaml
+6
-8
No files found.
cluster/gce/trusty/configure-helper.sh
View file @
b8fd9e1a
...
...
@@ -181,10 +181,14 @@ assemble_kubelet_flags() {
fi
# Add the unconditional flags
KUBELET_CMD_FLAGS
=
"
${
KUBELET_CMD_FLAGS
}
--cloud-provider=gce --allow-privileged=true --cgroup-root=/ --system-cgroups=/system --kubelet-cgroups=/kubelet --babysit-daemons=true --config=/etc/kubernetes/manifests --cluster-dns=
${
DNS_SERVER_IP
}
--cluster-domain=
${
DNS_DOMAIN
}
"
echo
"KUBELET_OPTS=
\"
${
KUBELET_CMD_FLAGS
}
\"
"
>
/etc/default/kubelet
}
restart_docker_daemon
()
{
readonly
DOCKER_OPTS
=
"-p /var/run/docker.pid --bridge=cbr0 --iptables=false --ip-masq=false"
DOCKER_OPTS
=
"-p /var/run/docker.pid --bridge=cbr0 --iptables=false --ip-masq=false"
if
[
"
${
TEST_CLUSTER
:-}
"
=
"true"
]
;
then
DOCKER_OPTS
=
"
${
DOCKER_OPTS
}
--debug"
fi
echo
"DOCKER_OPTS=
\"
${
DOCKER_OPTS
}
${
EXTRA_DOCKER_OPTS
:-}
\"
"
>
/etc/default/docker
# Make sure the network interface cbr0 is created before restarting docker daemon
while
!
[
-L
/sys/class/net/cbr0
]
;
do
...
...
cluster/gce/trusty/helper.sh
View file @
b8fd9e1a
...
...
@@ -16,11 +16,9 @@
# A library of helper functions and constant for ubuntu os distro
# The code and configuration is for running node instances on Ubuntu images.
# The master is still on Debian. In addition, the configuration is based on
# upstart, which is in Ubuntu up to 14.04 LTS (Trusty). Ubuntu 15.04 and above
# replaced upstart with systemd as the init system. Consequently, the
# configuration cannot work on these images.
# The configuration is based on upstart, which is in Ubuntu up to 14.04 LTS (Trusty).
# Ubuntu 15.04 and above replaced upstart with systemd as the init system.
# Consequently, the configuration cannot work on these images.
# $1: template name (required)
...
...
cluster/gce/trusty/master.yaml
View file @
b8fd9e1a
...
...
@@ -60,7 +60,10 @@ script
echo "Creating kubernetes master auth file"
create_master_auth
echo "Creating master instance kubelet auth file"
create_master_kubelet_auth
create_master_kubelet_auth
echo "Assemble kubelet command line"
# Kubelet command flags will be written in /etc/default/kubelet
assemble_kubelet_flags
end script
--====================================
...
...
@@ -122,12 +125,8 @@ script
set -o nounset
echo "Start kubelet upstart job"
. /etc/kube-configure-helper.sh
. /etc/kube-env
# Assemble command line flags based on env variables, which will put the string
# of flags in variable KUBELET_CMD_FLAGS
assemble_kubelet_flags
/usr/bin/kubelet ${KUBELET_CMD_FLAGS} 1>>/var/log/kubelet.log 2>&1
. /etc/default/kubelet
/usr/bin/kubelet ${KUBELET_OPTS} 1>>/var/log/kubelet.log 2>&1
end script
# Wait for 10s to start kubelet again.
...
...
cluster/gce/trusty/node.yaml
View file @
b8fd9e1a
...
...
@@ -59,6 +59,9 @@ script
create_kubelet_kubeconfig
echo "Creating kube-proxy kubeconfig file"
create_kubeproxy_kubeconfig
echo "Assemble kubelet command line"
# Kubelet command flags will be in /etc/default/kubelet
assemble_kubelet_flags
end script
--====================================
...
...
@@ -120,12 +123,8 @@ script
set -o nounset
echo "Start kubelet upstart job"
. /etc/kube-configure-helper.sh
. /etc/kube-env
# Assemble command line flags based on env variables, which will put the string
# of flags in variable KUBELET_CMD_FLAGS.
assemble_kubelet_flags
/usr/bin/kubelet ${KUBELET_CMD_FLAGS} 1>>/var/log/kubelet.log 2>&1
. /etc/default/kubelet
/usr/bin/kubelet ${KUBELET_OPTS} 1>>/var/log/kubelet.log 2>&1
end script
# Wait for 10s to start kubelet again.
...
...
@@ -232,8 +231,7 @@ script
start_fluentd
# Kube-registry-proxy
if [ "${ENABLE_CLUSTER_REGISTRY:-}" = "true" ]; then
cp /home/kubernetes/kube-manifests/kubernetes/kube-registry-proxy.yaml \
/etc/kubernetes/manifests/
cp /home/kubernetes/kube-manifests/kubernetes/kube-registry-proxy.yaml /etc/kubernetes/manifests/
fi
end script
...
...
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