Skip to content

Problem with excludeNamespaces #2817

@jobartim44

Description

@jobartim44

What steps did you take and what happened:

I'a using Helm to deploy trivy operator to scan Audit reports, it works but I still have Audit reports from excluded namespaces

What did you expect to happen:

I want namespace declared in the excludeNamespaces from the values files to work :)

Anything else you would like to add:

In my values.yaml file, I have the folowing : excludeNamespaces: "kube-*,cattle-*"

In the deployment, I have the env variable OPERATOR_EXCLUDE_NAMESPACE = "kube-*,cattle-*"

In the logs, I can find : "install mode":"AllNamespaces","operator namespace":"trivy-operator","target namespaces":[],"exclude namespaces":"kube-*,cattle-*","target workloads": ["pod","replicaset","replicationcontroller","statefulset","daemonset","cronjob","job"]

So it should work but as soon as I delete the ConfigAuditReport from the kube-system namespace, they come back.

I don't know where to look.

Environment:

  • Trivy-Operator version 0.29
  • Kubernetes version : 1.33.5
  • OS : Rocky Linux 9.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions