-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Story] Print container logs with Scorecard test output #750
Comments
I wonder how about the scorecard can create a At the end of tests, we can check if any "log" configmap exists, then dump it to local files for inspection. What do you think? EDIT: Might hit configmap size limit of 1MB tho. Probably not :D |
I was just thinking of reading the logs into memory while running the tests. There is a |
Right. That sounds good to me! I guess I was a bit concerned about large quantity of logs being stored in memory, especially in a more resource-limit cluster. Maybe, it's not too large to be concerned about. Otherwise, I am thinking that goroutines can write to files on the pod's ephemeral storage and -x, --skip-cleanup Disable resource cleanup after tests are run Then, before running scorecard tests, we can run clean up first with a prompt to confirm if any resources exist (or force clean if certain env var is set). Logs can then access by |
Maybe I am overthinking. I can help with this and see it how it goes^^ |
It would be useful to see the logs for each container running in the Scorecard tests, whether the tests pass or fail. It will be noisy, but I believe the only test output for Scorecard tests is the one log. Perhaps we can format these nicely with section headers for each container, with some whitespace before and after.
There's a Kubernetes API you can use to get the logs for each container:
https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#get-read-log-of-the-specified-pod
The text was updated successfully, but these errors were encountered: