Conversation
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 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19797 +/- ##
=======================================
Coverage 49.60% 49.60%
=======================================
Files 2763 2763
Lines 208271 208271
=======================================
Hits 103312 103312
Misses 97292 97292
Partials 7667 7667
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 Build Images ReadyImages are ready for commit a92db88. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-559-ga92db88031 |
|
@janisz: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
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
Automated testing
How I validated my change
change me!