Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-7536

Some valid url formats are not accepted as image parameters for the APIManager CRD

    XMLWordPrintable

Details

      • Create a new APIManager CRD
      • Assign the value registry.redhat.io:443/rhel8/redis-5:1 to the system redis image
      • Before creating the CR, define an ImageStream for each custom image with a tag in the format: `x.y`
      • Configure the APIManager CRD image field(s) to point to the newly defined ImageStream(s)

    Description

      When the url format of an image field of the APIManager CRD looks like:

      my.test.url:443/test/image:version
      

      i.e. the URL is explicitly configured with a port and the version does not fit any of the formats described here ( e.g. \d+\.\d+ ), the creation of the Deployment Configs fails and the Operator pod logs the following:

      {"level":"error","ts":1631203259.351114,"logger":"controller_apimanager","msg":"Error during reconciliation","Request.Namespace":"amp2u","Request.Name":"example-apimanager","error":"DeploymentConfig.apps.openshift.io \"system-redis\" is invalid: spec.template.labels: Invalid value: \"443/rhel8/redis-5:1\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/remote-source/deps/gomod/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngithub.com/3scale/3scale-operator/pkg/controller/apimanager.(*ReconcileAPIManager).Reconcile\n\t/remote-source/app/pkg/controller/apimanager/apimanager_controller.go:187\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/remote-source/deps/gomod/pkg/mod/sigs.k8s.i...
      

      The log above was a result of configuring:

        system:
          redisImage: 'registry.redhat.io:443/rhel8/redis-5:1'
      

      Note: this only seems to happen when the CRD is customised before creation: the same URLs formats are accepted (and are effective) if the CRD is modified after the initial creation.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhn-support-sillumin Samuele Illuminati
              Eguzki Astiz Lezaun Eguzki Astiz Lezaun
              Jakub Urban Jakub Urban
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: