Skip to content

Add service-level annotations for Pages

Clemens Beck requested to merge 4829-pages-service-scoped-annotations into master

What does this MR do?

Add service-level annotations for Pages

Support setting annotations for:
- the primary pages service (`service.primary.annotations`),
- the metrics pages service (`service.metrics.annotations`), and
- the custom domains service (`service.customDomains.annotations`).

The values are merged into the existing annotations, allowing
to add or override annotations on a service-level.

Changelog: added

Related issues

Closes #4829 (closed)

Test Plan

Primary + Metrics Service

Verify the annotations are merged and rendered to the correct service.

helm template . \
  --set certmanager-issuer.email=test@example.com \
  --set global.pages.enabled=true \
  --set gitlab.gitlab-pages.service.annotations.a=1 \
  --set gitlab.gitlab-pages.service.metrics.annotations.b=2 \
  -s charts/gitlab/charts/gitlab-pages/templates/service.yaml \
  -s charts/gitlab/charts/gitlab-pages/templates/service-metrics.yaml

Custom Domains Service

The custom domains service must be tested separately from the default/primary service (only one of them is rendered at a time).

helm template . \
    --set certmanager-issuer.email=test@example.com \
    --set global.pages.enabled=true \
    --set gitlab.gitlab-pages.service.annotations.a=1 \
    --set gitlab.gitlab-pages.service.customDomains.annotations.b=2  \
    --set global.pages.externalHttps={1.2.3.4} \
    -s charts/gitlab/charts/gitlab-pages/templates/service-custom-domains.yaml

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Clemens Beck

Merge request reports