MaaS API Key Management Fails with Custom Domain in Red Hat OpenShift AI

Solution Verified - Updated

Environment

  • Red Hat OpenShift AI (RHOAI) 3.4
  • Models as a Service (MaaS) installed and enabled (modelsAsService: Managed in the DataScienceCluster)
  • MaaS Gateway configured with a custom hostname (i.e., the Gateway hostname differs from the default maas.apps.<cluster-domain>)

Issue

When the MaaS Gateway is configured with a custom domain, the maas-ui container inside the rhods-dashboard pod incorrectly constructs the MaaS API URL using the cluster's default ingress domain (maas.apps.<cluster-domain>) instead of the actual custom Gateway hostname.

As a result, API key management dashboard functionality that relies on the MaaS API is broken.

The API key management view in the Gen AI Studio (RHOAI Dashboard) fails to load, and browser network inspection shows requests being sent to https://maas.apps.<clustername>/maas-api instead of the expected https://<custom-domain>/maas-api.

This issue is always reproducible on any cluster where the MaaS Gateway hostname differs from maas.apps.<cluster-domain>

Resolution

There is currently no permanent fix available. A code fix is being tracked upstream so that the maas-ui container correctly discovers the actual MaaS Gateway hostname from the Gateway resource or Tenant CR.

Apply the workaround below while awaiting an updated RHOAI release.

Workaround — Set MAAS_API_URL environment variable (simple, non-persistent)

Inject the correct MaaS API URL directly into the maas-ui container:

oc -n redhat-ods-applications set env deployment/rhods-dashboard \
  -c maas-ui \
  MAAS_API_URL=https://<custom-domain>/maas-api

Replace <custom-domain> with the actual hostname configured on your MaaS Gateway (e.g., maas.custom-domain.com).

Verify the env var was applied:

oc -n redhat-ods-applications get deployment rhods-dashboard \
  -o jsonpath='{.spec.template.spec.containers[?(@.name=="maas-ui")].env}'

Verify the dashboard pods have rolled out:

oc rollout status deployment/rhods-dashboard -n redhat-ods-applications

⚠️ If you previously applied another workaround by annotating the dashboard deployment, remove it.

oc -n redhat-ods-applications annotate deployment rhods-dashboard \
  opendatahub.io/managed- --overwrite

Root Cause

The maas-ui container in the rhods-dashboard deployment does not dynamically discover the MaaS Gateway hostname. Instead, it constructs the MaaS API base URL by prepending maas. to the cluster's default ingress domain, regardless of the hostname actually configured on the Gateway resource.

When a custom domain is used for the MaaS Gateway, this hardcoded URL construction logic produces an incorrect MaaS API URL, causing all API calls from the dashboard to fail.

Diagnostic Steps

1. Confirm the MaaS Gateway is using a custom domain:

oc get gateway -n openshift-ingress -o jsonpath='{.items[*].spec.listeners[*].hostname}'

If the hostname shown differs from maas.apps.<cluster-domain>, this issue applies.

2. Confirm dashboard pods are healthy but MaaS API calls are failing:

oc get pods -n redhat-ods-applications | grep rhods-dashboard

The pods themselves will appear Running — this is not a crashloop scenario. The failure is a silent API connectivity issue visible only in browser developer tools (Network tab).

3. Reproduce the failure in the browser:

3.1 Open the RHOAI Dashboard (Gen AI Studio).
3.2 Navigate to the API key management view.
3.4 Open browser developer tools → Network tab.
3.5 Observe outbound requests going to https://maas.apps.<clustername>/maas-api instead of https://<custom-domain>/maas-api.

4. Confirm the incorrect URL is sourced from the maas-ui container's environment:

oc -n redhat-ods-applications get deployment rhods-dashboard \
  -o jsonpath='{.spec.template.spec.containers[?(@.name=="maas-ui")].env}'

If MAAS_API_URL is absent or set to the wrong value, the container is constructing the URL from the cluster ingress domain by default.

Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.