operator-sdk generate packagemanifests

operator-sdk generate packagemanifests

Generates a package manifests format

Synopsis

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.

Running ‘generate packagemanifests’ is the first step to publishing your operator to a catalog and/or deploying it with OLM. This command generates a set of manifests in a versioned directory and a package manifest file for your operator. It will interactively ask for UI metadata, an important component of publishing your operator, by default unless a package for your operator exists or you set ‘–interactive=false’.

Set ‘–version’ to supply a semantic version for your new package. This is a required flag when running ‘generate packagemanifests –manifests’.

More information on the package manifests format: https://github.com/operator-framework/operator-registry/#manifest-format

  1. operator-sdk generate packagemanifests [flags]

Examples

  1. # Create the package manifest file and a new package:
  2. $ operator-sdk generate packagemanifests --version 0.0.1
  3. INFO[0000] Generating package manifests version 0.0.1
  4. Display name for the operator (required):
  5. > memcached-operator
  6. ...
  7. # After running the above commands, you should see:
  8. $ tree deploy/olm-catalog
  9. deploy/olm-catalog
  10. └── memcached-operator
  11. ├── 0.0.1
  12. ├── cache.example.com_memcacheds_crd.yaml
  13. └── memcached-operator.clusterserviceversion.yaml
  14. └── memacached-operator.package.yaml

Options

  1. --apis-dir string Root directory for API type defintions
  2. --channel string Channel name for the generated package
  3. --crds-dir string Root directory for CustomResoureDefinition manifests
  4. --default-channel Use the channel passed to --channel as the package manifest file's default channel
  5. --deploy-dir string Root directory for operator manifests such as Deployments and RBAC, ex. 'deploy'. This directory is different from that passed to --input-dir
  6. --from-version string Semantic version of the operator being upgraded from
  7. -h, --help help for packagemanifests
  8. --input-dir string Directory to read existing package manifests from. This directory is the parent of individual versioned package directories, and different from --deploy-dir
  9. --interactive When set or no package base exists, an interactive command prompt will be presented to accept package ClusterServiceVersion metadata
  10. --operator-name string Name of the packaged operator
  11. --output-dir string Directory in which to write package manifests
  12. -q, --quiet Run in quiet mode
  13. --update-crds Update CustomResoureDefinition manifests in this package (default true)
  14. -v, --version string Semantic version of the packaged operator

SEE ALSO

Last modified July 24, 2020: [v0.19.x] cmd/operator-sdk/generate/packagemanifests: add `—from-version` flag (#3509) (#3524) (a48569c6)