[Controller] Support multiple instances of Webservice and Sidekiq

Summary

Supports the generator pattern by ensuring all objects of a specific kind for a given component are reconciled (rather than only a single object of a specific kind).

Notes

  • Gitaly will not be included here because multiple instances of it are only created when Praefect is enabled, which will be covered in #136 (closed)
  • Multiple Webservice instances are not currently working on OpenShift because the Ingresses report "All hosts are taken by other resources" when using the NGINX Ingress Operator (see #160 (closed)). We saw similar problems when using CertManager in !134 (merged), and we worked around this by setting acme.cert-manager.io/http01-edit-in-place so only one Ingress was created with multiple paths. That being said, multiple Webservice instances is working on using the in-built NGINX Ingress (which is used in Kuberentes)

Test instructions

apiVersion: apps.gitlab.com/v1beta1
kind: GitLab
metadata:
  name: gitlab
spec:
  chart:
    version: "4.11.3"
    values:
      certmanager-issuer:
        email: youremail@example.com
      global:
        ingress:
          configureCertmanager: true
          class: nginx
        hosts:
          domain: yourdomain.com
      gitlab:
        # Test multiple Webservices
        webservice:
          deployments:
            # answers all external traffic not answers by others
            default:
              ingress:
                path: /
              resources:
                requests:
                  cpu: 500m
                  memory: 2G
              workerProcesses: 2
            # api answers all external requests for to /api/*
            api:
              ingress:
                path: /api
              hpa:
                minReplicas: 1
                maxReplixas: 5
              workerProcesses: 1
              resources:
                requests:
                  cpu: 300m
                  memory: 1.25G
        # Test multiple Sidekiqs
        sidekiq:
          pods:
            - name: mailers
              queues: mailers
            - name: catchall
              negateQueues: mailers

Confirm that:

  • Multiple deployments and ingresses exist for Sidekiq and Webservice
  • General functionality is working (creating a project, etc)

Closes #128 (closed)

Edited by Jason Plum

Merge request reports

Loading