apiVersion: apps/v1
kind: Deployment
metadata:
  name: traefik-ingress-controller
  namespace: kube-system
  labels:
    app: traefik-ingress-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: traefik-ingress-controller
  template:
    metadata:
      labels:
        app: traefik-ingress-controller
    spec:
      nodeSelector:
        ingress-controller: "true"
      serviceAccountName: traefik-ingress-controller
      containers:
      - image: luxas/traefik:v1.5.4
        name: traefik-ingress-controller
        resources:
          limits:
            cpu: 200m
            memory: 30Mi
          requests:
            cpu: 100m
            memory: 20Mi
        ports:
        - name: http
          containerPort: 80
          hostPort: 80
        - name: https
          containerPort: 443
          hostPort: 443
        args:
        - --configfile=/etc/traefik/traefik-acme.toml
        volumeMounts:
        - name: traefik-cfg
          mountPath: /etc/traefik/
      volumes:
      - name: traefik-cfg
        configMap:
          name: traefik-cfg
