Skip to content

K8SPSMDB-1684 update bundle automation and icon - #2481

Open
valmiranogueira wants to merge 7 commits into
mainfrom
K8SPSMDB-1684-update-bundles
Open

K8SPSMDB-1684 update bundle automation and icon#2481
valmiranogueira wants to merge 7 commits into
mainfrom
K8SPSMDB-1684-update-bundles

Conversation

@valmiranogueira

@valmiranogueira valmiranogueira commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

CHANGE DESCRIPTION

Solution:

  • Refactor OLM bundle generation for community and certified bundles.
  • Add make targets for bundle, build, push, catalog, deploy, and production workflows.
  • Generate certified metadata, relatedImages, and CR examples from image definitions.
  • Add ClusterSync and certified initImage examples.
  • Add bundle validation helpers.
  • Ignore generated OLM artifacts and local tooling.
  • Automate certified bundle skips, managed resources, and OpenShift versions.
  • Remove marketplace references.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .gitignore for 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.

Comment thread installers/olm/generate.sh Outdated
Comment thread installers/olm/Makefile
Comment thread installers/olm/Makefile Outdated
Comment thread installers/olm/Makefile Outdated
Comment thread installers/olm/Makefile Outdated
Comment thread installers/olm/Makefile Outdated
Comment thread installers/olm/validate-image.sh Outdated
Comment thread installers/olm/build-image.sh Outdated
@valmiranogueira valmiranogueira changed the title K8SPSMDB-1684 Update bundle automation and icon K8SPSMDB-1684 update bundle automation and icon Jul 22, 2026
@valmiranogueira
valmiranogueira force-pushed the K8SPSMDB-1684-update-bundles branch 4 times, most recently from 92e70e5 to b3db051 Compare July 24, 2026 21:08
@valmiranogueira
valmiranogueira force-pushed the K8SPSMDB-1684-update-bundles branch from dbb9d03 to 1d3dcb5 Compare July 24, 2026 21:17
Comment thread installers/olm/distributions/redhat.sh Outdated
egegunes
egegunes previously approved these changes Jul 28, 2026
@valmiranogueira
valmiranogueira requested a review from eleo007 as a code owner July 28, 2026 21:56
@github-actions github-actions Bot added the tests label Jul 28, 2026
@valmiranogueira
valmiranogueira force-pushed the K8SPSMDB-1684-update-bundles branch from 0ec5391 to 9b89ebe Compare July 28, 2026 21:58
@github-actions github-actions Bot removed the tests label Jul 28, 2026
@valmiranogueira
valmiranogueira force-pushed the K8SPSMDB-1684-update-bundles branch 2 times, most recently from a996516 to 8c5c1aa Compare July 28, 2026 22:41
@valmiranogueira
valmiranogueira force-pushed the K8SPSMDB-1684-update-bundles branch from 8c5c1aa to 0c2836b Compare July 28, 2026 22:50
Comment thread installers/olm/distributions/redhat.sh Outdated
Comment thread installers/olm/distributions/redhat.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 breaks validate-certified-* because the bundle directory is bundles/redhat. Use bundle_distribution here 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

  • validate targets validate bundles/$*, but the certified bundle is generated under bundles/redhat (see bundle_distribution used elsewhere in this Makefile). As-is, make validate/certified and make validate will 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 make to fail even though skipping was intentional. Exiting 0 here matches the behavior in build-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 --load is used, but --load does not work with a multi-platform build (default linux/amd64,linux/arm64). This makes the documented local build flow fail unless the user manually overrides BUNDLE_PLATFORMS.
	else
		echo "Push skipped. Building image locally."
	fi

installers/olm/generate.sh:104

  • render_csv uses base64, but check_tools doesn't verify that base64 is 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

Comment thread installers/olm/distributions/redhat.sh
@valmiranogueira
valmiranogueira force-pushed the K8SPSMDB-1684-update-bundles branch from e80abb9 to ecc1c1b Compare July 29, 2026 14:12
jvpasinatto
jvpasinatto previously approved these changes Jul 29, 2026
jvpasinatto
jvpasinatto previously approved these changes Jul 29, 2026
@valmiranogueira
valmiranogueira force-pushed the K8SPSMDB-1684-update-bundles branch from b682640 to 9e22008 Compare July 30, 2026 02:44
@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
arbiter passed 00:00:00
balancer passed 00:00:00
cert-management-policy passed 00:00:00
clustersync passed 00:00:00
cross-site-sharded passed 00:00:00
custom-replset-name passed 00:00:00
custom-tls passed 00:00:00
custom-users-roles passed 00:00:00
custom-users-roles-sharded passed 00:18:26
data-at-rest-encryption passed 00:00:00
data-sharded passed 00:21:36
demand-backup passed 00:00:00
demand-backup-eks-credentials-irsa passed 00:00:00
demand-backup-fs passed 00:00:00
demand-backup-if-unhealthy passed 00:00:00
demand-backup-incremental-aws passed 00:00:00
demand-backup-incremental-azure passed 00:00:00
demand-backup-incremental-gcp-native passed 00:00:00
demand-backup-incremental-gcp-s3 passed 00:00:00
demand-backup-incremental-oss-s3 passed 00:16:34
demand-backup-incremental-oss-native passed 00:16:41
demand-backup-incremental-minio passed 00:00:00
demand-backup-incremental-sharded-aws passed 00:18:47
demand-backup-incremental-sharded-azure passed 00:00:00
demand-backup-incremental-sharded-gcp-native passed 00:00:00
demand-backup-incremental-sharded-gcp-s3 passed 00:18:23
demand-backup-incremental-sharded-oss-s3 passed 00:32:13
demand-backup-incremental-sharded-oss-native passed 00:00:00
demand-backup-incremental-sharded-minio passed 00:00:00
demand-backup-logical-minio-native-tls passed 00:00:00
demand-backup-physical-parallel passed 00:00:00
demand-backup-physical-aws passed 00:13:17
demand-backup-physical-azure passed 00:00:00
demand-backup-physical-gcp-s3 passed 00:00:00
demand-backup-gcs-workload-identity passed 00:00:00
demand-backup-physical-gcp-native passed 00:00:00
demand-backup-physical-oss-s3 passed 00:00:00
demand-backup-physical-oss-native passed 00:00:00
demand-backup-physical-oci passed 00:00:00
demand-backup-physical-minio passed 00:00:00
demand-backup-physical-minio-native passed 00:00:00
demand-backup-physical-minio-native-tls passed 00:00:00
demand-backup-physical-sharded-parallel passed 00:00:00
demand-backup-physical-sharded-aws passed 00:00:00
demand-backup-physical-sharded-azure passed 00:00:00
demand-backup-physical-sharded-gcp-native passed 00:00:00
demand-backup-physical-sharded-oss-s3 passed 00:00:00
demand-backup-physical-sharded-oss-native passed 00:00:00
demand-backup-physical-sharded-minio passed 00:00:00
demand-backup-physical-sharded-minio-native passed 00:00:00
demand-backup-sharded passed 00:00:00
demand-backup-snapshot passed 00:00:00
demand-backup-snapshot-vault passed 00:00:00
disabled-auth passed 00:00:00
expose-sharded passed 00:00:00
external-dns passed 00:00:00
finalizer passed 00:00:00
ignore-labels-annotations passed 00:00:00
init-deploy passed 00:00:00
ldap passed 00:00:00
ldap-tls passed 00:00:00
limits passed 00:00:00
liveness passed 00:00:00
mongod-major-upgrade passed 00:00:00
mongod-major-upgrade-sharded passed 00:00:00
monitoring-2-0 passed 00:00:00
monitoring-pmm3 passed 00:00:00
multi-cluster-service failure 00:12:33
multi-storage passed 00:00:00
non-voting-and-hidden passed 00:20:13
one-pod passed 00:00:00
operator-self-healing-chaos passed 00:00:00
pitr passed 00:38:42
pitr-physical passed 00:00:00
pitr-sharded passed 00:00:00
pitr-to-new-cluster passed 00:00:00
pitr-physical-backup-source passed 00:00:00
preinit-updates passed 00:00:00
pvc-auto-resize passed 00:00:00
pvc-resize passed 00:00:00
recover-no-primary passed 00:00:00
replset-overrides passed 00:00:00
replset-remapping passed 00:18:59
replset-remapping-sharded passed 00:00:00
rs-shard-migration passed 00:00:00
scaling passed 00:00:00
scheduled-backup passed 00:00:00
security-context passed 00:00:00
self-healing-chaos passed 00:00:00
service-per-pod passed 00:00:00
serviceless-external-nodes passed 00:00:00
smart-update passed 00:00:00
split-horizon passed 00:00:00
split-horizon-manual-tls passed 00:00:00
stable-resource-version passed 00:05:19
storage passed 00:00:00
tls-clusterissuer-cert-manager passed 00:00:00
tls-issue-cert-manager passed 00:00:00
unsafe-psa passed 00:00:00
upgrade passed 00:00:00
upgrade-consistency passed 00:00:00
upgrade-consistency-sharded-tls passed 00:53:39
upgrade-sharded passed 00:00:00
upgrade-partial-backup passed 00:00:00
users passed 00:00:00
users-vault passed 00:14:44
vector-search passed 00:00:00
vector-search-sharded passed 00:00:00
version-service passed 00:25:58
Summary Value
Tests Run 109/109
Job Duration 01:14:13
Total Test Time 05:46:12

commit: 41d216a
image: perconalab/percona-server-mongodb-operator:PR-2481-41d216a4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

olm size/XXL 1000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants