Update database traffic capture config

What does this MR do?

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

  1. Clone this repository
git clone git@gitlab.com:gitlab-org/charts/gitlab.git charts-gitlab

cd charts-gitlab
  1. git checkout --track 573594-update-db-sql-capture-charts

  2. Run

helm dependency update
  1. Edit example/values-minikube.yaml and include the config under global:
global:
  ...
  appConfig:
    databaseTrafficCapture:
      config:
        storage:
          connector:
            provider: Gcs
            projectId: project-one
            bucket: bucket-one
  1. 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)
  1. Find the web service pod with kubectl get pods
  2. Shell into the pod with kubectl exec -ti gitlab-webservice-default-<ID> -- bash
  3. cd /srv/gitlab
  4. 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"
  1. Access the Rails console with ./bin/rails c and check the application Settings
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

Related gitlab-org/gitlab!202140 (merged)

Edited by Leonardo da Rosa

Merge request reports

Loading