Naar de inhoud
imlostincode
ENNL
Deployment kit

astro-k8s-deployment-kit

Shared deploy setup for Astro sites. Fix it once, and every site picks it up on its next update.

examples / 1.0
yaml
# Per-branch deploys rewrite the staging host into {slug}.staging.example.com.
# Keep the host exactly as it appears in the workflow's `staging-domains` input
# so that rewrite matches.
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: app-http
  labels:
    app.kubernetes.io/component: ingress
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`staging.example.com`) && PathPrefix(`/.well-known/acme-challenge`)
      kind: Rule
      priority: 100
      services:
        - name: app
          port: 80
    - match: Host(`staging.example.com`)
      kind: Rule
      priority: 10
      services:
        - name: app
          port: 80
      middlewares:
        - name: redirect-to-https
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: app-https
  labels:
    app.kubernetes.io/component: ingress
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`staging.example.com`)
      kind: Rule
      services:
        - name: app
          port: 80
      middlewares:
        - name: staging-basic-auth
        - name: staging-noindex
  tls:
    secretName: app-staging-tls