Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 2. Setting up OpenShift AI Connector for Red Hat Developer Hub with Red Hat OpenShift AI


The installation of the OpenShift AI Connector for Red Hat Developer Hub requires manual updates to RHDH-related Kubernetes resources.

RHOAI Prerequisites

  • To import model cards from the model catalog into TechDocs, you must use RHOAI 2.25.

    Note

    If you upgraded to RHOAI 2.25 from an earlier version, you must manually enable the model catalog dashboard and model registry before you can import model cards.

  • If you used the model catalog in earlier versions of RHOAI, TechDocs propagation does not work for any models you registered into the model registry while at those earlier versions; only models registered into model registry from a RHOAI 2.25 model catalog have their model cards transferred to RHDH as TechDocs.
  • For the rest of the features, version 2.20 or later suffices. Enabling model registry and its associated dashboard allows for a user experience that more directly allows for customizing AI Model metadata. For best overall experience, RHOAI 2.25 is recommended.

For more details, see Enabling the model registry component.

Procedure

  1. Configure RHOAI-related RBAC and credentials. A Kubernetes ServiceAccount and a service-account-token Secret are required for the connector to retrieve data from RHOAI. The following resources must be created, replacing namespace names (ai-rhdh for RHDH, rhoai-model-registries for RHOAI) as needed:

    • ServiceAccount (rhdh-rhoai-connector). For example:

      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: rhdh-rhoai-connector
        namespace: ai-rhdh
    • ClusterRole and ClusterRoleBinding (rhdh-rhoai-connector) to allow access to OCP resources like routes, services, and inferenceservices. For example:

      # Example for `ClusterRole`
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRole
      metadata:
        name: rhdh-rhoai-connector
        annotations:
          argocd.argoproj.io/sync-wave: "0"
      rules:
        - apiGroups:
            - apiextensions.k8s.io
          resources:
            - customresourcedefinitions
          verbs:
            - get
        - apiGroups:
            - route.openshift.io
          resources:
            - routes
          verbs:
            - get
            - list
            - watch
        - apiGroups: [""]
          resources:
            - serviceaccounts
            - services
          verbs:
            - get
            - list
            - watch
      
        - apiGroups: ["serving.kserve.io"]
          resources: ["inferenceservices"]
          verbs: ["get", "list", "watch"]
      # Example for `ClusterRoleBinding`
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRoleBinding
      metadata:
        name: rhdh-rhoai-connector
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: ClusterRole
        name: rhdh-rhoai-connector
      subjects:
        - kind: ServiceAccount
          name: rhdh-rhoai-connector
          namespace: ai-rhdh
    • Role and RoleBinding to allow ConfigMap updates within the RHDH namespace (ai-rhdh). For example:

      # Example for `Role` and `Rolebinding` in the {product-very-short} namespace (`ai-rhdh`)
      apiVersion: rbac.authorization.k8s.io/v1
      kind: Role
      metadata:
        name: rhdh-rhoai-connector
        namespace: ai-rhdh
      rules:
        - apiGroups: [""]
          resources: ["configmaps"]
          verbs: ["get", "list", "watch", "create", "update", "patch"]
      ---
      apiVersion: rbac.authorization.k8s.io/v1
      kind: RoleBinding
      metadata:
        name: rhdh-rhoai-connector
        namespace: ai-rhdh
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: Role
        name: rhdh-rhoai-connector
      subjects:
        - kind: ServiceAccount
          name: rhdh-rhoai-connector
          namespace: ai-rhdh
    • RoleBinding in the RHOAI namespace (rhoai-model-registries) to grant the RHDH ServiceAccount read permissions to the model registry data (binding to registry-user-modelregistry-public).

      # Example for `RoleBinding` in the {rhoai-short} namespace (rhoai-model-registries)
      apiVersion: rbac.authorization.k8s.io/v1
      kind: RoleBinding
      metadata:
        # if using ODH then change rhoai to odh in the name and namespace here
        name: rhdh-rhoai-dashboard-permissions
        # namespace: odh-model-registries
        namespace: rhoai-model-registries
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: Role
        name: registry-user-modelregistry-public
      subjects:
        - apiGroup: rbac.authorization.k8s.io
          kind: Group
          name: system:serviceaccounts:ai-rhdh
    • Secret (rhdh-rhoai-connector-token) of type kubernetes.io/service-account-token that goes along with the rhdh-rhoai-connector ServiceAccount.

      apiVersion: v1
      kind: Secret
      metadata:
        name: rhdh-rhoai-connector-token
        namespace: ai-rhdh
        annotations:
          kubernetes.io/service-account.name: rhdh-rhoai-connector
      type: kubernetes.io/service-account-token
  2. Update your RHDH dynamic plugin configuration. The RHDH Pod requires two dynamic plugins.

    1. In your RHDH dynamic plugins ConfigMap, add the following code:

      plugins:
        - disabled: false
          package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-catalog-backend-module-model-catalog:bs_1.42.5__0.7.0!red-hat-developer-hub-backstage-plugin-catalog-backend-module-model-catalog
        - disabled: false
          package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-catalog-techdoc-url-reader-backend:bs_1.42.5__0.3.0!red-hat-developer-hub-backstage-plugin-catalog-techdoc-url-reader-backend
  3. Add the Connector sidecar containers to the RHDH Pod.

    • If RHDH was installed using the Operator, modify your RHDH custom resource (CR) instance.
    • If RHDH was installed using the Helm charts, modify the Deployment specification.
  4. The system relies on three sidecar containers (OpenShift AI Connector for Red Hat Developer Hub) running alongside the backstage-backend container.

Add these sidecar containers to your configuration referencing the rhdh-rhoai-connector-token Secret: location: Provides the REST API for RHDH plugins to fetch model metadata. storage-rest: Maintains a cache of AI Model metadata in a ConfigMap called bac-import-model. ** rhoai-normalizer: Acts as a Kubernetes controller and RHOAI client, normalizing RHOAI metadata for the connector. The following code block is an example:

+

spec:
  template:
    spec:
      containers:
        - env:
            - name: NORMALIZER_FORMAT
              value: JsonArrayFormat
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          envFrom:
            - secretRef:
                name: rhdh-rhoai-connector-token
          image: quay.io/redhat-ai-dev/model-catalog-location-service@sha256:c4471e07be6e0dbe821613053e6264a552cacda7f8604dbf306e6ac9e81e8ab9
          imagePullPolicy: Always
          name: location
          ports:
            - containerPort: 9090
              name: location
              protocol: TCP
          volumeMounts:
            - mountPath: /opt/app-root/src/dynamic-plugins-root
              name: dynamic-plugins-root
          workingDir: /opt/app-root/src
        - env:
            - name: NORMALIZER_FORMAT
              value: JsonArrayFormat
            - name: STORAGE_TYPE
              value: ConfigMap
            - name: BRIDGE_URL
              value: http://localhost:9090
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          envFrom:
            - secretRef:
                name: rhdh-rhoai-connector-token
          image: quay.io/redhat-ai-dev/model-catalog-storage-rest@sha256:398095e7469e86d84b1196371286363f4b7668aa3e26370b4d78cb8d4ace1dc9
          imagePullPolicy: Always
          name: storage-rest
          volumeMounts:
            - mountPath: /opt/app-root/src/dynamic-plugins-root
              name: dynamic-plugins-root
          workingDir: /opt/app-root/src
        - env:
            - name: NORMALIZER_FORMAT
              value: JsonArrayFormat
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          envFrom:
            - secretRef:
                name: rhdh-rhoai-connector-token
          image: quay.io/redhat-ai-dev/model-catalog-rhoai-normalizer@sha256:9f19742450a3a9c6d9c01d8341a20db7eb5a52a39348f488ae06b6aa49754a26
          imagePullPolicy: Always
          name: rhoai-normalizer
          volumeMounts:
            - mountPath: /opt/app-root/src/dynamic-plugins-root
              name: dynamic-plugins-root
          workingDir: /opt/app-root/src
          args:
            - '--metrics-address=:8081'
  1. Enable Connector in your RHDHapp-config.yaml file. In your Backstage `app-config.extra.yaml file, configure Entity Provider under the catalog.providers section:

    providers:
      modelCatalog:
        development:
          baseUrl: http://localhost:9090

    where:

    modelCatalog
    Specifies the name of the provider.
    development
    Defines future connector capability beyond a single baseUrl.
    baseUrl
    For Developer Preview, this value is the only one supported. Future releases might support external routes.
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2026 Red Hat
Nach oben