# Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. [Unit] Description=HotsTac(k)os HAProxy Service Documentation=https://github.com/openstack-k8s-operators/hotstack After=hotstack-os-infra-setup.service Requires=hotstack-os-infra-setup.service PartOf=hotstack-os.target [Service] Type=simple Restart=on-failure RestartSec=10 TimeoutStopSec=30 SuccessExitStatus=143 ExecStartPre=-/usr/bin/podman rm -f hotstack-os-haproxy ExecStart=/usr/bin/podman run \ --pull=never \ --name hotstack-os-haproxy \ --hostname haproxy \ --network hotstack-os \ --ip 172.31.0.6 \ --volume /var/lib/hotstack-os/runtime/config/haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg:ro,z \ --publish 172.31.0.129:5000:5000 \ --publish 172.31.0.129:9292:9292 \ --publish 172.31.0.129:8778:8778 \ --publish 172.31.0.129:8774:8774 \ --publish 172.31.0.129:8775:8775 \ --publish 172.31.0.129:9696:9696 \ --publish 172.31.0.129:8776:8776 \ --publish 172.31.0.129:8004:8004 \ --publish 172.31.0.129:6080:6080 \ --publish 172.31.0.129:8404:8404 \ localhost/hotstack-os-haproxy:latest # Health check: CONTAINER INTERVAL TIMEOUT RETRIES START_PERIOD COMMAND ExecStartPost=-/usr/local/bin/hotstack-healthcheck.sh hotstack-os-haproxy 10 5 3 0 nc -z 127.0.0.1 8404 ExecStop=/usr/bin/podman stop -t 30 hotstack-os-haproxy ExecStopPost=-/usr/bin/podman rm -f hotstack-os-haproxy StandardOutput=journal StandardError=journal [Install] WantedBy=hotstack-os.target