| * GitLab Pages |
| |
| Status: *not enabled yet.* =gitlab.yaml= has no =pages= settings. This |
| section records what is needed and the chosen way around the missing |
| DNS-01 support at Regfish. |
| |
| ** Requirements |
| - Chart values (=global.pages=, =global.hosts.pages=, |
| =gitlab.gitlab-pages=) in the GitLab CR, =gitlab.yaml=. |
| - A =gitlab-pages= bucket in Garage. The existing |
| =gitlab-object-storage= connection is reused. |
| - A wildcard A/AAAA record =*.<pages-domain>= pointing at ifirn. |
| - A wildcard TLS certificate for =*.<pages-domain>=. Wildcards require |
| DNS-01, because HTTP-01 (as used with Traefik) cannot issue them. |
| - A runner (=gitlab-runner/=) and a =pages= job publishing =public/= |
| in each project. |
| |
| Prefer a Pages domain that is /not/ a subdomain of |
| =gitlab.benkard.de= (cookie isolation), e.g. =pages.benkard.de=. |
| |
| ** The Regfish problem |
| Regfish cannot be used for DNS-01 (no usable API for cert-manager). |
| DNS-01 does not need the registrar's API, though, only that the |
| =_acme-challenge= name resolves into a zone we can update |
| automatically. |
| |
| *** Option 1 (recommended): CNAME delegation of the challenge |
| - At Regfish, add once: |
| #+BEGIN_SRC text |
| _acme-challenge.pages.benkard.de. CNAME <name>.<challenge-zone>. |
| #+END_SRC |
| - Host =<challenge-zone>= at a provider with an API and a cert-manager |
| solver or webhook (Cloudflare free tier, deSEC, Route53), or run |
| [[https://github.com/joohoi/acme-dns][acme-dns]] ourselves (needs |
| port 53 reachable and an NS delegation). |
| - The DNS-01 solver in the =ClusterIssuer= must set |
| =cnameStrategy: Follow=. |
| - Only the challenge zone moves. Everything else stays at Regfish, |
| including the =*.pages= A/AAAA record. |
| |
| *** Option 2: NS delegation of the whole Pages domain |
| Delegate =pages.benkard.de= via NS records to a nameserver we control |
| or a free DNS provider. The wildcard record and the challenge both |
| live there. Cleaner separation, but more to run. |
| |
| *** Option 3: per-site certificates |
| Only works for custom domains (GitLab requests one Let's Encrypt |
| certificate per domain). The default =*.pages= domain still needs a |
| wildcard certificate or plain HTTP. |
| |
| *** Option 4: plain HTTP or a self-signed wildcard |
| Only for private use. Browsers warn, or traffic is unencrypted. |
| |
| ** Plan (option 1) |
| 1. Add the CNAME at Regfish. |
| 2. Create the challenge zone and an API token at the chosen provider, |
| and store the token as a Secret in the cert-manager namespace. |
| 3. Add a DNS-01 =ClusterIssuer= (=cnameStrategy: Follow=). |
| 4. Add a =Certificate= for =*.pages.benkard.de= writing the secret |
| =gitlab-pages-tls=. |
| 5. Create the =gitlab-pages= bucket in Garage. |
| 6. Add to the CR in =gitlab.yaml=: |
| #+BEGIN_SRC yaml |
| global: |
| pages: |
| enabled: true |
| objectStore: |
| enabled: true |
| bucket: gitlab-pages |
| accessControl: false |
| artifactsServer: true |
| hosts: |
| pages: |
| name: pages.benkard.de |
| gitlab: |
| gitlab-pages: |
| ingress: |
| tls: |
| secretName: gitlab-pages-tls |
| #+END_SRC |
| 7. Add the =*.pages= wildcard A/AAAA record at Regfish. |
| 8. Check that the global per-IP Traefik =rateLimit= does not throttle |
| Pages sites with many assets. |
| |
| ** Open decisions |
| - Pages domain (=pages.benkard.de= assumed). |
| - Challenge-zone provider (Cloudflare, deSEC or self-hosted acme-dns). |
| - Custom domains: not planned. They would need port 80/443 reachable |
| by the Pages service directly, which is awkward behind Traefik. |