K8SPSMDB-1684 update bundle automation and icon - #2481
Conversation
fef67a2 to
46d2a0e
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the OLM bundle automation for the Percona Server for MongoDB Operator, adding new make targets and scripts to generate/validate/publish both community and certified bundles, and updating bundle metadata (including the icon and links).
Changes:
- Added root and OLM Makefile targets for bundle generation, catalog build/deploy, and validation workflows.
- Reworked bundle generation (
generate.sh) to support certified metadata/relatedImages with digest resolution via Red Hat catalog APIs. - Added validation/build helper scripts, updated bundle templates/README, refreshed icon, and extended
.gitignorefor generated artifacts.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Adds top-level bundle validation targets delegating to installers/olm. |
| kubernetes.svg | Updates the SVG used for CSV icon content. |
| installers/olm/validate-image.sh | New helper to validate bundle images via a local registry + opm. |
| installers/olm/validate-directory.sh | New helper to validate bundle directories via operator-sdk. |
| installers/olm/README.md | Documents the new OLM workflows, variables, and validation steps. |
| installers/olm/Makefile | Major refactor: new bundle/catalog/deploy/dev/validation targets and tool download logic. |
| installers/olm/generate.sh | Major refactor: namespace-only bundle generation, certified metadata/digest handling, CSV rendering changes. |
| installers/olm/distributions/redhat.sh | New Red Hat-specific hook to resolve digests/relatedImages for certified bundles. |
| installers/olm/bundle.relatedImages.yaml | Removes static relatedImages list (now generated dynamically). |
| installers/olm/bundle.csv.yaml | Updates annotations/links and makes owned CRDs a generated field. |
| installers/olm/bundle.annotations.yaml | Uses empty default OpenShift versions (now computed during generation). |
| installers/olm/build-image.sh | New helper to build/push multi-arch bundle images. |
| .gitignore | Ignores generated OLM outputs, tools, catalogs, and generated namespace manifests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
92e70e5 to
b3db051
Compare
dbb9d03 to
1d3dcb5
Compare
0ec5391 to
9b89ebe
Compare
a996516 to
8c5c1aa
Compare
8c5c1aa to
0c2836b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (6)
installers/olm/Makefile:297
- The pattern validation rules also use
bundles/$*, which breaksvalidate-certified-*because the bundle directory isbundles/redhat. Usebundle_distributionhere as well.
validate-%-directory:
./validate-directory.sh 'bundles/$*'
validate-%-image:
./validate-image.sh '$(CONTAINER)' 'bundles/$*'
installers/olm/generate.sh:290
- Error message typo/clarity: this check validates deployments, but the message says "deployments accounts" which is confusing when it triggers.
yq eval 'length == 1' operator_deployments.yaml --exit-status >/dev/null \
|| abort "too many deployments accounts: $(yq eval . operator_deployments.yaml)"
installers/olm/Makefile:292
validatetargets validatebundles/$*, but the certified bundle is generated underbundles/redhat(seebundle_distributionused elsewhere in this Makefile). As-is,make validate/certifiedandmake validatewill look in a non-existent directory.
This issue also appears on line 293 of the same file.
.PHONY: validate/community validate/certified
validate/community validate/certified: validate/%: tools
./validate-image.sh '$(CONTAINER)' 'bundles/$*'
./validate-directory.sh 'bundles/$*'
installers/olm/build-bundle.sh:60
- If the user answers "no" to the interactive confirmation, the script exits with status 1, which causes
maketo fail even though skipping was intentional. Exiting 0 here matches the behavior inbuild-catalog.sh(it exits 0 when skipping).
if is_true "${BUNDLE_BUILD_PUSH:-1}"; then
confirm_build_push "${image}" || {
echo "Bundle image push skipped: ${image}"
exit 1
}
installers/olm/build-bundle.sh:63
- When
BUNDLE_BUILD_PUSH=0,buildx build --loadis used, but--loaddoes not work with a multi-platform build (defaultlinux/amd64,linux/arm64). This makes the documented local build flow fail unless the user manually overridesBUNDLE_PLATFORMS.
else
echo "Push skipped. Building image locally."
fi
installers/olm/generate.sh:104
render_csvusesbase64, butcheck_toolsdoesn't verify thatbase64is available. On minimal environments this will fail later with a less clear error.
for command in gawk gcsplit yq jq kubectl operator-sdk yamllint envsubst; do
require "$command"
done
e80abb9 to
ecc1c1b
Compare
b682640 to
9e22008
Compare
9e22008 to
a70b221
Compare
commit: 41d216a |
CHANGE DESCRIPTION
Solution:
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability