Gateway API: Support mutliple webservice deployments

What does this MR do?

Gateway API: Enable support for multiple webservice deployments

  • Each webservice deployment can now be exposed via a HTTPRoute rule.
  • Route matching can be configured using the httproutematch structure at deployment.gatewayRoute.rule.match (see Gateway API spec: https://gateway-api.sigs.k8s.io/reference/spec/#httproutematch).
  • Deployments can opt out of route creation by setting deployment.gatewayRoute.rule.enabled to false.

Closes https://gitlab.com/charts/gitlab/-/issues/6274

Changelog: added

Test Plan

  1. Install GitLab with Envoy Gateway+multiple webservice deployments

    $ cat ~/values/gitlab-chart/values-multi-dep.yaml 
    gitlab:
      webservice:
        deployments:
          default:
            gatewayRoute:
              rule:
                matches:
                - path:
                    type: PathPrefix
                    value: /
          api:
            gatewayRoute:
              rule:
                matches:
                - path:
                    type: PathPrefix
                    value: /api
    $ helm upgrade gl . -n gldep --create-namespace \
      -f examples/values-gatewayapi.yaml \
      -f ~/values/gitlab-chart/values-multi-dep.yaml \
      --set certmanager-issuer.email=<redac> \
      --set global.hosts.domain=<redac>
  2. Confirm the webservice httproute has two rules.

  3. Confirm traffic is routed to the expected Pods by curl-ing different paths and checking the webservice Pods for the correlation IDs

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.
  • Tests added/updated, and test plan for scenarios not covered by automated tests.
  • Equivalent MR/issue for omnibus-gitlab opened.

Reviewers checklist

Edited by Clemens Beck

Merge request reports

Loading