Skip to content

Add configuration to Gitaly Service

Emily Chui requested to merge echui-add-gitaly-service-config into master

What does this MR do?

This MR makes Gitaly's Service more configurable in terms of the clusterIP settings. It also adds support for loadbalancerIP. Testing with Gitaly's values.yaml:

service:
  tls: {}
  type: LoadBalancer
  clusterIP: None
  annotations: {}

command used from root repo:

helm template . --debug --values=values.yaml --values=charts/gitlab/charts/gitaly/values.yaml --show-only charts/gitlab/charts/gitaly/templates/service.yaml --set certmanager-issuer.email=em@example.com

Final render:

---
# Source: gitlab/charts/gitlab/charts/gitaly/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-gitaly
  namespace: gitlab
  labels:
    app: gitaly
    chart: gitaly-8.3.1
    release: release-name
    heritage: Helm
    
    
spec:
  type: LoadBalancer
  ports:
    - port: 8075
      # This port is NOT prefixed with `grpc` due to
      # https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3822
      name: tcp-gitaly
      targetPort: grpc-gitaly
    - port: 9236
      name: http-metrics
      targetPort: http-metrics
  selector:
    app: gitaly
    release: release-name

Related issues

Relates to gitlab-com/gl-infra/k8s-workloads/gitlab-com!3841 (merged)

This will enable staging deployment of Gitaly to use the service type of "LoadBalancer". Currently it will render an invalid Service.yaml as LoadBalancer types cannot have ClusterIP: "none".

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