Skip to content

Fix annotation service misconfiguration

Dmitry Gruzd requested to merge fix-annotation-misconfiguration into main

What does this MR do and why?

This MR is the result of the investigative work in gitlab-org/gitlab#430796 (comment 1643216508)

We've discovered that via service.annotations the Zoekt domain name points to both: stateful set and external nginx deployment.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Checkout main
  2. Update your values file to include
    service:
      annotations:
        external-dns.alpha.kubernetes.io/hostname: zoekt.example.com
    serviceBackend:
      annotations:
        some_other_annotation: alpha
  3. helm install gitlab-zoekt .
  4. Verify that both services gitlab-zoekt and gitlab-zoekt-gateway have external-dns.alpha.kubernetes.io/hostname
    $ k describe svc gitlab-zoekt-gateway | fgrep -C1 alpha
    Annotations:    cloud.google.com/neg: {"ingress":true}
                    external-dns.alpha.kubernetes.io/hostname: zoekt.example.com
                    meta.helm.sh/release-name: gitlab-zoekt
    $ k describe svc gitlab-zoekt | fgrep -C1 alpha
    Annotations:    cloud.google.com/neg: {"ingress":true}
                    external-dns.alpha.kubernetes.io/hostname: zoekt.example.com
                    meta.helm.sh/release-name: gitlab-zoekt
  5. git checkout fix-annotation-misconfiguration
  6. helm upgrade gitlab-zoekt .
  7. Verify that annotations are now correct
    $ k describe svc gitlab-zoekt-gateway | fgrep -C1 alpha
    Annotations:    cloud.google.com/neg: {"ingress":true}
                    external-dns.alpha.kubernetes.io/hostname: zoekt.example.com
                    meta.helm.sh/release-name: gitlab-zoekt
    $ k describe svc gitlab-zoekt | fgrep -C1 alpha
    Annotations:    cloud.google.com/neg: {"ingress":true}
                    foo: alpha
                    meta.helm.sh/release-name: gitlab-zoekt
Edited by Dmitry Gruzd

Merge request reports