---
apiVersion: v1
kind: Pod
metadata:
  name: haproxy
  namespace: kube-system
  labels:
    name: haproxy
  annotations:
    scheduler.alpha.kubernetes.io/critical-pod: ''
    seccomp.security.alpha.kubernetes.io/pod: docker/default
spec:
  restartPolicy: Always
  hostNetwork: true
  tolerations:
    - key: node-role.kubernetes.io/master
      operator: Exists
      effect: NoSchedule
    - key: "CriticalAddonsOnly"
      operator: "Exists"
  containers:
    - name: haproxy
      image: sles12/haproxy:__TAG__
      resources:
        requests:
          memory: 128Mi
        limits:
          memory: 128Mi
      volumeMounts:
        - name: haproxy-cfg
          mountPath: /etc/haproxy
        - name: ca-certificate
          mountPath: /etc/pki/ca.crt
          readOnly: True
        - name: kubernetes-proxy-bundle-certificate
          mountPath: /etc/pki/private/kube-apiserver-proxy-bundle.pem
          readOnly: True
        - name: etc-hosts
          mountPath: /etc/hosts
        - name: velum-bundle-certificate
          mountPath: /etc/pki/private/velum-bundle.pem
          readOnly: True
        - name: velum-unix-socket
          mountPath: /var/run/puma
        - name: velum-static-pages
          mountPath: /etc/caasp/haproxy/errors
  volumes:
    - name: haproxy-cfg
      hostPath:
        path: /etc/caasp/haproxy
    - name: ca-certificate
      hostPath:
        path: /etc/pki/ca.crt
        type: FileOrCreate
    - name: kubernetes-proxy-bundle-certificate
      hostPath:
        path: /etc/pki/private/kube-apiserver-proxy-bundle.pem
        type: FileOrCreate
    - name: etc-hosts
      hostPath:
        path: /etc/hosts
    - name: velum-bundle-certificate
      hostPath:
        path: /etc/pki/private/velum-bundle.pem
    - name: velum-unix-socket
      hostPath:
        path: /var/run/puma
    - name: velum-static-pages
      hostPath:
        path: /usr/share/velum/static-pages
