Adds database traffic capture config to charts
What does this MR do?
Adds database traffic capture config
Related issues
Create the bucket config for SQL Traffic Replay (gitlab-org/gitlab#562377 - closed)
Testing
Requirements
To test the changes, you need a local Kubernetes development environment.
Follow https://docs.gitlab.com/charts/development/minikube/ to install Minikube.
You can skip the Deploying the chart
section.
Steps
- Clone this repository
git clone git@gitlab.com:gitlab-org/charts/gitlab.git charts-gitlab
cd charts-gitlab
-
git checkout --track origin/562377-add-database-traffic-capture-config
-
Run
helm dependency update
- Edit
example/values-minikube.yaml
and include the config under global:
global:
...
appConfig:
databaseTrafficCapture:
config:
storage:
connector:
provider: Gcs
projectId: project-one
credentials: /tmp/credentials.json
bucket: bucket-one
- Deploy GitLab using Helm
helm upgrade --install gitlab . --timeout 900s -f examples/values-minikube.yaml --set prometheus.install=false --set gitlab-runner.install=false --set=global.grafana.enabled=false --set global.image.pullPolicy=Always --set global.gitlabVersion=master --set global.hosts.domain=$(minikube ip).nip.io --set global.hosts.externalIP=$(minikube ip)
- Find the web service pod with
kubectl get pods
- Shell into the pod with
kubectl exec -ti gitlab-webservice-default-<ID> -- bash
cd /srv/gitlab
- Check that the config was applied to config/gitlab.yml
less config/gitlab.yml
database_traffic_capture:
config:
storage:
connector:
provider: "Gcs"
project_id: "project-one"
credentials: "/tmp/credentials.json"
bucket: "bucket-one"
- Access the Rails console with
./bin/rails c
and check the applicationSettings
Settings.database_traffic_capture
=> <GitlabSettings::Options:0x0000ffff728e4d48 @options={"config"=>#<GitlabSettings::Options:0x0000ffff728e4dc0 @options={"storage"=>#<GitlabSettings::Options:0x0000ffff728e4e38 @options={"connector"=>#<GitlabSettings::Options:0x0000ffff728e5018 @options={"provider"=>"Gcs", "project_id"=>"project-one", "credentials"=>"/tmp/credentials.json", "bucket"=>"bucket-one"}>}>}>}>
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
-
Merge Request Title and Description are up to date, accurate, and descriptive. -
MR targeting the appropriate branch. -
MR has a green pipeline. -
Documentation created/updated. - Not applicable - This is an experimental/.com only feature to be documented
-
Tests added/updated, and test plan for scenarios not covered by automated tests. -
Equivalent MR/issue for omnibus-gitlab opened. - Not applicable - This is an experimental/.com only feature not intended to be shipped to self-managed instances
Reviewers checklist
-
MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab. -
Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.
Edited by Leonardo da Rosa - OOO until 2025-10-31