kubernetes-flux-logs.window.sh 799 B

123456789101112131415161718192021
  1. # Set window root path. Default is `$session_root`.
  2. # Must be called before `new_window`.
  3. #window_root "~/Projects/kubernetes"
  4. # Create new window. If no argument is given, window name will be based on
  5. # layout file name.
  6. new_window "logs-flux"
  7. mapfile -t pod_names < <(kubectl get --no-headers=true -n flux-system -o custom-columns='NAME:metadata.name' pods)
  8. run_cmd "kubectl -n flux-system logs --follow=true --tail=20 --all-containers=true ${pod_names[0]}"
  9. split_v 50
  10. run_cmd "kubectl -n flux-system logs --follow=true --tail=20 --all-containers=true ${pod_names[1]}"
  11. split_v 50
  12. run_cmd "kubectl -n flux-system logs --follow=true --tail=20 --all-containers=true ${pod_names[2]}"
  13. split_v 50
  14. run_cmd "kubectl -n flux-system logs --follow=true --tail=20 --all-containers=true ${pod_names[3]}"