Chapter 5. Enabling the Image Registry tab
Chapter 5. Enabling the Image Registry tab When you create your application, Red Hat Developer Hub should display the Image Registry tab on your component's page. This tab provides useful information about your container images stored in your artifact registry. However, in some cases, the tab isn't displayed and here's why. RHTAP attempts to detect your artifact registry type by analyzing the URL. If the URL contains "quay", "jfrog" or "artifactory", RHTAP adds a corresponding annotation to the catalog-info.yaml file in the Git repository with your application. RHDH uses this information to annotate Catalog entries and then correctly displays the Image Registry tab . However, if your registry URL doesn't include "quay", "jfrog" or "artifactory", RHTAP cannot detect your registry type and annotate your components correctly. As a result, the Image Registry tab isn't enabled in RHDH. If the Image Registry tab is missing in the RHDH UI, you can manually enable it. You have 2 options: Enable the tab for a single existing component. Modify the registry detection script, and all new components will be automatically annotated correctly. Option 1: Enabling the Image Registry tab for the existing component Repeat this procedure for every affected component. Procedure In the Git repository with your component, navigate to skeleton > source-repo and open the catalog-info.yaml file. Add an annotation relevant to your case: metadata: annotations: 'quay.io/repository-slug': `<ORGANIZATION>/<REPOSITORY>' metadata: annotations: 'jfrog-artifactory/image-name': '<IMAGE-NAME>' Commit and push the changes to the repository. RHDH will detect your registry type and enable the Image Registry tab. Verification Select an RHTAP component where the Image Registry tab was missing. The tab menu should display it now. Figure 5.1. The Image Registry tab displayed Option 2: Enabling the Image Registry tab for all future components The RHTAP software templates use specific patterns to identify the registry type, Quay or JFrog Artifactory. If your registry does not match these patterns, you can update the catalog-info.yaml file in the templates, and RHTAP will automatically detect your registry type for all future components and annotate them correctly for RHDH. Prerequisites You have forked and cloned the tssc-sample-templates as described in Forking the RHTAP catalog repository . Procedure In a GitHub repository with your templates, navigate to skeleton > source-repo and open the catalog-info.yaml file. Find code related to registry detection: {%- if "quay" in values.image %} quay.io/repository-slug: USD{{ values.repoSlug }} {%- elif "jfrog" in values.image or "artifactory" in values.image %} jfrog-artifactory/image-name: USD{{ values.imageName }} Replace "quay", "jfrog" or "artifactory" with a part of the URL of your registry. For example, if your Artifactory registry is called my-registry.mycompany.com , then your images names may be my-registry.mycompany.com/username/my-image . You can add my-registry.mycompany to catalog-info.yaml . The updated template will automatically trigger correct annotations, and the Image Registry tab will be displayed in RHDH. Revised on 2025-02-12 15:08:03 UTC
metadata: annotations: 'quay.io/repository-slug': `<ORGANIZATION>/<REPOSITORY>' metadata: annotations: 'jfrog-artifactory/image-name': '<IMAGE-NAME>' {%- if "quay" in values.image %} quay.io/repository-slug: USD{{ values.repoSlug }} {%- elif "jfrog" in values.image or "artifactory" in values.image %} jfrog-artifactory/image-name: USD{{ values.imageName }}