Skip to content

Allow to configure CustomerDots URL for envs

Tan Le requested to merge configure-customer-dot-url-test-cluster into main

What does this MR do and why?

This adds ability to configure different CustomerDots URL for different environments via Helm charts. We need this change to test the OIDC authentication flow with the CustomerDots staging instance end-to-end.

Step to test

To test the OIDC flow with CustomerDots in staging

  1. Deploy this change in the ai-assist-test cluster
  2. Issue a JWT token from https://customers.staging.gitlab.com
  3. Port-forward to the ai-assist-test cluster
    kubectl port-forward svc/model-k8s-gateway -n fauxpilot 9222:8080 --address='0.0.0.0'
  4. Issue a cURL command with the JWT token issue above and confirm we receive 200.
    curl --request POST \
      --url http://localhost:9222/v2/completions \
      --header 'Content-Type: application/json' \
      --header 'X-Gitlab-Authentication-Type: oidc' \
      --header 'authorization: Bearer <jwt_token> \
      --data '{
      "prompt_version": 1,
      "project_path": "awesome_project",
      "project_id": 23,
      "current_file": {
        "file_name": "main.py",
        "content_above_cursor": "\"\"\"\nImplement fastapi middleware to log all incoming requests\"\"\"\n",
        "content_below_cursor": "scoopy doo"
      }
    }'
Edited by Tan Le

Merge request reports