csv-generator: Support additional images as env vars#158
Merged
tiraboschi merged 2 commits intoopenshift-virtualization:mainfrom May 7, 2026
Merged
Conversation
Contributor
Author
|
/cc @tiraboschi |
Contributor
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
994b382 to
4db7417
Compare
0cf9492 to
9415b97
Compare
Add --additional-images flag to csv-generator to pass multiple image references to the virt-platform-autopilot operator via environment variables using comma-separated ENVKEY:image pairs. The flag format is: ENVKEY1:image1,ENVKEY2:image2,... Each pair is parsed and injected as an environment variable in the manager container's CSV deployment spec. Invalid pairs (missing colon, empty key or value) are logged as warnings and skipped. This provides a reusable mechanism for passing operator-managed image references from the build pipeline to the operator runtime, enabling air-gapped deployments with digest-resolved images. The parsing logic lives in cmd/csv-generator/parser/ with comprehensive unit tests. Signed-off-by: Nir Dothan <ndothan@redhat.com> Assisted by: Claude Sonnet 4.5 <noreply@anthropic.com>
Add relatedImages section to the generated CSV containing the operator image and any additional images passed via --additional-images. This allows csv-merger to automatically merge the relatedImages from the autopilot CSV without manual intervention in the Tekton pipeline. The buildRelatedImages function constructs the list from: 1. The operator image (--operator-image) 2. All additional images from --additional-images (ENVKEY:image pairs) Signed-off-by: Nir Dothan <ndothan@redhat.com>
9415b97 to
c9ef85b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add --additional-images flag to csv-generator to pass multiple image
references to the virt-platform-autopilot operator via environment
variables using comma-separated ENVKEY:image pairs.
The flag format is: ENVKEY1:image1,ENVKEY2:image2,...
Each pair is parsed and injected as an environment variable in the
manager container's CSV deployment spec. Invalid pairs (missing colon,
empty key or value) are logged as warnings and skipped.
The csv-generator now also outputs a relatedImages section in the CSV
containing the operator image and all additional images. This allows
csv-merger in the HCO build pipeline to automatically merge relatedImages
from the autopilot CSV without manual intervention in Tekton tasks.
This provides a reusable mechanism for passing operator-managed image
references from the build pipeline to the operator runtime, enabling
air-gapped deployments with digest-resolved images. The parsing logic
lives in cmd/csv-generator/parser/ with comprehensive unit tests.
Testing
Output includes:
Dependencies
This PR enables the downstream hco-bundle-registry pipeline to: