This directory generates and validates OLM bundles for Percona Operator for PostgreSQL.
The Makefile builds two bundle variants:
community: packagepercona-postgresql-operatorredhat: packagepercona-postgresql-operator-certified
Run the commands from this directory:
cd installers/olmInstall the local toolchain used by the Makefile:
make toolsThe Makefile puts tools/<system> first in PATH, so generate.sh uses the expected versions of jq, yq, kubectl, operator-sdk, and opm.
Generate and validate both bundles:
make bundles VERSION=3.0.0Generate only the community bundle:
make bundles/community VERSION=3.0.0Generate only the Red Hat certified bundle:
make bundles/redhat VERSION=3.0.0Generated files are written to:
bundles/community
bundles/redhat
Build one bundle image:
make build VERSION=3.0.0 BUNDLE_DISTRO=community
make build VERSION=3.0.0 BUNDLE_DISTRO=redhatOverride the target image when needed:
make build VERSION=3.0.0 BUNDLE_DISTRO=redhat \
BUNDLE_IMG=perconalab/percona-postgresql-operator:certified-bundle-3.0.0Push the selected BUNDLE_IMG:
make push VERSION=3.0.0 \
BUNDLE_IMG=perconalab/percona-postgresql-operator:certified-bundle-3.0.0The bundles/* targets already run:
operator-sdk bundle validate bundles/<distro> --select-optional='suite=operatorframework'Additional validation targets are available:
make validate-bundles
make validate-community-directory
make validate-redhat-directory
make validate-community-image
make validate-redhat-imageCommon variables:
VERSION Release version. Required.
OPENSHIFT_VERSIONS OpenShift range annotation. Default: v4.18-v4.21
IMAGE Community operator image.
REDHAT_OPERATOR_IMAGE Red Hat operator image.
BUNDLE_DISTRO Bundle to build: community or redhat.
BUNDLE_IMG Bundle image tag used by build/push.
CONTAINER Container tool. Default: docker.
Example:
make bundles/redhat VERSION=3.0.0 \
OPENSHIFT_VERSIONS=v4.18-v4.21 \The Red Hat bundle uses distributions/redhat.sh as a distribution automation. It sets certified package metadata, related images, digest references, and CSV overrides.
If a Red Hat image digest cannot be resolved from the Red Hat catalog, the generated CSV uses:
@<DIGEST>
Replace these placeholders before submitting the final certified bundle.
For Red Hat, spec.skips is generated for previous certified versions. Community continues to use:
metadata:
annotations:
olm.skipRange: <VERSIONSome previous certified releases required skips instead of replaces because the replaced bundle was not present in every OpenShift index. This can happen when the supported OpenShift range changes between releases and older bundles are missing from newer indexes.
For this release flow:
- community uses
olm.skipRange: <VERSION - Red Hat uses explicit
spec.skips
See the OLM update graph docs for background:
https://olm.operatorframework.io/docs/concepts/olm-architecture/operator-catalog/creating-an-update-graph/
If validation fails with an error similar to:
cannot find Containerfile or Dockerfile in context directory: stat /mnt/Dockerfile: permission denied
the container runtime may be blocked by SELinux. Adjust the local SELinux/container settings and rerun the validation target.
Remove generated bundles, temporary SDK projects, and downloaded tools:
make clean