Skip to content

Commit a8f5e00

Browse files
[olm] Remove olm-namespace flag from install sub-command (#3670)
Remove 'olm-namespace' flag from 'operator-sdk olm install' command. Reason: The OLM manifests which are used to install olm-operator have hardcoded namespace value.
1 parent 9b77437 commit a8f5e00

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
entries:
2+
- description: Removed `olm-namespace` flag from `operator-sdk olm install` command
3+
kind: removal
4+
breaking: true
5+
migration:
6+
header: Remove `olm-namespace` flag from `operator-sdk olm install` command
7+
body: |
8+
The `olm-namespace` flag has been removed from `operator-sdk olm install`
9+
command, as the olm manifests published in github have a hardcoded
10+
namespace value. Hence, the olm operators can only be installed in `olm`
11+
namespace using this command.

internal/cmd/operator-sdk/olm/install.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ func newInstallCmd() *cobra.Command {
3535
}
3636

3737
cmd.Flags().StringVar(&mgr.Version, "version", olm.DefaultVersion, "version of OLM resources to install")
38-
cmd.Flags().StringVar(&mgr.OLMNamespace, "olm-namespace", olm.DefaultOLMNamespace,
39-
"namespace where OLM is to be installed.")
4038
mgr.AddToFlagSet(cmd.Flags())
4139
return cmd
4240
}

internal/cmd/operator-sdk/olm/install_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ var _ = Describe("Running an olm install command", func() {
3232
Expect(flag).NotTo(BeNil())
3333
Expect(flag.DefValue).To(Equal(olm.DefaultVersion))
3434
Expect(flag.Usage).NotTo(BeNil())
35-
36-
flag = cmd.Flags().Lookup("olm-namespace")
37-
Expect(flag).NotTo(BeNil())
38-
Expect(flag.DefValue).To(Equal(olm.DefaultOLMNamespace))
39-
Expect(flag.Usage).NotTo(BeNil())
4035
})
4136
})
4237
})

website/content/en/docs/cli/operator-sdk_olm_install.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ operator-sdk olm install [flags]
1616
### Options
1717

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

2524
### Options inherited from parent commands

website/content/en/docs/olm-integration/quickstart-bundle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Ensure OLM is enabled on your cluster before following this guide. [`operator-sd
3030
has several subcommands that can install, uninstall, and check the status of particular OLM versions in a cluster.
3131

3232
**Note:** Certain cluster types may already have OLM enabled, but under a non-default (`"olm"`) namespace,
33-
which can be configured by setting `--olm-namespace=[non-default-olm-namespace]` for `operator-sdk olm` subcommands.
33+
which can be configured by setting `--olm-namespace=[non-default-olm-namespace]` for `operator-sdk olm status|uninstall` subcommands.
3434

3535
You can check if OLM is already installed by running the following command,
3636
which will detect the installed OLM version automatically (0.15.1 in this example):

0 commit comments

Comments
 (0)