-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
cmd/operator-sdk: OLM integration alpha run/cleanup
CLI
#2402
Conversation
using OLM via manifests stored in a registry-server. cmd/operator-sdk/alpha/olm: add operator up/down commands
69b071d
to
42928e3
Compare
42928e3
to
eb6f89a
Compare
olm up/down
CLIalpha run/cleanup
CLI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after a couple of nits and minor questions.
CHANGELOG.md
Outdated
@@ -2,6 +2,8 @@ | |||
|
|||
### Added | |||
|
|||
- Added [`run`](./doc/cli/operator-sdk_alpha_run.md) amd [`cleanup`](./doc/cli/operator-sdk_alpha_cleanup.md) subcommands (under the `alpha` subcommand) to manage deployment/deletion of operators. These commands currently interact with OLM via an in-cluster registry-server created using an operator's on-disk manifests and managed by `operator-sdk`. ([#2402](ttps://github.com/operator-framework/operator-sdk/pull/2402)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added [`run`](./doc/cli/operator-sdk_alpha_run.md) amd [`cleanup`](./doc/cli/operator-sdk_alpha_cleanup.md) subcommands (under the `alpha` subcommand) to manage deployment/deletion of operators. These commands currently interact with OLM via an in-cluster registry-server created using an operator's on-disk manifests and managed by `operator-sdk`. ([#2402](ttps://github.com/operator-framework/operator-sdk/pull/2402)) | |
- Added [`run`](./doc/cli/operator-sdk_alpha_run.md) and [`cleanup`](./doc/cli/operator-sdk_alpha_cleanup.md) subcommands (under the `alpha` subcommand) to manage deployment/deletion of operators. These commands currently interact with OLM via an in-cluster registry-server created using an operator's on-disk manifests and managed by `operator-sdk`. ([#2402](ttps://github.com/operator-framework/operator-sdk/pull/2402)) |
doc/cli/operator-sdk_alpha_run.md
Outdated
### Options | ||
|
||
``` | ||
--force-registry Force deletion of the in-cluster registry. This option is a no-op on 'up'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about this: This option is a no-op on 'up'.
Does up
need to be run
? But that would make it seem like it's always a no-op. I'm a little confused...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag should be specific to cleanup
so I've moved it to cleanup.NewCmd()
.
internal/olm/operator/operator.go
Outdated
@@ -36,7 +36,7 @@ const ( | |||
type OLMCmd struct { // nolint:golint | |||
// ManifestsDir is a directory containing a package manifest and N bundles | |||
// of the operator's CSV and CRD's. OperatorVersion can be set to the | |||
// version of the desired operator version's subdir and Up()/Down() will | |||
// version of the desired operator version's subdir and Run()/Down() will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// version of the desired operator version's subdir and Run()/Down() will | |
// version of the desired operator version's subdir and Run()/Cleanup() will |
doc/cli/operator-sdk_alpha_run.md
Outdated
``` | ||
--force-registry Force deletion of the in-cluster registry. This option is a no-op on 'up'. | ||
-h, --help help for run | ||
--include strings Path to Kubernetes resource manifests, ex. Role, Subscription. These supplement or override defaults generated by up/down |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--include strings Path to Kubernetes resource manifests, ex. Role, Subscription. These supplement or override defaults generated by up/down | |
--include strings Path to Kubernetes resource manifests, ex. Role, Subscription. These supplement or override defaults generated by run/cleanup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After solving the small nits added by @joelanford
It shows ok to b merged for me as well.
/lgtm
/approved
New changes are detected. LGTM label has been removed. |
Description of the change: 'olm up/down' commands will deploy and delete an operator using OLM via manifests stored in an in-cluster registry-server managed by the SDK.
Motivation for the change:
operator-sdk
should provide tools to interact with OLM. See #1912 for past discussion of CLI.Closes #1912.