grafana/k8s-monitoring-helm

Add Lint Support for kube-score

bentonam opened this issue · 2 comments

Add Lint Support for kube-score

Is this for linting the output of this chart, or for linting the rest of the configs on the cluster?

For the former, we can add it to the CICD process.

For the latter, we could incorporate this with their docker container and a CronJob.
I could see running this, capturing the output as logs and sending to Loki. Ideally, we'd tag the log data with the cluster, namespace, and workload type and name for the report. For example, given this output:
https://github.com/zegl/kube-score?tab=readme-ov-file#example-output

This would be for linting the output of the chart. Think of:

kube-score score examples/*/output.yaml  \
  --ignore-container-cpu-limit \
  --ignore-container-memory-limit \
  --output-format sarif

By outputting as sarif format, we can have reviewdog ingest the input and annotate on the appropriate files, as well as filter out any issues we don't care about.