# infrastructure/traefik/deployment.yaml
apiVersion: v1
items:
- apiVersion: apps/v1
  kind: Deployment
  metadata:
    annotations:
      deployment.kubernetes.io/revision: "4"
    name: traefik
    namespace: traefik
  spec:
    progressDeadlineSeconds: 600
    replicas: 2
    revisionHistoryLimit: 10
    selector:
      matchLabels:
        app: traefik
    strategy:
      rollingUpdate:
        maxSurge: 25%
        maxUnavailable: 25%
      type: RollingUpdate
    template:
      metadata:
        annotations:
          descheduler.alpha.kubernetes.io/evict: "false"
          kubectl.kubernetes.io/restartedAt: "2025-02-12T05:57:48-06:00"
        creationTimestamp: null
        labels:
          app: traefik
          app.kubernetes.io/instance: traefik-kube-system
          app.kubernetes.io/name: traefik
      spec:
        containers:
        - args:
          - --providers.kubernetesIngress=true
          - --providers.kubernetescrd=true 
          - --entrypoints.web.address=:80
          - --entrypoints.websecure.address=:443
          - --api.dashboard=true
          - --metrics.prometheus=true
          - --metrics.prometheus.addEntryPointsLabels=true
          - --metrics.prometheus.addRoutersLabels=true
          - --metrics.prometheus.addServicesLabels=true
          - --entrypoints.web.transport.respondingTimeouts.readTimeout=0s
          - --entrypoints.web.transport.respondingTimeouts.writeTimeout=0s
          - --entrypoints.web.transport.respondingTimeouts.idleTimeout=0s
          - --entrypoints.websecure.transport.respondingTimeouts.readTimeout=0s
          - --entrypoints.websecure.transport.respondingTimeouts.writeTimeout=0s
          - --entrypoints.websecure.transport.respondingTimeouts.idleTimeout=0s
          - --entrypoints.metrics.address=:9100
          - --metrics.prometheus.entryPoint=metrics
          image: traefik:v3.3.3
          imagePullPolicy: IfNotPresent
          name: traefik
          ports:
          - containerPort: 80
            name: web
            protocol: TCP
          - containerPort: 443
            name: websecure
            protocol: TCP
          - containerPort: 8080
            name: admin
            protocol: TCP
          - containerPort: 9100
            name: metrics
            protocol: TCP
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
        dnsPolicy: ClusterFirst
        nodeSelector:
          node-role.kubernetes.io/worker: "true"
        affinity:
          nodeAffinity:
            preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              preference:
                matchExpressions:
                - key: atlas.bstein.dev/spillover
                  operator: DoesNotExist
            - weight: 95
              preference:
                matchExpressions:
                - key: kubernetes.io/hostname
                  operator: NotIn
                  values:
                  - titan-13
                  - titan-15
                  - titan-17
                  - titan-19
            - weight: 90
              preference:
                matchExpressions:
                - key: hardware
                  operator: In
                  values:
                  - rpi5
            - weight: 50
              preference:
                matchExpressions:
                - key: hardware
                  operator: In
                  values:
                  - rpi4
        restartPolicy: Always
        schedulerName: default-scheduler
        serviceAccount: atlas-traefik-ingress-controller
        serviceAccountName: atlas-traefik-ingress-controller
        terminationGracePeriodSeconds: 30
kind: List
metadata: {}
