Add helm chart
Description
Issue: Helm Charts for AI Gateway deployment (gitlab-org/gitlab#452490 - closed)
Add helm chart for AI Gateway.
Testing
-
Clone the repository.
-
Create a
test.values.yamlfile with the following contextimage: tag: latest logging: level: "debug" json: false gitlab: url: "http://gdk.test:3000/" apiUrl: "http://gdk.test:3000/api/v4/" customerPortalUrl: "http://gdk.test:5000/" authBypassExternal: true anthropicApiKey: value: "REPLACE_ME" vertexTextModel: project: "REPLACE_ME" jsonKey: value: |- { "type": "service_account", "project_id": "REPLACE_ME", "private_key_id": "REPLACE_ME", "private_key": "REPLACE_ME", "client_email": "REPLACE_ME", "client_id": "REPLACE_ME", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "REPLACE_ME", "universe_domain": "googleapis.com" } extraEnvironmentVariables: - name: TEST value: test -
Replace all instances of
REPLACE_MEin the above file with appropriate values. -
Tip - Follow https://developers.google.com/workspace/guides/create-credentials if you need to create the
GOOGLE_APPLICATION_CREDENTIALS. -
Verify the helm chart is rendering correctly
helm template ai-gateway-test . \ -f values.yaml \ -f test.values.yaml -
Install the helm chart
helm upgrade --install ai-gateway-test . \ --namespace ai-gateway-test \ --create-namespace \ -f values.yaml \ -f test.values.yaml -
Verify if everything is working correctly
export POD_NAME=$(kubectl get pods --namespace ai-gateway-test -l "app.kubernetes.io/name=ai-gateway,app.kubernetes.io/instance=ai-gateway-test" -o jsonpath="{.items[0].metadata.name}") kubectl --namespace ai-gateway-test logs -f $POD_NAMEexport POD_NAME=$(kubectl get pods --namespace ai-gateway-test -l "app.kubernetes.io/name=ai-gateway,app.kubernetes.io/instance=ai-gateway-test" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace ai-gateway-test $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") kubectl --namespace ai-gateway-test port-forward $POD_NAME 8080:$CONTAINER_PORTcurl localhost:8080/docs -
Delete the helm chart
helm -n ai-gateway-test delete ai-gateway-test
Notes/Questions
- Some options like server reload are not added to the helm chart because it is not needed in a non-development environment. Are there other such options which are present in the helm chart but need to be removed? e.g. auth external bypass
- Need feedback from the team if the name for values options in
values.yamllook right or if they want to rename/restructure them? -
registry.gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/model-gateway:v1.0.0has been failing for me. Is that image stable? - Need clarity on gitlab-org/gitlab#452490 (comment 1879031638) before merging this MR.
Next steps
- Create a followup issue to publish on charts.gitlab.io
Edited by Vishal Tak