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

feat(kubernetes): Add report flag for summary #2112

Merged
merged 6 commits into from May 13, 2022

Conversation

owenrumney
Copy link
Contributor

@owenrumney owenrumney commented May 13, 2022

Description

Add support for using --report summary with the kubernetes command

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).

image

@owenrumney owenrumney changed the title feat(k8s): Add report flag for summary feat(kubernetes): Add report flag for summary May 13, 2022
@owenrumney owenrumney force-pushed the owenr-add-k8s-report-summary branch from 6675ab1 to 3cda6f8 Compare May 13, 2022 12:15
Copy link
Contributor

@josedonizetti josedonizetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! 🎉

reportFlag = cli.StringFlag{
Name: "report",
Value: "json",
Usage: "specify a report format for the output. (json,summary default: json)",
Copy link
Collaborator

@knqyf263 knqyf263 May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, --report is different from --format. --report is how we aggregate/summarize the result and --format is the format like table and json. So, --report nsa --format table and --report nsa --format json both should be available. Looks like they are mixing now.
If it is confusing, we can consider a better name than --report.

Copy link
Collaborator

@knqyf263 knqyf263 May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value of --format is table and --report is summary. There are two available combinations for now.

Default:

--report summary --format table

Also:

--report all --format json

We should display an error in the following case at the moment. We will support it in the future.

--report summary --format json
--report all --format table

Owen Rumney added 4 commits May 13, 2022 18:16
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
@owenrumney owenrumney force-pushed the owenr-add-k8s-report-summary branch from 7df33d6 to 4343662 Compare May 13, 2022 17:24
@owenrumney owenrumney merged commit 2ae8faa into main May 13, 2022
@owenrumney owenrumney deleted the owenr-add-k8s-report-summary branch May 13, 2022 18:02
@knqyf263 knqyf263 mentioned this pull request May 15, 2022
2 tasks
liamg pushed a commit that referenced this pull request Jun 7, 2022
* feat(k8s): Add report flag for summary
* chore: add headings to the severity columns
* chore: make the default output of k8s summary table

Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants