Uploaded image for project: 'OpenShift Container Platform (OCP) Strategy'
  1. OpenShift Container Platform (OCP) Strategy
  2. OCPSTRAT-1967

oc-mirror v2: Improved environment variable parsing for `ImagePaths`

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 100% To Do, 0% In Progress, 0% Done
    • 0

      Feature Overview (aka. Goal Summary)  

      Enhance the oc-mirror v2 to discover and mirror container images referenced within environment variables of deployment templates. 

      Goals (aka. expected user outcomes)

      • Users can mirror all necessary container images referenced within environment variables of deployment templates, including operand images, for operator-based applications in air-gapped environments.
      • oc-mirror v2 accurately identifies and mirrors only valid container image references within environment variables, ignoring non-image values.
      • Improved reliability of oc-mirror v2 when processing environment variables.
      • Reduced manual intervention needed to mirror all required images.

      Background

      Operator-based applications commonly employ a dynamic runtime deployment strategy for operand images.  These images are often specified through environment variables within the operator controller's Deployment template.  

      Currently, the oc-mirror v2 utilizes predefined expressions and user-defined imagePaths to locate images within Helm charts.  However, the existing imagePaths expressions lack the specificity required for environment variables, capturing all values arbitrarily.  This leads to failures when oc-mirror v2 encounters non-image values within the environment variables. 

      This feature is aimed at improving the reliability of oc-mirror v2 when processing environment variables with non-image values and enhanced imagePaths expressions to filter environment variables.

      Requirements (aka. Acceptance Criteria):

      • Graceful error handling:
        • Ignore environment variables whose values are not valid image references without causing failures.
        • Provide informative warnings or logs when non-image values are encountered.
      • Environment variable filtering:
        • Support filtering environment variables based on naming conventions with enhanced imagePaths expressions similar to regular expression or alternative methods.
      • Testing:
        • Comprehensive unit and integration tests are created to ensure the accuracy and reliability of the new functionality.
        • Test with a variety of environment variable naming conventions and image reference formats.

      Documentation Considerations

      • Update oc-mirror v2 documentation to reflect the new functionality.
      • Provide clear examples of how to use the enhanced imagePaths expressions or filtering mechanisms.
      • Include troubleshooting information for common issues related to environment variable image mirroring, e.g., encountering non-image values within the environment variables.

              rhn-coreos-tunwu Tony Wu
              rhn-coreos-tunwu Tony Wu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: