Skip to content

Commit

Permalink
Deprecate packagemanifests commands
Browse files Browse the repository at this point in the history
Deprecate run packagemanifests and generate packagemanifests command
in favour of bundle format.

Signed-off-by: varshaprasad96 <varshaprasad96@gmail.com>
  • Loading branch information
varshaprasad96 committed Apr 29, 2021
1 parent a90d89a commit 12d5419
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 169 deletions.
10 changes: 10 additions & 0 deletions changelog/fragments/deprecate-packagemanifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
Deprecate `operator-sdk generate packagemanifests` and `operator-sdk run packagemanifests`
command in favour of operator bundles.
kind: "deprecation"
breaking: false
6 changes: 5 additions & 1 deletion internal/cmd/operator-sdk/generate/packagemanifests/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ func NewCmd() *cobra.Command {
c := &packagemanifestsCmd{}

cmd := &cobra.Command{
Use: "packagemanifests",
Use: "packagemanifests",
Deprecated: "support for packagemanifests format will soon be removed. Use bundles " +
"to package your operators instead. To migrate your operator from packagemanifes to bundle format, " +
"you can also use 'operator-sdk pkgman-to-bundle' command. Run 'operator-sdk pkgman-to-bundle --h " +
"for more details",
Short: "Generates package manifests data for the operator",
Long: longHelp,
Example: examples,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ import (

const (
longHelp = `
Note: while the package manifests format is not yet deprecated, the operator-framework is migrated
towards using bundles by default. Run 'operator-sdk generate bundle -h' for more information.
This command generates a set of manifests in a versioned directory and a package manifest file for
your operator. Each versioned directory consists of a ClusterServiceVersion (CSV), CustomResourceDefinitions (CRDs),
and manifests not part of the CSV but required by the operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import (
func NewCmd(cfg *operator.Configuration) *cobra.Command {
i := packagemanifests.NewInstall(cfg)
cmd := &cobra.Command{
Use: "packagemanifests [packagemanifests-root-dir]",
Use: "packagemanifests [packagemanifests-root-dir]",
Deprecated: "packagemanifests format is deprecated and will soon be removed. Use bundles to " +
"package your operator instead. Refer https://sdk.operatorframework.io/docs/olm-integration/quickstart-bundle/ " +
"for more details on how to build and run operator bundles.",
Short: "Deploy an Operator in the package manifests format with OLM",
Long: `'run packagemanifests' deploys an Operator's package manifests with OLM. The command's argument
will default to './packagemanifests' if unset; if set, the argument must be a package manifests root directory,
Expand Down
1 change: 0 additions & 1 deletion website/content/en/docs/cli/operator-sdk_generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ code or manifests.
* [operator-sdk](../operator-sdk) -
* [operator-sdk generate bundle](../operator-sdk_generate_bundle) - Generates bundle data for the operator
* [operator-sdk generate kustomize](../operator-sdk_generate_kustomize) - Contains subcommands that generate operator-framework kustomize data for the operator
* [operator-sdk generate packagemanifests](../operator-sdk_generate_packagemanifests) - Generates package manifests data for the operator

112 changes: 0 additions & 112 deletions website/content/en/docs/cli/operator-sdk_generate_packagemanifests.md

This file was deleted.

1 change: 0 additions & 1 deletion website/content/en/docs/cli/operator-sdk_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ This command has subcommands that will deploy your Operator with OLM.
* [operator-sdk](../operator-sdk) -
* [operator-sdk run bundle](../operator-sdk_run_bundle) - Deploy an Operator in the bundle format with OLM
* [operator-sdk run bundle-upgrade](../operator-sdk_run_bundle-upgrade) - Upgrade an Operator previously installed in the bundle format with OLM
* [operator-sdk run packagemanifests](../operator-sdk_run_packagemanifests) - Deploy an Operator in the package manifests format with OLM

39 changes: 0 additions & 39 deletions website/content/en/docs/cli/operator-sdk_run_packagemanifests.md

This file was deleted.

10 changes: 5 additions & 5 deletions website/content/en/docs/olm-integration/cli-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ was not provisioned with these secrets.

### Package Manifests

- [`generate packagemanifests`][cli-gen-packagemanifests]: creates a new or updates an existing versioned
directory as part of the package manifests in the `<project-root>/packagemanifests` directory.
- [`run packagemanifests`][doc-testing-deployment]: runs an Operator's package manifests format
with an existing OLM installation.
The operator-framework is migrated towards using bundles by default, hence `generate packagemanifests` and `run packagemanifests` commands have been deprecated. For more
details on bundle format refer [here][bundle]. In order to migrate package manifests to
bundle format, you can use [`operator-sdk pkgman-to-bundle`][cli-pkgman-to-bundle] command.



[bundle]:https://github.com/operator-framework/operator-registry/blob/v1.16.1/docs/design/operator-bundle.md
Expand All @@ -98,8 +98,8 @@ with an existing OLM installation.
[cli-olm-uninstall]:/docs/cli/operator-sdk_olm_uninstall
[cli-gen-bundle]:/docs/cli/operator-sdk_generate_bundle
[cli-run-bundle]:/docs/cli/operator-sdk_run_bundle
[cli-gen-packagemanifests]:/docs/cli/operator-sdk_generate_packagemanifests
[cli-gen-kustomize-manifests]:/docs/cli/operator-sdk_generate_kustomize_manifests
[cli-bundle-validate]:/docs/cli/operator-sdk_bundle_validate
[doc-testing-deployment]:/docs/olm-integration/testing-deployment
[cli-run-bundle-upgrade]: /docs/cli/operator-sdk_run_bundle-upgrade
[cli-pkgman-to-bundle]: /docs/cli/operator-sdk_pkgman-to-bundle
6 changes: 2 additions & 4 deletions website/content/en/docs/olm-integration/generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ next version of your Operator.
## Overview

Several `operator-sdk` subcommands manage operator-framework manifests and metadata,
in particular [`ClusterServiceVersion`'s (CSVs)][doc-csv], for an Operator: [`generate bundle`][cli-gen-bundle],
[`generate packagemanifests`][cli-gen-packagemanifests], and [`generate kustomize manifests`][cli-gen-kustomize-manifests].
in particular [`ClusterServiceVersion`'s (CSVs)][doc-csv], for an Operator: [`generate bundle`][cli-gen-bundle] and [`generate kustomize manifests`][cli-gen-kustomize-manifests].
See this [CLI overview][cli-overview] for details on each command. These manifests come in two different formats,
[bundle][bundle] and [package manifests][package-manifests], which are described in detail below.
Ideally the bundle format should be used as this is the default packaging format in operator-framework.
However the package manifests format is still supported by operator-framework tooling.
Package manifests format is deprecated and its support will be removed soon.

### Kustomize files

Expand Down Expand Up @@ -423,7 +422,6 @@ when you set `--version` when running `generate <bundle|packagemanifests>`.
[cli-overview]:/docs/olm-integration/cli-overview
[cli-gen-kustomize-manifests]:/docs/cli/operator-sdk_generate_kustomize_manifests
[cli-gen-bundle]:/docs/cli/operator-sdk_generate_bundle
[cli-gen-packagemanifests]:/docs/cli/operator-sdk_generate_packagemanifests
[bundle]: https://github.com/operator-framework/operator-registry/blob/v1.16.1/docs/design/operator-bundle.md
[bundle-metadata]:https://github.com/operator-framework/operator-registry/blob/v1.12.6/docs/design/operator-bundle.md#bundle-annotations
[package-manifests]:https://github.com/operator-framework/operator-registry/tree/v1.5.3#manifest-format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ linkTitle: Package Manifests Quickstart
weight: 2
---

**Note**
As operator framework has moved to using bundle format by default, the package manifest commands have been deprecated and will be removed soon. It is suggested that you follow the bundle quickstart][quickstart-bundle] to package your operator.

This guide assumes you have followed the introduction and *Setup* section of the [bundle quickstart][quickstart-bundle],
and have added the `packagemanifests` target to your `Makefile` as described [here][doc-packagemanifests-makefile].

Expand Down Expand Up @@ -32,7 +35,7 @@ Now we're ready to test the Operator with OLM.

### Testing package manifests

[`operator-sdk run packagemanifests`][cli-run-packagemanifests] will create an Operator [registry][operator-registry]
`operator-sdk run packagemanifests` will create an Operator [registry][operator-registry]
from manifests and metadata in the memcached-operator project, and inform OLM that memcached-operator v0.0.1
is ready to be deployed. This process effectively replicates production deployment in a constrained manner
to make sure OLM can deploy our Operator successfully before attempting real production deployment.
Expand Down Expand Up @@ -91,7 +94,6 @@ INFO[0001] operator "memcached-operator" uninstalled

[quickstart-bundle]:/docs/olm-integration/quickstart-bundle
[operator-registry]:https://github.com/operator-framework/operator-registry
[cli-run-packagemanifests]:/docs/cli/operator-sdk_run_packagemanifests
[cli-cleanup]:/docs/cli/operator-sdk_cleanup
[doc-packagemanifests-makefile]:/docs/olm-integration/generation/#package-manifests-format
[doc-testing-deployment]:/docs/olm-integration/testing-deployment

0 comments on commit 12d5419

Please sign in to comment.