Skip to content

Implement log command for CNG orchestrator

Andrejs Cunskis requested to merge andrey-cng-log-command into master

What does this MR do and why?

Implement log command for CNG orchestrator

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

❯ bundle exec cng log pods --save --since 5h --containers all
Fetching logs for pods 'gitlab-gitaly-0, gitlab-gitlab-shell-8fb867cf6-8kgxk, gitlab-gitlab-shell-8fb867cf6-t2z8w, gitlab-kas-c5c58d9d-2tnzg, gitlab-kas-c5c58d9d-hm28d, gitlab-migrations-f93cdba-kpm2q, gitlab-minio-7cf9ddb469-hbf75, gitlab-minio-create-buckets-9f1f6bb-84fr8, gitlab-nginx-ingress-controller-5f9fcb9fb9-fs74b, gitlab-postgresql-0, gitlab-redis-master-0, gitlab-registry-7d66d6b556-czhfx, gitlab-registry-7d66d6b556-vjgtk, gitlab-sidekiq-all-in-1-v2-76cf8ff597-cgdlm, gitlab-toolbox-7d84c8dc4f-6s7rn, gitlab-webservice-default-5bf5bcf496-7bgxk, gitlab-webservice-default-5bf5bcf496-nmk9t'
 saving logs to separate files in the current directory
 created file 'gitlab-gitaly-0.log'
 created file 'gitlab-gitlab-shell-8fb867cf6-8kgxk.log'
 created file 'gitlab-gitlab-shell-8fb867cf6-t2z8w.log'
 created file 'gitlab-kas-c5c58d9d-2tnzg.log'
 created file 'gitlab-kas-c5c58d9d-hm28d.log'
 created file 'gitlab-migrations-f93cdba-kpm2q.log'
 created file 'gitlab-minio-create-buckets-9f1f6bb-84fr8.log'
 created file 'gitlab-nginx-ingress-controller-5f9fcb9fb9-fs74b.log'
 created file 'gitlab-postgresql-0.log'
 created file 'gitlab-redis-master-0.log'
 created file 'gitlab-registry-7d66d6b556-czhfx.log'
 created file 'gitlab-registry-7d66d6b556-vjgtk.log'
 created file 'gitlab-sidekiq-all-in-1-v2-76cf8ff597-cgdlm.log'
 created file 'gitlab-toolbox-7d84c8dc4f-6s7rn.log'
 created file 'gitlab-webservice-default-5bf5bcf496-7bgxk.log'
 created file 'gitlab-webservice-default-5bf5bcf496-nmk9t.log'
❯ bundle exec cng log events --save
Fetching events
 saving events to separate file in the current directory
 created file 'deployment-events.log'

How to set up and validate locally

Run following commands from gems/gitlab-cng folder:

$ bundle exec cng create deployment kind
$ bundle exec cng log pods

Closes: gitlab-org/quality/quality-engineering/team-tasks#2706 (closed)
Part of: gitlab-org/quality/quality-engineering/team-tasks#2570 (closed)

Edited by Andrejs Cunskis

Merge request reports