Configure the virtual assistant components

Configure Developer Hub Intelligent Assistant by updating your Backstage custom resource (CR) to map environment variables, manage configurations, and set access rights.

Before you begin

  • The RHDH Operator is installed on your cluster.
  • You have cluster administrator privileges.

Procedure

  1. Create an opaque Kubernetes Secret containing your operational credentials and query validation keys before applying the Backstage CR. Refer to the following key definitions for required environment variables:
    Important

    The Secret supplies only provider credentials and endpoints. To enable an inference provider, define it as an entry under the inference.providers section of the lightspeed-stack.yaml file. Adding a credential key to the Secret does not enable a provider on its own.

    Key Description

    VLLM_URL

    Specifies the target API endpoint URL for vLLM. The URL must end in /v1, for example, https://<api_endpoint>/v1.

    VLLM_API_KEY

    Stores the authorization token for your vLLM platform.

    OPENAI_API_KEY

    Stores the authorization secret key for OpenAI.

    VERTEX_AI_PROJECT

    Specifies your Google Cloud project ID.

    VERTEX_AI_LOCATION

    Specifies your target Google Cloud region.

    GOOGLE_APPLICATION_CREDENTIALS

    Specifies the in-container file path of your mounted Google Cloud service account credentials JSON file.

    ENABLE_VALIDATION

    Enables the question-validity shield when set to question_validity. Leave the variable unset, or set it to __disabled__, to keep validation disabled. A nonempty value such as true does not enable the shield.

    VALIDATION_PROVIDER

    Specifies the type of the inference provider that runs the classification, for example, openai or vllm. A provider of this type must be enabled in inference.providers.

    VALIDATION_MODEL_NAME

    Specifies the model that classifies each prompt, for example, gpt-4o-mini.

    The following code shows an example configuration Secret for vLLM with validation:

    apiVersion: v1
    kind: Secret
    metadata:
      name: intelligent-assistant-auth-secrets
    type: Opaque
    stringData:
      VLLM_URL: "https://<api_endpoint>/v1"
      VLLM_API_KEY: "<api_key>"
      ENABLE_VALIDATION: question_validity
      VALIDATION_PROVIDER: "vllm"
      VALIDATION_MODEL_NAME: "llama3.1"
    Note
    The VALIDATION_PROVIDER value is the inference provider type, such as vllm or openai. A provider of this type must be enabled in the inference.providers section of the lightspeed-stack.yaml file.
  2. Enable at least one inference provider by defining it under the inference.providers section of the lightspeed-stack.yaml file. Creating the Secret alone does not enable a provider. For the provider entry format and the Secret keys that each provider requires, see the inference provider configuration reference for Developer Hub Intelligent Assistant.
  3. Map your secret inside the extraEnvs section of the Backstage CR to complete container provisioning:
    apiVersion: rhdh.redhat.com/v1alpha5
    kind: Backstage
    metadata:
      name: lightspeed-rhdh
    spec:
      application:
        extraEnvs:
          secrets:
            - name: lightspeed-auth-secrets
              containers:
                - lightspeed-core
  4. Optional: To protect settings such as Model Context Protocol (MCP) server additions from being overwritten during reconciliation loops, define a custom ConfigMap mapping in the extraFiles section of the CR:
        extraFiles:
          configMaps:
            - name: "my-custom-config"
              mountPath: /app-root
              key: lightspeed-stack.yaml
              containers:
                - lightspeed-core
  5. Configure access rights by updating the RBAC policy inside your Backstage CR:

    To grant non-administrator teams access to the virtual assistant, append permission lines to the rbac-policies.csv section, replacing <team> with your target team name:

    p, role:default/<team>, intelligent-assistant.chat, use, allow

    Where:

    _<team>_
    Grants full use of the Developer Hub Intelligent Assistant chat feature, including opening the chat window, sending messages, managing chat history, and saving and reusing chat prompts.
  6. Apply the updated custom resource manifest to your cluster:
    $ oc apply -f <backstage_cr_file>.yaml

Results

  1. Log in to your console instance.
  2. Verify that the Intelligent Assistant floating action button (FAB) appears on the home page.
  3. Select the Intelligent Assistant floating action button (FAB) and confirm that the chat window initializes successfully.