bplein / post-talos-setup

0 stars 0 forks source link

Setup notes: reverse proxy #2

Open magsol opened 4 months ago

magsol commented 4 months ago

This is the trickiest one since I use traefik where you use nginx. I also use the traefik helm chart but my overrides are very different. Overrides summarized:

Currently the only actual ingress I have defined is in the Mastodon helm chart.

bplein commented 3 months ago

If you include an anonymized version here, I can post it as an alternate example for traefik.

magsol commented 3 months ago

Here's the anonymized version:

image:
  name: traefik

ingressClass:
  enabled: true
  isDefaultClass: true

env:
  - name: CF_API_EMAIL
    valueFrom:
      secretKeyRef:
        name: cloudflare-api-credentials
        key: email
  - name: CF_API_KEY
    valueFrom:
      secretKeyRef:
        name: cloudflare-api-credentials
        key: api-key
  - name: CF_DNS_API_TOKEN
    valueFrom:
      secretKeyRef:
        name: cloudflare-api-credentials
        key: api-token

ports:
  websecure:
    tls:
      enabled: true
      certResolver: "leresolver"
      domains:
      - main: "mydomain.com"
        sans:
          - "mastodon.mydomain.com"
          - "*.mydomain.com"

service:
  enabled: true
  type: LoadBalancer
  spec:
    externalTrafficPolicy: Cluster
    loadBalancerIP: "192.168.1.100" # the first IP in my metallb floating range

persistence:
  enabled: true
  name: traefik-data
  accessMode: ReadWriteOnce
  size: 256Mi
  storageClass: "nfs-client"
  path: /traefikdata

certResolvers:
  leresolver:
    # for challenge options cf. https://doc.traefik.io/traefik/https/acme/
    email: my_email@email.com
    dnsChallenge:
      provider: cloudflare
      delayBeforeCheck: 30
      resolvers:
        - 1.1.1.1
        - 8.8.8.8
magsol commented 2 months ago

Hey @bplein, wanted to see if you've had a chance to look over things yet. I kinda figure the reverse proxy is where the magic needs to happen, since the other two are more or less identical to your setup. Let me know, thanks!