Skip to content

ROX-33562: migrate central-db to ubi9-micro#19797

Closed
janisz wants to merge 1 commit intomasterfrom
ROX-33562/ubi-micro-central-db
Closed

ROX-33562: migrate central-db to ubi9-micro#19797
janisz wants to merge 1 commit intomasterfrom
ROX-33562/ubi-micro-central-db

Conversation

@janisz
Copy link
Copy Markdown
Contributor

@janisz janisz commented Apr 2, 2026

Description

Migrates central-db from quay.io/sclorg/postgresql-15-c9s to ubi9-micro base image following the pattern established by scanner-db migration.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.60%. Comparing base (a408a6b) to head (3819ce6).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19797   +/-   ##
=======================================
  Coverage   49.60%   49.60%           
=======================================
  Files        2763     2763           
  Lines      208339   208339           
=======================================
+ Hits       103344   103350    +6     
+ Misses      97330    97326    -4     
+ Partials     7665     7663    -2     
Flag Coverage Δ
go-unit-tests 49.60% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🚀 Build Images Ready

Images are ready for commit 3819ce6. To use with deploy scripts:

export MAIN_IMAGE_TAG=4.11.x-575-g3819ce624a

Migrates central-db from quay.io/sclorg/postgresql-15-c9s to ubi9-micro
base image following the pattern established by scanner-db migration.

Why:
- Reduce attack surface by removing package managers from runtime image
- Decrease image size (~280MB vs ~300MB+ with full C9S base)
- Align with StackRox UBI-micro migration strategy

Changes:
- Four-stage build: postgres_rpms → ubi-micro-base → dependency_builder → final
- Download PostgreSQL 15 RPMs from PGDG repository
- Install minimal runtime dependencies (17 packages vs full base)
- Preserve RPM database integrity by copying ubi-micro-base before package install
- Handle tzdata special case (reinstall with --setopt=reposdir)
- Create postgres user/group with UID/GID 70 via chroot
- Use --allowerasing to replace coreutils-single with coreutils (needed by scripts)

Verification:
- PostgreSQL 15.17 installed and working
- No package managers in final image (rpm not found)
- bash, findutils, util-linux present for scripts
- Timezone data populated correctly
- User UID/GID 70 as expected
- Image size: 281MB

Partially generated with AI assistance.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@janisz janisz force-pushed the ROX-33562/ubi-micro-central-db branch from a92db88 to 3819ce6 Compare April 7, 2026 09:17
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 7, 2026

@janisz: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/gke-ui-e2e-tests 3819ce6 link true /test gke-ui-e2e-tests
ci/prow/gke-qa-e2e-tests 3819ce6 link false /test gke-qa-e2e-tests
ci/prow/gke-upgrade-tests 3819ce6 link false /test gke-upgrade-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@janisz
Copy link
Copy Markdown
Contributor Author

janisz commented Apr 8, 2026

/retest

@janisz janisz added the auto-retest PRs with this label will be automatically retested if prow checks fails label Apr 8, 2026
@janisz
Copy link
Copy Markdown
Contributor Author

janisz commented Apr 8, 2026

Closing as this change is not necessary as we already use pg image.

@janisz janisz closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/helm area/postgres auto-retest PRs with this label will be automatically retested if prow checks fails

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant