Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Add log level support.
Browse files Browse the repository at this point in the history
Signed-off-by: Lantao Liu <[email protected]>
  • Loading branch information
Random-Liu committed Apr 18, 2018
1 parent 72ade6c commit d1ba950
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cluster/gce/cloud-init/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ write_files:
LimitNPROC=infinity
LimitCORE=infinity
ExecStartPre=/sbin/modprobe overlay
ExecStart=/home/containerd/usr/local/bin/containerd --log-level debug
ExecStart=/home/containerd/usr/local/bin/containerd
[Install]
WantedBy=containerd.target
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/cloud-init/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ write_files:
LimitNPROC=infinity
LimitCORE=infinity
ExecStartPre=/sbin/modprobe overlay
ExecStart=/home/containerd/usr/local/bin/containerd --log-level debug
ExecStart=/home/containerd/usr/local/bin/containerd
[Install]
WantedBy=containerd.target
Expand Down
6 changes: 5 additions & 1 deletion cluster/gce/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fi
cp "${CONTAINERD_HOME}/etc/crictl.yaml" /etc

# Generate containerd config
config_path=${CONTAINERD_CONFIG_PATH:-"/etc/containerd/config.toml"}
config_path="${CONTAINERD_CONFIG_PATH:-"/etc/containerd/config.toml"}"
mkdir -p $(dirname ${config_path})
cni_bin_dir="${CONTAINERD_HOME}/opt/cni/bin"
cni_template_path="${CONTAINERD_HOME}/opt/containerd/cluster/gce/cni.template"
Expand All @@ -145,7 +145,11 @@ if [ -n "${network_policy_provider}" ] && [ "${network_policy_provider}" != "non
cni_bin_dir="${KUBE_HOME}/bin"
cni_template_path=""
fi
log_level="${CONTAINERD_LOG_LEVEL:-"info"}"
cat > ${config_path} <<EOF
[debug]
level = "${log_level}"
[plugins.linux]
shim = "${CONTAINERD_HOME}/usr/local/bin/containerd-shim"
runtime = "${CONTAINERD_HOME}/usr/local/sbin/runc"
Expand Down
1 change: 1 addition & 0 deletions test/containerd/env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONTAINERD_TEST: 'true'
CONTAINERD_LOG_LEVEL: 'debug'
CONTAINERD_DEPLOY_PATH: 'cri-containerd-staging/containerd'
CONTAINERD_PKG_PREFIX: 'containerd-cni'
2 changes: 1 addition & 1 deletion test/e2e_node/init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ write_files:
LimitNPROC=infinity
LimitCORE=infinity
ExecStartPre=/sbin/modprobe overlay
ExecStart=/home/containerd/usr/local/bin/containerd --log-level debug
ExecStart=/home/containerd/usr/local/bin/containerd
[Install]
WantedBy=containerd.target
Expand Down
1 change: 1 addition & 0 deletions test/env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CONTAINERD_TEST: 'true'
CONTAINERD_LOG_LEVEL: 'debug'

0 comments on commit d1ba950

Please sign in to comment.