kind: Deployment
apiVersion: apps/v1
metadata:
  name: traefik-web
  namespace: traefik
  labels:
    app.kubernetes.io/name: traefik-web
    app.kubernetes.io/part-of: traefik-web
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: traefik-web
      app.kubernetes.io/part-of: traefik-web
  template:
    metadata:
      labels:
        app.kubernetes.io/name: traefik-web
        app.kubernetes.io/part-of: traefik-web
    spec:
      serviceAccountName: traefik-serviceaccount
      hostNetwork: true
      nodeSelector:
        cloud.google.com/gke-nodepool: ingress-pool
      tolerations:
        - effect: NoExecute
          key: ingress-pool
          operator: Equal
          value: "true"
      containers:
        - name: traefik
          image: "traefik:v2.1.9"
          args:
            - --entrypoints.web.address=:80
            - --entrypoints.websecure.address=:443
            - --entrypoints.ping.address=:10254
            - --ping.entrypoint=ping
            - --log.level=ERROR
            - --providers.kubernetescrd
          ports:
            - name: web
              containerPort: 80
            - name: websecure
              containerPort: 443
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /ping
              port: 10254
              scheme: HTTP
            initialDelaySeconds: 10
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /ping
              port: 10254
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
