ROX-33560: Migrate operator konflux.Dockerfile to ubi8-micro#19378
ROX-33560: Migrate operator konflux.Dockerfile to ubi8-micro#19378
Conversation
|
Images are ready for the commit at 7745bda. To use with deploy scripts, first |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19378 +/- ##
==========================================
+ Coverage 49.68% 49.71% +0.03%
==========================================
Files 2700 2701 +1
Lines 203312 203453 +141
==========================================
+ Hits 101014 101150 +136
- Misses 94772 94779 +7
+ Partials 7526 7524 -2
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:
|
Migrate operator konflux.Dockerfile from ubi8-minimal to ubi8-micro following best practices from collector migration. Key changes: - Add ubi-micro-base stage for reference and final image - Add package_installer stage using ubi8/ubi with dnf (not ubi-minimal) - CRITICAL: Preserve ubi-micro rpmdb by copying base to /out/ first - Use dnf --installroot pattern for Konflux hermetic builds - Install only ca-certificates (minimal runtime dependency) - Consolidate all COPY commands to reduce layers (3→1) - Remove manual rpm -e package cleanup (no longer needed) This follows the migration guide recommendation (Step 1.2) to use ubi8/ubi (not ubi-minimal) as package_installer, which provides dnf without requiring workarounds. Expected benefits: - 65% smaller image (~100 MB → ~35 MB) - 33% fewer packages (~90 → ~60) - Reduced attack surface - Single-layer final image Updated rpms.in.yaml with ca-certificates for Konflux prefetch. User request: Migrate operator to ubi-micro and use ubi as package installer Code partially generated by AI (Claude) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The rpms.in.yaml was updated to include ca-certificates for the operator konflux build, but rpms.lock.yaml was not regenerated. This caused Konflux builds to fail because cachi2 couldn't find the prefetched ca-certificates package and its dependencies. Changes: - Regenerated lockfile for all architectures (aarch64, ppc64le, s390x, x86_64) - Updated package versions to latest available (security updates): - postgresql: 15.15 → 15.17 - python3.12: 3.12.12-1 → 3.12.12-2 - curl: 7.61.1-34.el8_10.9 → 7.61.1-34.el8_10.10 - brotli: 1.0.6-3 → 1.0.6-4 - And other dependency updates Generated using: ../collector/regenerate-rpms-lockfile.sh This fixes the Konflux build error: "Could not resolve host: cdn-ubi.redhat.com" when trying to install ca-certificates Related: https://issues.redhat.com/browse/ROX-33560 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Same fix as roxctl - add RPM prefetch so cachi2 sets up /etc/yum.repos.d/
to point to its local cache instead of falling back to cdn-ubi.redhat.com.
Changed operator-build.yaml prefetch-input from:
value: '{"type": "gomod", "path": "."}'
To:
value: |
[
{ "type": "gomod", "path": "." },
{ "type": "rpm", "path": "." }
]
Partially generated by AI.
68a09ba to
224dadd
Compare
Add ACTIVATION_KEY parameter to prefetch-dependencies task to fix SSL certificate verification errors when downloading RPMs from cdn.redhat.com. The subscription-manager-activation-key-prod secret provides the credentials needed for accessing Red Hat CDN during hermetic RPM prefetch. Also added dev-package-managers: true parameter as required for RPM prefetching. Partially generated by AI.
|
/konflux-retest operator-on-push |
2 similar comments
|
/konflux-retest operator-on-push |
|
/konflux-retest operator-on-push |
|
/konflux-retest operator-bundle-on-push |
2 similar comments
|
/konflux-retest operator-bundle-on-push |
|
/konflux-retest operator-bundle-on-push |
|
@janisz: The following test 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
Migrate operator konflux.Dockerfile from ubi8-minimal to ubi8-micro following best practices from collector migration.
Key changes:
This follows the migration guide recommendation (Step 1.2) to use ubi8/ubi (not ubi-minimal) as package_installer, which provides dnf without requiring workarounds.
Expected benefits:
Updated rpms.in.yaml with ca-certificates for Konflux prefetch.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
CI