Do not configure container registry notifications on secondary sites

Summary

At the moment, it seems that we are adding registry notifications configuration to secondary nodes:

https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/templates/_registry.tpl?ref_type=heads#L57-76

One of the if clauses there is .Values.global.geo.registry.replication.enabled, which is true on Secondaries and not on Primaries. As a result, the whole block is added to the Secondary site deployment.

Steps to reproduce

Deploy a default Helm Chart to both Primary and Secondary site and observe the resulting deployment.

You should find that geo_event endpoint is configured on Secondary site and that Primary site has no endpoint at all. That is contrary to our docs, which claim that Registry Notifications should be configured on Primary site and not on Secondary site:

  1. https://docs.gitlab.com/administration/geo/replication/container_registry/#configure-primary-site
  2. https://docs.gitlab.com/administration/geo/replication/container_registry/#configure-secondary-site

Configuration used

default Helm, Geo enabled deployment

Current behavior

Registry Notifications are configured on Secondary site and not on Primary site.

Expected behavior

Registry Notifications are configured on Primary site and not on Secondary site.

Edited by Muhamed Huseinbašić