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

Remove operator-sdk new|add api commands and ansible scaffolding. #3531

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
33 changes: 33 additions & 0 deletions changelog/fragments/rm-cmd-legacy-ansible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
The commands `operator-sdk new --type=ansible` and `operator-sdk add api` are no longer supported for Ansible-based Operators.

# kind is one of:
# - addition
# - change
# - deprecation
# - removal
# - bugfix
kind: "removal"

# Is this a breaking change?
breaking: true

# NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS
# FILE FOR A PREVIOUSLY MERGED PULL_REQUEST!
#
# The generator auto-detects the PR number from the commit
# message in which this file was originally added.
#
# What is the pull request number (without the "#")?
# pull_request_override: 0


# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: New and api subcommands are no longer supported for Ansible-based Operators.
body: >
TBD
162 changes: 0 additions & 162 deletions cmd/operator-sdk/add/api.go

This file was deleted.

1 change: 0 additions & 1 deletion cmd/operator-sdk/add/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func NewCmd() *cobra.Command {
Long: "",
}

cmd.AddCommand(newAddAPICmd())
cmd.AddCommand(newAddCRDCmd())
return cmd
}
4 changes: 0 additions & 4 deletions cmd/operator-sdk/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/cleanup"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/completion"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/generate"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/new"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/olm"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/run"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard"
Expand All @@ -38,9 +37,6 @@ import (
)

var commands = []*cobra.Command{
// The "new" cmd provides a way to scaffold Helm/Ansible projects
// from the new CLI.
new.NewCmd(),
scorecard.NewCmd(),
build.NewCmd(),
bundle.NewCmd(),
Expand Down
5 changes: 0 additions & 5 deletions cmd/operator-sdk/cli/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/operator-framework/operator-sdk/cmd/operator-sdk/add"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/build"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/completion"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/new"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/olm"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard"
"github.com/operator-framework/operator-sdk/cmd/operator-sdk/version"
Expand Down Expand Up @@ -61,11 +59,9 @@ func GetCLIRoot() *cobra.Command {
}

root.AddCommand(
add.NewCmd(),
build.NewCmd(),
scorecard.NewCmd(),
completion.NewCmd(),
new.NewCmd(),
olm.NewCmd(),
version.NewCmd(),
)
Expand Down Expand Up @@ -95,7 +91,6 @@ func checkGoModulesForCmd(cmd *cobra.Command) (err error) {
}

var commandsToSkip = map[string]struct{}{
"new": struct{}{}, // Handles this logic in cmd/operator-sdk/new
"operator-sdk": struct{}{}, // Alias for "help"
"help": struct{}{},
"completion": struct{}{},
Expand Down
1 change: 0 additions & 1 deletion cmd/operator-sdk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func main() {
}

// Run the KB CLI when not running in either legacy or new projects
// The new CLI still supports "operator-sdk new --type=Ansible/Helm"
if err := cli.Run(); err != nil {
log.Fatal(err)
}
Expand Down
Loading