Skip to content

Commit

Permalink
Update run bundle help (#5727)
Browse files Browse the repository at this point in the history
* squash commits

Signed-off-by: Bryce Palmer <[email protected]>

* address review comments

Signed-off-by: Bryce Palmer <[email protected]>

* review updates

Signed-off-by: Bryce Palmer <[email protected]>
  • Loading branch information
everettraven authored May 5, 2022
1 parent d43225a commit 1af83ad
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
18 changes: 18 additions & 0 deletions changelog/fragments/update-run-bundle-help.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
Update the `operator-sdk run bundle` command to have a more detailed
help output, stating the intent of the command and that index-images
passed via the `--index-image` flag should not already contain the bundle.
# kind is one of:
# - addition
# - change
# - deprecation
# - removal
# - bugfix
kind: "change"
# Is this a breaking change?
breaking: false
9 changes: 8 additions & 1 deletion internal/cmd/operator-sdk/run/bundle/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ func NewCmd(cfg *operator.Configuration) *cobra.Command {
Use: "bundle <bundle-image>",
Short: "Deploy an Operator in the bundle format with OLM",
Long: `The single argument to this command is a bundle image, with the full registry path specified.
If using a docker.io image, you must specify docker.io(/<namespace>)?/<bundle-image-name>:<tag>.`,
If using a docker.io image, you must specify docker.io(/<namespace>)?/<bundle-image-name>:<tag>.
The main purpose of this command is to streamline running the bundle without having to provide an index image with the bundle already included.
The ` + "`--index-image`" + ` flag specifies an index image in which to inject the given bundle. It can be specified to resolve dependencies for a bundle.
This is an optional flag which will default to ` + "`quay.io/operator-framework/opm:latest`." + `
The index image provided should **NOT** already have the bundle.
`,
Args: cobra.ExactArgs(1),
PreRunE: func(*cobra.Command, []string) error { return cfg.Load() },
Run: func(cmd *cobra.Command, args []string) {
Expand Down
7 changes: 7 additions & 0 deletions website/content/en/docs/cli/operator-sdk_run_bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ Deploy an Operator in the bundle format with OLM
The single argument to this command is a bundle image, with the full registry path specified.
If using a docker.io image, you must specify docker.io(/&lt;namespace&gt;)?/&lt;bundle-image-name&gt;:&lt;tag&gt;.

The main purpose of this command is to streamline running the bundle without having to provide an index image with the bundle already included.

The `--index-image` flag specifies an index image in which to inject the given bundle. It can be specified to resolve dependencies for a bundle.
This is an optional flag which will default to `quay.io/operator-framework/opm:latest`.
The index image provided should **NOT** already have the bundle.


```
operator-sdk run bundle <bundle-image> [flags]
```
Expand Down

0 comments on commit 1af83ad

Please sign in to comment.