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

Use positionnal argument for directory/file input/output path #232

Merged
merged 6 commits into from
Jul 30, 2024

Conversation

jt-dd
Copy link
Contributor

@jt-dd jt-dd commented Jul 29, 2024

Removing the flags for the input/output for ingest local and dump local. Now it will get passed through the first argument:

  • kubehound dump local [directory to dump the data]
  • kubehound ingest local [directory or tar.gz path] --cluster <cluster_name>

Also now the default behavior is to create a compressed file. So the --compress has been changed to --no-compress.

Note: another PR will be made for the docs

edznux-dd
edznux-dd previously approved these changes Jul 30, 2024
pkg/config/collector.go Outdated Show resolved Hide resolved
Co-authored-by: Edouard Schweisguth <edouard.schweisguth@datadoghq.com>
Copy link
Contributor

@Minosity-VR Minosity-VR left a comment

Choose a reason for hiding this comment

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

Just a little nit on wording

pkg/cmd/dump.go Outdated
cmd.Flags().String("output-dir", "", "Directory to dump the data")
viper.BindPFlag(config.CollectorFileDirectory, cmd.Flags().Lookup("output-dir")) //nolint: errcheck
cmd.MarkFlagRequired("output-dir") //nolint: errcheck
cmd.Flags().Bool("no-compress", false, "Enable compression for the dumped data (generates a tar.gz file)")
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel the name no-compress tells the opposite of Enable compression

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it is fixed

…DataDog/kubehound into jt-dd/modifying-inputs-args-flags
@jt-dd jt-dd marked this pull request as ready for review July 30, 2024 08:15
@jt-dd jt-dd requested a review from a team as a code owner July 30, 2024 08:15
@jt-dd jt-dd merged commit 3db007e into main Jul 30, 2024
8 checks passed
@jt-dd jt-dd deleted the jt-dd/modifying-inputs-args-flags branch July 30, 2024 10:14
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.

3 participants