Skip to content

Add Traefik as an option for ingress controller provider

Mitchell Nielsen requested to merge 3251-implement-traefik into master

What does this MR do?

Adds the Traefik Helm chart as an option for an Ingress controller, capable of replacing NGINX.

This leverages the addition of TCP support in March 2019.

The Traefik IngressRoute objects are created by translating the Ingress objects. Further information on the Kubernetes CRDs is available here.

The Traefik IngressRouteTCP object is created via a Helm template when global.ingress.provider=traefik.

Related issues

Related to https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3251

Related to #288 (closed)

Related to !2612 (merged).

Related to #3442 (closed)

To do

Testing

  1. Install the chart:

    helm upgrade --install gitlab . -n gitlab -f examples/values-traefik-ingress.yaml

  2. Test access to endpoints:

    • gitlab.yourdomain.com
    • minio.yourdomain.com
  3. Test git over SSH:

    1. Add SSH key to instance

    2. Create a project with a README

    3. Clone the project over SSH

      $ git clone git@gitlab.mnielsen.k8s-ft.win:gitlab-instance-ef2d04fb/Monitoring.git
      Cloning into 'Monitoring'...
      warning: You appear to have cloned an empty repository.
      
      $ cd Monitoring
      
      $ echo 'Hi from git over SSH via traefik!' > README.md
      
      $ git add README.md
      
      $ git commit -m 'add readme'
      [master (root-commit) a244f8b] add readme
       1 file changed, 1 insertion(+)
       create mode 100644 README.md
      
      $ git push origin master
      Enumerating objects: 3, done.
      Counting objects: 100% (3/3), done.
      Writing objects: 100% (3/3), 248 bytes | 124.00 KiB/s, done.
      Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
      To gitlab.mnielsen.k8s-ft.win:gitlab-instance-ef2d04fb/Monitoring.git
       * [new branch]      master -> master
  4. Bonus: Traefik has a handy dashboard you can access:

    1. kubectl port-forward -n gitlab "$(kubectl get pods -n gitlab| grep '^traefik-' | awk '{print $1}')" 9000:9000
    2. Navigate to http://localhost:9000/dashboard/

    image

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Jason Plum

Merge request reports