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 30, 2021
1 parent a90d89a commit c1b1f09
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 173 deletions.
16 changes: 16 additions & 0 deletions changelog/fragments/deprecate-packagemanifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
Deprecated `operator-sdk generate packagemanifests` and `operator-sdk run packagemanifests`
commands, packagemanifests support in general in favour of operator bundles.
kind: "deprecation"
migration:
header: Deprecate support for packagemanifests.
body: >
The operator-framework is removing support for the packagemanifests format in the near future.
Hence, `operator-sdk generate packagemanifests` and `operator-sdk run packagemanifests` commands
are deprecated. In order to migrate packagemanifests to bundles, `operator-sdk pkgman-to-bundle`
command can be used. Run `operator-sdk pkgman-to-bundle --help` for more details.
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 the packagemanifests format will be removed in operator-sdk v2.0.0. Use bundles " +
"to package your operator instead. Migrate your packagemanifes to a bundle using " +
"'operator-sdk pkgman-to-bundle' command. Run 'operator-sdk pkgman-to-bundle --help' " +
"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,11 @@ 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: "support for the packagemanifests format will be removed in operator-sdk v2.0.0. Use bundles to " +
"package your operator instead. Migrate your packagemanifes to a bundle using " +
"'operator-sdk pkgman-to-bundle' command. Run 'operator-sdk pkgman-to-bundle --help' " +
"for more details.",
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.

9 changes: 4 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,9 @@ 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 removing support for the packagemanifests format in the near future, and migration efforts are currently underway. Therefore `generate packagemanifests` and `run packagemanifests` commands have been deprecated. For more
details on bundle format refer [here][bundle]. To migrate from packagemanifests to the bundle format, use the [`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 +97,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
12 changes: 4 additions & 8 deletions website/content/en/docs/olm-integration/generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ 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].
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.
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.

**Note:** The packagemanifests format is deprecated and support will be removed in `operator-sdk` v2.0.0.

### Kustomize files

Expand Down Expand Up @@ -423,10 +421,8 @@ 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
[install-modes]:https://github.com/operator-framework/operator-lifecycle-manager/blob/4197455/Documentation/design/building-your-csv.md#operator-metadata
[olm-capabilities]:/docs/advanced-topics/operator-capabilities/operator-capabilities
[csv-markers]:/docs/building-operators/golang/references/markers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: OLM Integration Package Manifests Quickstart
linkTitle: Package Manifests Quickstart
weight: 2
---
<!-- TODO(2.0.0): remove this document -->

**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 +36,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 +95,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 c1b1f09

Please sign in to comment.