Skip to content

Commit

Permalink
Update log-collector
Browse files Browse the repository at this point in the history
  • Loading branch information
nsuma8989 authored Aug 30, 2023
1 parent daf6745 commit dd4b695
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions utils/log-collector
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ else
echo "Describing pod with label buildkite.com/job-uuid=$job_id in namespace $namespace"
kubectl describe pod -n "${namespace}" -l "buildkite.com/job-uuid=$job_id" > "$dir"/describe_pod.log

echo "Describing pod with label agent-stack-k8s in namespace $namespace"
kubectl describe pod -n "${namespace}" -l "app=agent-stack-k8s" > "$dir"/describe_controller_pod.log

echo "Getting logs for pod with label job=$job_id in namespace $namespace"
get_logs_by_label "${namespace}" "buildkite.com/job-uuid=$job_id"

echo "Getting logs for pod with label agent-stack-k8s in namespace $namespace"
get_logs_by_label "${namespace}" "app=agent-stack-k8s"
fi

echo "Describing pod with label agent-stack-k8s in namespace $namespace"
kubectl describe pod -n "${namespace}" -l "app=agent-stack-k8s" > "$dir"/describe_controller_pod.log

echo "Getting logs for pod with label agent-stack-k8s in namespace $namespace"
get_logs_by_label "${namespace}" "app=agent-stack-k8s"

# Compress logs
tar -czvf logs.tar.gz "$dir"/*.log
echo "Logs compressed as logs.tar.gz"
Expand Down

0 comments on commit dd4b695

Please sign in to comment.