Skip to content
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

[Bug]: Filter PolicyReport ignores namespace flag #1353

Open
3 of 4 tasks
eirmich opened this issue Dec 18, 2024 · 0 comments · May be fixed by #1355
Open
3 of 4 tasks

[Bug]: Filter PolicyReport ignores namespace flag #1353

eirmich opened this issue Dec 18, 2024 · 0 comments · May be fixed by #1355

Comments

@eirmich
Copy link

eirmich commented Dec 18, 2024

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

v0.3.48

Kubernetes Version

v1.30.6

Host OS and its Version

MacOS

Steps to reproduce

Prerequisite is to have Kyverno running on the cluster with a policy like this https://kyverno.io/policies/other/block-stale-images/block-stale-images/.

kubectl create ns test1
kubectl create ns test2
kubectl run test-pod -n test1 --image nginx:1.7
kubectl run test-pod -n test2 --image nginx:1.7

At this point, you should have failed policies in both namespaces.

k8sgpt integrations activate kyverno
k8sgpt analyze --namespace test1 --filter PolicyReport

Expected behaviour

When running a command like this k8sgpt analyze --namespace default --filter PolicyReport I expect to see only the failed PolicyReports of that namespace.

Actual behaviour

The --namespace flag is ignored by the PolicyReport filter, so failed PolicyReports are presented from every namespace.

Additional Information

No response

@github-project-automation github-project-automation bot moved this to Proposed in Backlog Dec 18, 2024
@yankay yankay linked a pull request Dec 20, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Proposed
Development

Successfully merging a pull request may close this issue.

1 participant