Naar de inhoud
imlostincode
ENNL
Deployment kit

symfony-k8s-deployment-kit

The same idea for Symfony apps: one shared deploy setup instead of a copy in every project.

examples / 0.1
yaml
# Per-branch deploys rewrite "staging.DOMAIN" -> "{slug}.staging.DOMAIN".
# Keep that exact "staging.DOMAIN" form here so the workflow's sed catches it.
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
  tls:
    secretName: app-staging-tls