Skip to content

Commit

Permalink
update flag name and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dtjm committed May 10, 2024
1 parent 5ad2279 commit a5b9fbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ The `bootstrap` subcommand creates apply topic configs from the existing topics
cluster. This can be used to "import" topics not created or previously managed by topicctl.
The output can be sent to either a directory (if the `--output` flag is set) or `stdout`.

By default, this does not include internal topics such as `__consumer_offsets`.
If you would like to have these topics included,
pass the `--allow-internal-topics` flag.

#### check

```
Expand Down
9 changes: 4 additions & 5 deletions cmd/topicctl/subcmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type bootstrapCmdConfig struct {
outputDir string
overwrite bool

allowDoubleUnderscoreTopics bool
allowInternalTopics bool

shared sharedOptions
}
Expand Down Expand Up @@ -54,10 +54,9 @@ func init() {
false,
"Overwrite existing configs in output directory",
)
// allow topics containing double underscores
bootstrapCmd.Flags().BoolVar(
&bootstrapConfig.allowDoubleUnderscoreTopics,
"allow-double-underscore-topics",
&bootstrapConfig.allowInternalTopics,
"allow-internal-topics",
false,
"Include topics that start with __ (typically these are internal topics)")

Expand Down Expand Up @@ -100,6 +99,6 @@ func bootstrapRun(cmd *cobra.Command, args []string) error {
bootstrapConfig.excludeRegexp,
bootstrapConfig.outputDir,
bootstrapConfig.overwrite,
bootstrapConfig.allowDoubleUnderscoreTopics,
bootstrapConfig.allowInternalTopics,
)
}

0 comments on commit a5b9fbb

Please sign in to comment.