kind: Deployment
apiVersion: apps/v1
metadata:
  name: traefik-ingress-controller
  namespace: traefik
  labels:
    app: traefik-ingress
spec:
  replicas: 1
  selector:
    matchLabels:
      app: traefik-ingress
  template:
    metadata:
      labels:
        app: traefik-ingress
    spec:
      serviceAccountName: traefik-ingress-controller
      terminationGracePeriodSeconds: 60
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 100
            podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: traefik-ingress
              topologyKey: "kubernetes.io/hostname"
      nodeSelector: {}
      tolerations: []
      containers:
      - image: traefik:v1.7.9
        name: traefik-ingress-lb
        ports:
        - containerPort: 80
        - containerPort: 443
        - containerPort: 8080
        args:
        - --configfile=/config/traefik.toml
        - --logLevel=info
        volumeMounts:
        - name: config-volume
          mountPath: /config
        readinessProbe:
          tcpSocket:
            port: 80
          initialDelaySeconds: 10
          periodSeconds: 10
          timeoutSeconds: 2
        livenessProbe:
          tcpSocket:
            port: 80
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 10
          timeoutSeconds: 2
        resources:
          limits:
            cpu: 100m
            memory: 256Mi
          requests:
            cpu: 100m
            memory: 256Mi
      volumes:
        - name: config-volume
          configMap:
            name: traefik-config

