mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Revert "Revert "log-dump.sh: allow to dump extra log files""
This reverts commit c20e604377
.
This commit is contained in:
parent
094bc0582a
commit
4f0816ebf2
@ -51,6 +51,7 @@ readonly kern_logfile="kern.log"
|
||||
readonly initd_logfiles="docker/log"
|
||||
readonly supervisord_logfiles="kubelet.log supervisor/supervisord.log supervisor/kubelet-stdout.log supervisor/kubelet-stderr.log supervisor/docker-stdout.log supervisor/docker-stderr.log"
|
||||
readonly systemd_services="kubelet kubelet-monitor kube-container-runtime-monitor ${LOG_DUMP_SYSTEMD_SERVICES:-docker}"
|
||||
readonly extra_log_files="${LOG_DUMP_EXTRA_FILES:-}"
|
||||
readonly dump_systemd_journal="${LOG_DUMP_SYSTEMD_JOURNAL:-false}"
|
||||
# Log files found in WINDOWS_LOGS_DIR on Windows nodes:
|
||||
readonly windows_node_logfiles="kubelet.log kube-proxy.log docker.log"
|
||||
@ -140,6 +141,7 @@ function save-logs() {
|
||||
local opt_systemd_services="${4:-""}"
|
||||
local on_master="${5:-"false"}"
|
||||
|
||||
files="${files} ${extra_log_files}"
|
||||
if [[ -n "${use_custom_instance_list}" ]]; then
|
||||
if [[ -n "${LOG_DUMP_SAVE_LOGS:-}" ]]; then
|
||||
files="${files} ${LOG_DUMP_SAVE_LOGS:-}"
|
||||
@ -496,6 +498,7 @@ function dump_nodes_with_logexporter() {
|
||||
sed -i'' -e "s@{{.GCSPath}}@${gcs_artifacts_dir}@g" "${KUBE_ROOT}/cluster/log-dump/logexporter-daemonset.yaml"
|
||||
sed -i'' -e "s@{{.EnableHollowNodeLogs}}@${enable_hollow_node_logs}@g" "${KUBE_ROOT}/cluster/log-dump/logexporter-daemonset.yaml"
|
||||
sed -i'' -e "s@{{.DumpSystemdJournal}}@${dump_systemd_journal}@g" "${KUBE_ROOT}/cluster/log-dump/logexporter-daemonset.yaml"
|
||||
sed -i'' -e "s@{{.ExtraLogFiles}}@${extra_log_files}@g" "${KUBE_ROOT}/cluster/log-dump/logexporter-daemonset.yaml"
|
||||
|
||||
# Create the logexporter namespace, service-account secret and the logexporter daemonset within that namespace.
|
||||
KUBECTL="${KUBE_ROOT}/cluster/kubectl.sh"
|
||||
|
@ -50,6 +50,7 @@ spec:
|
||||
- --gcloud-auth-file-path=/etc/service-account/service-account.json
|
||||
- --enable-hollow-node-logs={{.EnableHollowNodeLogs}}
|
||||
- --dump-systemd-journal={{.DumpSystemdJournal}}
|
||||
- --extra-log-files={{.ExtraLogFiles}}
|
||||
- --sleep-duration=24h
|
||||
volumeMounts:
|
||||
- mountPath: /etc/service-account
|
||||
|
Loading…
Reference in New Issue
Block a user