Skip to content

Commit ce634ef

Browse files
[v0.17.x] generate csv: un-deprecate --csv-channel and --default-channel (#3044)
1 parent 3a5ec19 commit ce634ef

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

cmd/operator-sdk/generate/csv.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,6 @@ Flags that change project default paths:
183183
"Semantic version of the CSV. This flag must be set if a package manifest exists")
184184
cmd.Flags().StringVar(&c.fromVersion, "from-version", "",
185185
"Semantic version of an existing CSV to use as a base")
186-
err := cmd.Flags().MarkDeprecated("from-version",
187-
"Use --csv-version to update your bundled CSV in `manifests/`")
188-
if err != nil {
189-
panic(err)
190-
}
191186

192187
// TODO: Allow multiple paths
193188
// Deployment and RBAC manifests might be in different dirs e.g kubebuilder
@@ -206,21 +201,12 @@ Flags that change project default paths:
206201
"If --make-manifests=true, the bundle directory will be <output-dir>/manifests")
207202
cmd.Flags().StringVar(&c.operatorName, "operator-name", "",
208203
"Operator name to use while generating CSV")
204+
209205
cmd.Flags().StringVar(&c.csvChannel, "csv-channel", "",
210206
"Channel the CSV should be registered under in the package manifest")
211-
err = cmd.Flags().MarkDeprecated("csv-channel", "Package manifests are deprecated. "+
212-
"Run `operator-sdk bundle create --generate-only` to create operator metadata")
213-
if err != nil {
214-
panic(err)
215-
}
216207
cmd.Flags().BoolVar(&c.defaultChannel, "default-channel", false,
217208
"Use the channel passed to --csv-channel as the package manifests' default channel. "+
218209
"Only valid when --csv-channel is set")
219-
err = cmd.Flags().MarkDeprecated("default-channel", "Package manifests are deprecated. "+
220-
"Run `operator-sdk bundle create --generate-only` to create operator metadata")
221-
if err != nil {
222-
panic(err)
223-
}
224210

225211
cmd.Flags().BoolVar(&c.updateCRDs, "update-crds", true,
226212
"Update CRD manifests in deploy/<operator-name>/<csv-version> from the default "+

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,11 @@ operator-sdk generate csv [flags]
128128
```
129129
--apis-dir string Project relative path to root directory for API type defintions (default "pkg/apis")
130130
--crd-dir string Project relative path to root directory for CRD and CR manifests
131+
--csv-channel string Channel the CSV should be registered under in the package manifest
131132
--csv-version string Semantic version of the CSV. This flag must be set if a package manifest exists
133+
--default-channel Use the channel passed to --csv-channel as the package manifests' default channel. Only valid when --csv-channel is set
132134
--deploy-dir string Project relative path to root directory for operator manifests (Deployment and RBAC) (default "deploy")
135+
--from-version string Semantic version of an existing CSV to use as a base
133136
-h, --help help for csv
134137
--make-manifests When set, the generator will create or update a CSV manifest in a 'manifests' directory. This directory is intended to be used for your latest bundle manifests. The default location is deploy/olm-catalog/<operator-name>/manifests. If --output-dir is set, the directory will be <output-dir>/manifests (default true)
135138
--operator-name string Operator name to use while generating CSV

0 commit comments

Comments
 (0)