zooniverse / static

A simple nginx caching proxy for zooniverse-static.
0 stars 2 forks source link

Optimize ingresses #198

Closed zwolf closed 2 years ago

zwolf commented 3 years ago

Nearly all of the ingresses in this repo are copied from the same template. There are some optimizations that were discovered since that template was made, and should be applied to the rest of them. As a more recent example, see https://github.com/zooniverse/panoptes/pull/3523/files

  dnsNames:
    - supernovahunters.org
    - "*.supernovahunters.org"

If a wildcard subdomain isn't necessary, don't use one. Specifying all the known subdomains explicity, e.g. www.. This allows the quicker http-resolver to be used instead of the azure-dns-resolver for cert issuance.

nginx.ingress.kubernetes.io/rewrite-target: /$1

This is unnecessary as we aren't doing any path rewriting on the incoming requests, see https://github.com/zooniverse/static/pull/197#discussion_r540437311

    http:
      paths:
      - backend:
          serviceName: http-frontend
          servicePort: 80
        path: /(.*)

Remove the regex expression /(.*) for rewriting here to use path: / instead , see https://github.com/zooniverse/static/pull/197#discussion_r540438072

zwolf commented 2 years ago

All ingresses have been updated to the new schema without rewrite-target.