Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-4013

The {product-short} image defined in the custom resource takes precedence on the image defined in the environment variable

Prepare for Y ReleasePrepare for Z ReleaseRemove QuarterXMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.3
    • 1.3
    • Operator
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      Before this update, when the {product-short} image was configured in both the custom resource and in the 'RELATED_IMAGE_backstage' environment variable, the image defined in the custom resource was not used.

      With this update, the custom resource configuration takes precedence and is applied.
      Show
      Before this update, when the {product-short} image was configured in both the custom resource and in the 'RELATED_IMAGE_backstage' environment variable, the image defined in the custom resource was not used. With this update, the custom resource configuration takes precedence and is applied.
    • Bug Fix
    • Done
    • RHDH Core Team 3262

      Description of problem:

      When trying to test this PR using the latest 1.3 RC build of the operator, I noticed that the operator was ignoring the `spec.application.image` field defined in my CR.

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      $ ./install-rhdh-catalog-source.sh --latest --install-operator rhdh
      [INFO] Using iib from image quay.io/rhdh/iib:latest-v4.16-x86_64
      [INFO] Adding ISCP to resolve references to images not on quay.io as if from quay.io
      imagecontentsourcepolicy.operator.openshift.io/quay-io unchanged
      catalogsource.operators.coreos.com/rhdh-fast created
      Creating OperatorGroup to allow all-namespaces operators to be installed
      operatorgroup.operators.coreos.com/rhdh-operator-group unchanged
      subscription.operators.coreos.com/rhdh created 
      • Wait a bit until the operator is installed and confirm that the 1.3.0 version is installed, e.g.:

      • Create a Backstage CR using the `spec.application.image` field, e.g:
      $ cat <<EOF | oc apply -f -
      apiVersion: rhdh.redhat.com/v1alpha1
      kind: Backstage
      metadata:
        name: bs1
      spec:
        application:
          image: quay.io/janus-idp/backstage-showcase:pr-1605
      EOF 
      • Confirm that the CR is correctly deployed, e.g.:
      $ oc describe backstage bs1                   
      Name:         bs1
      Namespace:    my-ns
      Labels:       <none>
      Annotations:  <none>
      API Version:  rhdh.redhat.com/v1alpha2
      Kind:         Backstage
      Metadata:
        Creation Timestamp:  2024-09-13T07:51:22Z
        Generation:          1
        Resource Version:    62714
        UID:                 54b4a934-e84d-459a-9141-94fd24c29a17
      Spec:
        Application:
          Image:     quay.io/janus-idp/backstage-showcase:pr-1605
          Replicas:  1
      Status:
        Conditions:
          Last Transition Time:  2024-09-13T07:51:23Z
          Message:               
          Reason:                Deployed
          Status:                True
          Type:                  Deployed
      Events:                    <none>
       
      • Take a look at the images of the containers part of the application Deployment, e.g.:
      $ oc get deploy backstage-bs1 -o yaml | yq '.spec.template.spec | (.initContainers[].image, .containers[].image)' 
      registry.redhat.io/rhdh/rhdh-hub-rhel9@sha256:bdcf01c89c344defe8d7e07e46a9a70675ca09b7c26f7795317b30532de9d896
      registry.redhat.io/rhdh/rhdh-hub-rhel9@sha256:bdcf01c89c344defe8d7e07e46a9a70675ca09b7c26f7795317b30532de9d896 

      Actual results:

      The application uses the image defined by the operator (default behavior), not the one defined in the CR.

      Expected results:

      The application should use the image defined in the `spec.application.image` field (even if it is deprecated in 1.3). Otherwise, this would be a breaking change.

      Reproducibility (Always/Intermittent/Only Once):

      Always!

      Build Details:

      • Operator image: registry.redhat.io/rhdh/rhdh-rhel9-operator@sha256:092aef46229348f8c62cc2611b52c3851936f878a6379b6df47596b998ee2249
      • RHDH Metadata:

      RHDH Metadata


      RHDH Version: 1.3.0
      Backstage Version: 1.29.2
      Upstream: https://github.com/janus-idp/backstage-showcase/tree/1.3.x @ c3c3111a
      Midstream: https://gitlab.cee.redhat.com/rhidp/rhdh/-/commits/rhdh-1.3-rhel-9 @ 2e2b8c80
      Build Time: 2024-09-10T18:10:52Z

      Additional info (Such as Logs, Screenshots, etc):

      Operator Logs: operator_logs.txt

              gazarenk-1 Gennady Azarenkov
              rh-ee-asoro Armel Soro
              RHIDP - Install
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: