Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-7153

oc-mirror v2: Enhanced oc-mirror v2 to discover Operand images referenced via Environment Variables

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • oc-mirror
    • False
    • None
    • False
    • Not Selected

      1. Proposed title of this feature request

      Enhanced oc-mirror v2 to discover Operand images referenced via Environment Variables

       

      2. What is the nature and description of the request?

      Customers deploying operator-framework based controllers in air-gapped environments need to mirror all required container images, including operand images. 

      Currently, oc-mirror v2 supports mirroring images referenced within Helm charts using imagePaths expressions.  However, operand images, dynamically deployed by operator controllers at runtime, are typically referenced via environment variables within the controller's Deployment template.  While oc-mirror can access these environment variables, it attempts to mirror all values, including non-image references (e.g., log levels), leading to failures.

      This request proposes enhancing oc-mirror to intelligently identify and mirror only the container images referenced in these environment variables.

       

      3. Why does the customer need this? (List the business requirements here)

      • Enable customers to successfully mirror all necessary images (including operand images) for operator-framework based applications deployed in air-gapped environments.
      • Support the standard convention of referencing operand images via environment variables within the operator controller Deployment template (often prefixed with RELATED_IMAGE_).
      • Ensure that oc-mirror can accurately identify and mirror only container images, ignoring other environment variable values (e.g., configuration settings, log levels).
      • Facilitate seamless deployment of operator-framework based applications in disconnected environments.

       

      4. List any affected packages or components.

      • oc-mirror

       

      5. Further Context:

      Currently, oc-mirror uses predefined expressions and user-defined imagePaths to identify images in Helm charts.  However, these expressions are insufficient for operand images referenced via environment variables like RELATED_IMAGE_OPERAND_PRIMARY and RELATED_IMAGE_OPERAND_SIDECAR.

      Using an imagePath like .spec.template.spec.containers[*].env[*].value captures all environment variable values, but causes oc-mirror to fail when encountering non-image references.

      The proposed solution is to enhance oc-mirror to:

      • Silently ignore environment variables whose values are not valid image references.
      • Support more sophisticated imagePath expressions that can filter environment variables based on naming conventions (e.g., starting with RELATED_IMAGE_).

      This enhancement will enable mirroring of all necessary images for operator-framework applications in air-gapped environments, addressing a critical need for customers.

      (See also: GitHub issue #1030)

       

              rhn-coreos-tunwu Tony Wu
              rhn-coreos-tunwu Tony Wu
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: