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

[olm-cmd] Add option to specify namespace #3300

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/add-namespace-to-olm-sucommands.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
entries:
- description: >
Add "--olm-namespace" flag to olm subcommands (install, uninstall) to allow users to specify the
namespace where olm is to be installed or uninstalled.
kind: "addition"
2 changes: 2 additions & 0 deletions cmd/operator-sdk/olm/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func newInstallCmd() *cobra.Command {
}

cmd.Flags().StringVar(&mgr.Version, "version", olm.DefaultVersion, "version of OLM resources to install")
cmd.Flags().StringVar(&mgr.OLMNamespace, "olm-namespace", olm.DefaultOLMNamespace,
"namespace where OLM is to be installed.")
mgr.AddToFlagSet(cmd.Flags())
return cmd
}
2 changes: 2 additions & 0 deletions cmd/operator-sdk/olm/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func newUninstallCmd() *cobra.Command {
}

cmd.Flags().StringVar(&mgr.Version, "version", "", "version of OLM resources to uninstall.")
cmd.Flags().StringVar(&mgr.OLMNamespace, "olm-namespace", olm.DefaultOLMNamespace,
"namespace from where OLM is to be uninstalled.")
mgr.AddToFlagSet(cmd.Flags())
return cmd
}
7 changes: 4 additions & 3 deletions website/content/en/docs/cli/operator-sdk_olm_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ operator-sdk olm install [flags]
### Options

```
-h, --help help for install
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to install (default "latest")
-h, --help help for install
--olm-namespace string namespace where OLM is to be installed. (default "olm")
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to install (default "latest")
```

### SEE ALSO
Expand Down
7 changes: 4 additions & 3 deletions website/content/en/docs/cli/operator-sdk_olm_uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ operator-sdk olm uninstall [flags]
### Options

```
-h, --help help for uninstall
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to uninstall.
-h, --help help for uninstall
--olm-namespace string namespace from where OLM is to be uninstalled. (default "olm")
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to uninstall.
```

### SEE ALSO
Expand Down
7 changes: 4 additions & 3 deletions website/content/en/docs/new-cli/operator-sdk_olm_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ operator-sdk olm install [flags]
### Options

```
-h, --help help for install
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to install (default "latest")
-h, --help help for install
--olm-namespace string namespace where OLM is to be installed. (default "olm")
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to install (default "latest")
```

### Options inherited from parent commands
Expand Down
7 changes: 4 additions & 3 deletions website/content/en/docs/new-cli/operator-sdk_olm_uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ operator-sdk olm uninstall [flags]
### Options

```
-h, --help help for uninstall
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to uninstall.
-h, --help help for uninstall
--olm-namespace string namespace from where OLM is to be uninstalled. (default "olm")
--timeout duration time to wait for the command to complete before failing (default 2m0s)
--version string version of OLM resources to uninstall.
```

### Options inherited from parent commands
Expand Down