operator-sdk bundle validate

operator-sdk bundle validate

Validate an operator bundle image

Synopsis

The ‘operator-sdk bundle validate’ command can validate both content and format of an operator bundle image or an operator bundles directory on-disk containing operator metadata and manifests. This command will exit with a non-zero exit code if any validation tests fail.

More information on operator bundle images and the manifests/metadata format: https://github.com/openshift/enhancements/blob/master/enhancements/olm/operator-bundle.md

NOTE: if validating an image, the image must exist in a remote registry, not just locally.

  1. operator-sdk bundle validate [flags]

Examples

  1. The following command flow will generate test-operator bundle image manifests
  2. and validate them, assuming a bundle for 'test-operator' version v0.1.0 exists at
  3. <project-root>/deploy/olm-catalog/test-operator/manifests:
  4. # Generate manifests locally.
  5. $ operator-sdk bundle create --generate-only
  6. # Validate the directory containing manifests and metadata.
  7. $ operator-sdk bundle validate ./deploy/olm-catalog/test-operator
  8. To build and validate an image:
  9. # Build and push the image using the docker CLI.
  10. $ operator-sdk bundle create quay.io/example/test-operator:v0.1.0
  11. $ docker push quay.io/example/test-operator:v0.1.0
  12. # Ensure the image with modified metadata and Dockerfile is valid.
  13. $ operator-sdk bundle validate quay.io/example/test-operator:v0.1.0

Options

  1. -h, --help help for validate
  2. -b, --image-builder string Tool to extract container images. One of: [docker, podman] (default "docker")

SEE ALSO

Last modified January 1, 0001