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 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19797 +/- ##
=======================================
Coverage 49.59% 49.59%
=======================================
Files 2761 2763 +2
Lines 208143 208167 +24
=======================================
+ Hits 103226 103250 +24
Misses 97252 97252
Partials 7665 7665
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:
|
|
@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!