apiVersion: apps/v1
kind: Deployment
metadata:
  name: traefik-ingress
  labels:
    app: traefik
    usage: ingress-controller
spec:
  replicas: 2
  selector:
    matchLabels:
      app: traefik
      usage: ingress-controller
  template:
    metadata:
      labels:
        app: traefik
        usage: ingress-controller
    spec:
      serviceAccountName: traefik-ingress-controller
      terminationGracePeriodSeconds: 60
      containers:
      - image: traefik:1.5
        name: ingress-controller
        readinessProbe:
          tcpSocket:
            port: 80
          failureThreshold: 1
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 2
        livenessProbe:
          tcpSocket:
            port: 80
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 2
        volumeMounts:
        - mountPath: /config
          name: config
        ports:
        - containerPort: 80
        - containerPort: 443
        - containerPort: 8080
        args:
        - --configfile=/config/traefik.toml
      volumes:
      - name: config
        configMap:
          name: traefik-ingress
