Update database traffic capture config
What does this MR do?
- Updates database traffic capture config. As per the docs, we can use GOOGLE_APPLICATION_CREDENTIALS from env.
- Remove the default values from
values.yamlrelated todatabaseTrafficCapture. - Already updated in Rails App: gitlab-org/gitlab!212610 (merged)
Related issues
Add config to pods and test bucket config in st... (gitlab-org/gitlab#573594)
Adds database traffic capture config to charts (!4521 - merged)
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 573594-update-db-sql-capture-charts -
Run
helm dependency update
- Edit
example/values-minikube.yamland include the config under global:
global:
...
appConfig:
databaseTrafficCapture:
config:
storage:
connector:
provider: Gcs
projectId: project-one
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"
bucket: "bucket-one"
- Access the Rails console with
./bin/rails cand 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", "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