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
-
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.providerssection of thelightspeed-stack.yamlfile. Adding a credential key to the Secret does not enable a provider on its own.Expand Key Description VLLM_URLSpecifies the target API endpoint URL for vLLM. The URL must end in
/v1, for example,https://<api_endpoint>/v1.VLLM_API_KEYStores the authorization token for your vLLM platform.
OPENAI_API_KEYStores the authorization secret key for OpenAI.
VERTEX_AI_PROJECTSpecifies your Google Cloud project ID.
VERTEX_AI_LOCATIONSpecifies your target Google Cloud region.
GOOGLE_APPLICATION_CREDENTIALSSpecifies the in-container file path of your mounted Google Cloud service account credentials JSON file.
ENABLE_VALIDATIONEnables 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 astruedoes not enable the shield.VALIDATION_PROVIDERSpecifies the type of the inference provider that runs the classification, for example,
openaiorvllm. A provider of this type must be enabled ininference.providers.VALIDATION_MODEL_NAMESpecifies 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 TheVALIDATION_PROVIDERvalue is the inference provider type, such asvllmoropenai. A provider of this type must be enabled in theinference.providerssection of thelightspeed-stack.yamlfile. -
Enable at least one inference provider by defining it under the
inference.providerssection of thelightspeed-stack.yamlfile. 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. -
Map your secret inside the
extraEnvssection 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 -
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
extraFilessection of the CR:extraFiles: configMaps: - name: "my-custom-config" mountPath: /app-root key: lightspeed-stack.yaml containers: - lightspeed-core -
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.csvsection, replacing<team>with your target team name:p, role:default/<team>, intelligent-assistant.chat, use, allowWhere:
_<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.
-
Apply the updated custom resource manifest to your cluster:
$ oc apply -f <backstage_cr_file>.yaml
Results
- Log in to your console instance.
- Verify that the Intelligent Assistant floating action button (FAB) appears on the home page.
- Select the Intelligent Assistant floating action button (FAB) and confirm that the chat window initializes successfully.