haproxy.docker.service.j2 831 B

1234567891011121314151617
  1. [Unit]
  2. After={{ openshift_docker_service_name }}.service
  3. Requires={{ openshift_docker_service_name }}.service
  4. PartOf={{ openshift_docker_service_name }}.service
  5. [Service]
  6. ExecStartPre=-/usr/bin/docker rm -f openshift_loadbalancer
  7. ExecStart=/usr/bin/docker run --rm --name openshift_loadbalancer -p {{ openshift_master_api_port | default(8443) }}:{{ openshift_master_api_port | default(8443) }} -v /etc/haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg:ro --entrypoint=haproxy {{ openshift.common.router_image }}:{{ openshift_image_tag }} -f /etc/haproxy/haproxy.cfg
  8. ExecStartPost=/usr/bin/sleep 10
  9. ExecStop=/usr/bin/docker stop openshift_loadbalancer
  10. LimitNOFILE={{ openshift_loadbalancer_limit_nofile | default(100000) }}
  11. LimitCORE=infinity
  12. Restart=always
  13. RestartSec=5s
  14. [Install]
  15. WantedBy={{ openshift_docker_service_name }}.service