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

fix: [Bug] Filter PolicyReport ignores namespace flag #1355

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

yankay
Copy link
Contributor

@yankay yankay commented Dec 20, 2024

Closes #1353

📑 Description

Add the namespace filter to the KyvernoAnalyzer

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

@yankay yankay requested review from a team as code owners December 20, 2024 09:54
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 34.42%. Comparing base (173e4dc) to head (739d99a).
Report is 56 commits behind head on main.

Files with missing lines Patch % Lines
pkg/integration/kyverno/analyzer.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1355      +/-   ##
==========================================
- Coverage   34.76%   34.42%   -0.34%     
==========================================
  Files          94       99       +5     
  Lines        6342     6515     +173     
==========================================
+ Hits         2205     2243      +38     
- Misses       4046     4180     +134     
- Partials       91       92       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yankay yankay force-pushed the fix-PolicyReport-filter-namespace branch from 6f73116 to c47b538 Compare December 23, 2024 03:45
@matthisholleville
Copy link
Contributor

What happens if I don't specify a namespace? Does this modification have any impact?

@AlexsJones
Copy link
Member

can you add a test for that please @yankay ?

@yankay
Copy link
Contributor Author

yankay commented Feb 21, 2025

can you add a test for that please @yankay ?

of course, I will :-)

@yankay yankay force-pushed the fix-PolicyReport-filter-namespace branch from eb6972e to 6d2b4d4 Compare February 24, 2025 11:26
@yankay
Copy link
Contributor Author

yankay commented Feb 24, 2025

can you add a test for that please @yankay ?

of course, I will :-)

Hi @AlexsJones @matthisholleville

There is also a test for this scenario available at https://github.com/k8sgpt-ai/k8sgpt/pull/1355/files#diff-706f327858423a4a923b82da6299c0c3a0d52e28d13cc24ef493eacf4fef456aR96

If I do not specify a namespace, it will return results from all namespaces.

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
@yankay yankay force-pushed the fix-PolicyReport-filter-namespace branch from 6d2b4d4 to 739d99a Compare February 24, 2025 11:34
@AlexsJones AlexsJones merged commit 9dcb21e into k8sgpt-ai:main Feb 24, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Filter PolicyReport ignores namespace flag
3 participants