Skip to content

feat: Improve logging configuration #2579

@simar7

Description

@simar7

Discussed in #2449

Originally posted by nikki-quant February 18, 2025
Hi Trivy users,

I want to adjust the log level of the operator to be less verbose - at the moment, I have deployed it using Helm and it is logging trace level messages:

Trace[399218497]: [52.921904913s] [52.921904913s] END
I0215 16:05:41.127929       1 trace.go:236] Trace[1926992477]: "Reflector ListAndWatch" name:pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:232 (15-Feb-2025 16:04:48.550) (total time: 52576ms):
Trace[1926992477]: ---"Objects listed" error:<nil> 52575ms (16:05:41.126)
Trace[1926992477]: [52.576902365s] [52.576902365s] END
I0215 16:07:25.287733       1 trace.go:236] Trace[883367537]: "Reflector ListAndWatch" name:pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:232 (15-Feb-2025 16:06:31.481) (total time: 53806ms):
Trace[883367537]: ---"Objects listed" error:<nil> 53805ms (16:07:25.286)
Trace[883367537]: [53.806615884s] [53.806615884s] END

The two configuration options I can see in the chart values that relate to logging default to using the less verbose/resource intensive option:

  • operator.logDevMode: false
  • trivyOperator.scanJobCompressLogs: true

I don't see any reference to log level being configurable in the docs at: https://aquasecurity.github.io/trivy-operator/latest/docs/

Is log level currently configurable? If so, how, and is that documented anywhere?

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions