Skip to content

Commit 76b641d

Browse files
authored
Remove legacy generate and bundle commands (#3414)
Removed legacy "generate csv/packagemanifests/bundle", and "bundle create/validate" commands. Also removed associated scaffolding packages for these commands in "internal/generate/olm-catalog".
1 parent 9defce6 commit 76b641d

26 files changed

+141
-2931
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Remove legacy "bundle create/validate" commands
6+
kind: "removal"
7+
# Is this a breaking change?
8+
breaking: true
9+
migration:
10+
header: Remove legacy "bundle create/validate" commands
11+
body: TBD
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Remove legacy generate bundle command
6+
kind: "removal"
7+
# Is this a breaking change?
8+
breaking: true
9+
migration:
10+
header: Remove legacy generate bundle command
11+
body: TBD
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Remove legacy generate csv command
6+
kind: "removal"
7+
# Is this a breaking change?
8+
breaking: true
9+
migration:
10+
header: Remove legacy generate csv command
11+
body: TBD
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Remove legacy generate packagemanifests command
6+
kind: "removal"
7+
# Is this a breaking change?
8+
breaking: true
9+
migration:
10+
header: Remove legacy generate packagemanifests command
11+
body: TBD

cmd/operator-sdk/bundle/cmd.go

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,11 @@ import (
2020

2121
//nolint:structcheck
2222
type bundleCmd struct {
23-
directory string
24-
packageName string
25-
imageTag string
26-
imageBuilder string
27-
defaultChannel string
28-
channels string
29-
generateOnly bool
23+
directory string
24+
imageBuilder string
3025
}
3126

32-
func newCmd() *cobra.Command {
27+
func NewCmd() *cobra.Command {
3328
cmd := &cobra.Command{
3429
Use: "bundle",
3530
Short: "Manage operator bundle metadata",
@@ -39,30 +34,12 @@ native software, like the Operator Lifecycle Manager.
3934
4035
More information about operator bundles and metadata:
4136
https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md
42-
`,
43-
}
44-
return cmd
45-
}
4637
47-
func NewCmdLegacy() *cobra.Command {
48-
cmd := newCmd()
49-
cmd.Long += `
50-
More information about the integration with OLM via SDK:
51-
https://sdk.operatorframework.io/docs/olm-integration/legacy
52-
`
53-
cmd.AddCommand(
54-
newCreateCmd(),
55-
newValidateCmdLegacy(),
56-
)
57-
return cmd
58-
}
59-
60-
func NewCmd() *cobra.Command {
61-
cmd := newCmd()
62-
cmd.Long += `
6338
More information about the integration with OLM via SDK:
6439
https://sdk.operatorframework.io/docs/olm-integration
65-
`
40+
`,
41+
}
42+
6643
cmd.AddCommand(
6744
newValidateCmd(),
6845
)

cmd/operator-sdk/bundle/cmd_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,4 @@ var _ = Describe("Running a bundle command", func() {
3030
Expect(subcommands[0].Use).To(Equal("validate"))
3131
})
3232
})
33-
34-
Describe("NewCmdLegacy", func() {
35-
It("builds and returns a cobra command with the correct subcommands", func() {
36-
cmd := NewCmdLegacy()
37-
Expect(cmd).NotTo(BeNil())
38-
39-
subcommands := cmd.Commands()
40-
Expect(len(subcommands)).To(Equal(2))
41-
Expect(subcommands[0].Use).To(Equal("create"))
42-
Expect(subcommands[1].Use).To(Equal("validate"))
43-
})
44-
})
4533
})

0 commit comments

Comments
 (0)