apiVersion: apps/v1
kind: Deployment
metadata:
  name: skipper-ingress
  namespace: kube-system
  labels:
    application: skipper-ingress
    version: v0.11.40
    component: ingress
spec:
  strategy:
    rollingUpdate:
      maxSurge: 0
  selector:
    matchLabels:
      application: skipper-ingress
  template:
    metadata:
      labels:
        application: skipper-ingress
        version: v0.11.40
        component: ingress
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                - key: application
                  operator: In
                  values:
                  - skipper-ingress
              topologyKey: kubernetes.io/hostname
      priorityClassName: system-cluster-critical
      serviceAccountName: skipper-ingress
      nodeSelector:
        kubernetes.io/role: worker
      dnsPolicy: ClusterFirstWithHostNet
      hostNetwork: true
      containers:
      - name: skipper-ingress
        image: registry.opensource.zalan.do/teapot/skipper:v0.12.0
        ports:
        - name: ingress-port
          containerPort: 9999
          hostPort: 9999
        args:
          - "skipper"
          - "-kubernetes"
          - "-kubernetes-in-cluster"
          - "-kubernetes-path-mode=path-prefix"
          - "-address=:9999"
          - "-wait-first-route-load"
          - "-proxy-preserve-host"
          - "-serve-host-metrics"
          - "-disable-metrics-compat"
          - "-enable-profile"
          - "-enable-ratelimits"
          - "-experimental-upgrade"
          - "-metrics-exp-decay-sample"
          - "-reverse-source-predicate"
          - "-lb-healthcheck-interval=3s"
          - "-metrics-flavour=prometheus"
          - "-enable-connection-metrics"
          - "-max-audit-body=0"
          - "-histogram-metric-buckets=.0001,.00025,.0005,.00075,.001,.0025,.005,.0075,.01,.025,.05,.075,.1,.2,.3,.4,.5,.75,1,2,3,4,5,7,10,15,20,30,60,120,300,600"
          - "-expect-continue-timeout-backend=30s"
          - "-keepalive-backend=30s"
          - "-max-idle-connection-backend=0"
          - "-response-header-timeout-backend=1m"
          - "-timeout-backend=1m"
          - "-tls-timeout-backend=1m"
          - "-close-idle-conns-period=20s"
          - "-idle-timeout-server=62s"
          - "-read-timeout-server=5m"
          - "-write-timeout-server=60s"
          - '-default-filters-prepend=enableAccessLog(4,5) -> lifo(2000,20000,"3s")'
        resources:
          limits:
            cpu: "4"
            memory: "1Gi"
          requests:
            cpu: "4"
            memory: "1Gi"
        readinessProbe:
          httpGet:
            path: /kube-system/healthz
            port: 9999
          initialDelaySeconds: 60
          timeoutSeconds: 5
        securityContext:
          readOnlyRootFilesystem: true
          runAsNonRoot: true
          runAsUser: 1000
