kind: Deployment
apiVersion: apps/v1
metadata:
  namespace: traefik
  name: traefik
  labels:
    app: traefik
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 2
      maxUnavailable: 1
  selector:
    matchLabels:
      app: traefik
  template:
    metadata:
      labels:
        app: traefik
    spec:
      serviceAccountName: traefik-ingress-controller
      containers:
        - name: traefik
          image: traefik:v2.1.1
          imagePullPolicy: Always
          volumeMounts:
            - name: config-volume
              mountPath: /etc/traefik
          resources:
            requests:
              memory: "25Mi"
              cpu: "30m"
            limits:
              memory: "45Mi"
              cpu: "42m"
              ephemeral-storage: "128Mi"
          ports:
            - name: http
              containerPort: 8000
            - name: https
              containerPort: 4443
            - name: admin
              containerPort: 8080
          readinessProbe:
            httpGet:
              path: /ping
              port: admin
            initialDelaySeconds: 5
            periodSeconds: 3
          livenessProbe:
            httpGet:
              path: /ping
              port: admin
            initialDelaySeconds: 40
            failureThreshold: 2
            periodSeconds: 3
      volumes:
        - name: config-volume
          configMap:
            name: traefik-config