Skip to content

Commit 88bfde7

Browse files
author
Eric Stroczynski
authored
cmd/operator-sdk: move olm out of alpha (#2447)
* cmd/operator-sdk: move 'olm install/uninstall/status' out of 'alpha' * doc/cli: regenerate * CHANGELOG.md: add 'alpha olm' change * hack/tests: remove 'alpha' subcommand from 'olm' invocations
1 parent e531b91 commit 88bfde7

16 files changed

+66
-82
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Moved `olm-catalog gen-csv` to the `generate csv` subcommand. ([#2439](https://github.com/operator-framework/operator-sdk/pull/2439))
1414
- `run ansible/helm` are now the hidden commands `exec-entrypoint ansible/helm`. All functionality of each subcommand is the same. ([#2441](https://github.com/operator-framework/operator-sdk/pull/2441))
1515
- `up local` is now [`run --local`](./doc/cli/operator-sdk_run.md). All functionality of this command is the same. ([#2441](https://github.com/operator-framework/operator-sdk/pull/2441))
16+
- **Breaking Change:** Moved the `olm` subcommand from `alpha` to its own subcommand. All functionality of this command is the same. ([#2447](https://github.com/operator-framework/operator-sdk/pull/2447))
1617

1718
### Deprecated
1819

cmd/operator-sdk/alpha/cmd.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package alpha
1616

1717
import (
1818
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/alpha/kubebuilder"
19-
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/alpha/olm"
2019

2120
"github.com/spf13/cobra"
2221
)
@@ -29,7 +28,6 @@ func NewCmd() *cobra.Command {
2928

3029
cmd.AddCommand(
3130
kubebuilder.NewCmd(),
32-
olm.NewCmd(),
3331
)
3432
return cmd
3533
}

cmd/operator-sdk/cli/cli.go

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/generate"
3131
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/migrate"
3232
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/new"
33+
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/olm"
3334
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/printdeps"
3435
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/run"
3536
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard"
@@ -62,21 +63,24 @@ func GetCLIRoot() *cobra.Command {
6263
},
6364
}
6465

65-
root.AddCommand(add.NewCmd())
66-
root.AddCommand(alpha.NewCmd())
67-
root.AddCommand(build.NewCmd())
68-
root.AddCommand(bundle.NewCmd())
69-
root.AddCommand(cleanup.NewCmd())
70-
root.AddCommand(completion.NewCmd())
71-
root.AddCommand(execentrypoint.NewCmd())
72-
root.AddCommand(generate.NewCmd())
73-
root.AddCommand(migrate.NewCmd())
74-
root.AddCommand(new.NewCmd())
75-
root.AddCommand(printdeps.NewCmd())
76-
root.AddCommand(run.NewCmd())
77-
root.AddCommand(scorecard.NewCmd())
78-
root.AddCommand(test.NewCmd())
79-
root.AddCommand(version.NewCmd())
66+
root.AddCommand(
67+
add.NewCmd(),
68+
alpha.NewCmd(),
69+
build.NewCmd(),
70+
bundle.NewCmd(),
71+
cleanup.NewCmd(),
72+
completion.NewCmd(),
73+
execentrypoint.NewCmd(),
74+
generate.NewCmd(),
75+
migrate.NewCmd(),
76+
new.NewCmd(),
77+
olm.NewCmd(),
78+
printdeps.NewCmd(),
79+
run.NewCmd(),
80+
scorecard.NewCmd(),
81+
test.NewCmd(),
82+
version.NewCmd(),
83+
)
8084

8185
return root
8286
}

cmd/operator-sdk/alpha/olm/cmd.go renamed to cmd/operator-sdk/olm/cmd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ func NewCmd() *cobra.Command {
2424
Short: "Manage the Operator Lifecycle Manager installation in your cluster",
2525
}
2626
cmd.AddCommand(
27-
NewInstallCmd(),
28-
NewUninstallCmd(),
29-
NewStatusCmd(),
27+
newInstallCmd(),
28+
newUninstallCmd(),
29+
newStatusCmd(),
3030
)
3131
return cmd
3232
}

cmd/operator-sdk/alpha/olm/install.go renamed to cmd/operator-sdk/olm/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/spf13/cobra"
2222
)
2323

24-
func NewInstallCmd() *cobra.Command {
24+
func newInstallCmd() *cobra.Command {
2525
mgr := &olm.Manager{}
2626
cmd := &cobra.Command{
2727
Use: "install",

cmd/operator-sdk/alpha/olm/status.go renamed to cmd/operator-sdk/olm/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/spf13/cobra"
2222
)
2323

24-
func NewStatusCmd() *cobra.Command {
24+
func newStatusCmd() *cobra.Command {
2525
mgr := olm.Manager{}
2626
cmd := &cobra.Command{
2727
Use: "status",

cmd/operator-sdk/alpha/olm/uninstall.go renamed to cmd/operator-sdk/olm/uninstall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/spf13/cobra"
2222
)
2323

24-
func NewUninstallCmd() *cobra.Command {
24+
func newUninstallCmd() *cobra.Command {
2525
mgr := olm.Manager{}
2626
cmd := &cobra.Command{
2727
Use: "uninstall",

doc/cli/operator-sdk.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ An SDK for building operators with ease
1515
### SEE ALSO
1616

1717
* [operator-sdk add](operator-sdk_add.md) - Adds a controller or resource to the project
18-
* [operator-sdk alpha](operator-sdk_alpha.md) - Run an alpha subcommand
1918
* [operator-sdk build](operator-sdk_build.md) - Compiles code and builds artifacts
2019
* [operator-sdk bundle](operator-sdk_bundle.md) - Work with operator bundle metadata and bundle images
2120
* [operator-sdk cleanup](operator-sdk_cleanup.md) - Delete and clean up after a running Operator
2221
* [operator-sdk completion](operator-sdk_completion.md) - Generators for shell completions
2322
* [operator-sdk generate](operator-sdk_generate.md) - Invokes a specific generator
2423
* [operator-sdk migrate](operator-sdk_migrate.md) - Adds source code to an operator
2524
* [operator-sdk new](operator-sdk_new.md) - Creates a new operator application
25+
* [operator-sdk olm](operator-sdk_olm.md) - Manage the Operator Lifecycle Manager installation in your cluster
2626
* [operator-sdk print-deps](operator-sdk_print-deps.md) - Print Golang packages and versions required to run the operator
2727
* [operator-sdk run](operator-sdk_run.md) - Run an Operator in a variety of environments
2828
* [operator-sdk scorecard](operator-sdk_scorecard.md) - Run scorecard tests

doc/cli/operator-sdk_alpha.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

doc/cli/operator-sdk_alpha_olm.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)