gitlab-pages: all services use the same annotations
Summary
When deploying GitLab Pages with custom annotations for the Service, these annotations are used on all the Services managed by the chart.
Specifically, charts/gitlab/charts/gitlab-pages/templates/service-metrics.yaml
uses the same set of annotations as either charts/gitlab/charts/gitlab-pages/templates/service.yaml
or charts/gitlab/charts/gitlab-pages/templates/service-custom-domains.yaml
. If the latter is used to configure ExternalDNS and/or a LoadBalancer, this can bleed through to the Metrics service and you can end up with a load balancer for the metrics port as well as DNS pointing at the wrong place.
Steps to reproduce
In an AWS EKS cluster with the AWS Load Balancer Controller, set the chart's values to include:
gitlab:
gitlab-pages:
service:
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: external
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
service.beta.kubernetes.io/aws-load-balancer-scheme: internal
Configuration used
As above.
Current behavior
The annotations apply to both the gitlab-gitlab-pages-metrics
and gitlab-gitlab-pages-custom-domains
/ gitlab-gitlab-pages
Services, and operators such as the AWS Load Balancer Controller or ExternalDNS may act on both services.
Expected behavior
It should be possible to configure annotations (and labels) separately for the different load balancers.
Versions
- Chart: 7.0.4
- Platform:
- Cloud: EKS
- Kubernetes: (
kubectl version
)- Client: v1.27.3
- Server: v1.24.13-eks-0a21954
- Helm: (
helm version
)- Client: v3.12.1
Relevant logs
n/a