Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-1483

Allow specifying image pull secrets in Custom Resource for the database

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • True
    • Hide
      In earlier versions of the Red Hat Developer Hub (RHDH) operator, specifying image pull secrets in order to pull container images from private repositories like registry.redhat.io had no effect on the Database image. As such, it was not possible to use a database image from registry.redhat.io when deploying RHDH in non-OpenShift clusters like Amazon EKS or Azure AKS.
      This update fixes that issue by propagating the image pull secrets set in the `spec.application.imagePullSecrets` Custom Resource field, so that they can be used for both the RHDH and Database images.
      Show
      In earlier versions of the Red Hat Developer Hub (RHDH) operator, specifying image pull secrets in order to pull container images from private repositories like registry.redhat.io had no effect on the Database image. As such, it was not possible to use a database image from registry.redhat.io when deploying RHDH in non-OpenShift clusters like Amazon EKS or Azure AKS. This update fixes that issue by propagating the image pull secrets set in the `spec.application.imagePullSecrets` Custom Resource field, so that they can be used for both the RHDH and Database images.
    • Enhancement
    • Proposed
    • RHDH Install&Run 3255

      Story

      As an operator user trying to deploy RHDH on a non-Openshift cluster like EKS, I want to be able to specify the image pull secrets to use for the Database, so that I can run RHDH with the supported PostgreSQL image coming from registry.redhat.io and which requires authentication. The downstream bundle of the RHDH operator uses a PostgreSQL image coming from registry.redhat.com and I want to be able to use that image as well.

      At this time, the Custom Resource allows me to specify image pull secrets, but those will be applied to the main Backstage pod only, not the database:

      $ cat .asoro/aws-eks-cr-non-olm.yaml
      apiVersion: rhdh.redhat.com/v1alpha1
      kind: Backstage
      metadata:
       # TODO: this the name of your RHDH instance
        name: my-rhdh
      spec:
        application:
          imagePullSecrets:
          - "rhdh-pull-secret"
          route:
            enabled: false 
        database:
          # DB is enabled by default, but I cannot specify image pull secrets
          enableLocalDb: true

       

      Acceptance Criteria (Proposal)

      • Similar to the spec.application.imagePullSecrets field in the CR, add a new spec.database.imagePullSecrets field in the CR
      • Make sure this new field is reconciled properly

      Notes

      • A possible workaround is to patch the operator config ConfigMap to add the image pull secrets to the "db-statefulset.yaml" key directly, but this will affect all instances managed by the operator. Furthermore, we need to make sure such manual configuration is not overwritten when the operator is upgraded.
      • Another possible workaround is to manually patch the default service account of the namespace where RHDH is installed to add the required image pull secrets, like below. The problem is that this affects all resources created in that namespace and making use of that default service account.
      $ kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "rhdh-pull-secret"}]}' -n my-rhdh 

       

              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: