Shopify / kubeaudit

kubeaudit helps you audit your Kubernetes clusters against common security controls
MIT License
1.9k stars 184 forks source link

Unregistered Annotations warning is not affected by --no-color flag #570

Open mdumfart opened 1 year ago

mdumfart commented 1 year ago
ISSUE TYPE

BUG REPORT

SUMMARY

I am running a DIY build of kubeaudit, slightly modified to run as a job within my k8s cluster. To retrieve the results of the kubeaudit job I fetch all logs from the underlying pod. The logs also include the warning introduced with PR 527, which is not affected by the --no-color flag.

ENVIRONMENT
STEPS TO REPRODUCE

Run kubeaudit with --no-color flag. For example: kubeaudit all --no-color --format=json

EXPECTED RESULTS

No color-codings in kubeaudit results as well as error and warning messages.

ACTUAL RESULTS

The color-coding for the "Unregistered Annotations" warning is still present. Snippet of the logs:

time="2023-08-24T11:21:27Z" level=info msg="Running inside cluster, using the cluster config"

[WARNING]: kubernetes.io for override labels will soon be deprecated. Please, update them to use kubeaudit.io instead.
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the issue template!