Update README_GO.md
All checks were successful
Build Go Binary / build (push) Successful in 34s

This commit is contained in:
holzi1005 2025-08-08 19:02:06 +02:00
parent 1ba52cb8fd
commit f889527cc7

View file

@ -48,8 +48,8 @@ Environment=KUBERNETES_HOST=https://10.0.20.7:6443
Environment=KUBERNETES_TOKEN=eyJhbGciOi...
Environment=KUBERNETES_VERIFYSSL=false
Environment=HAPROXY_TEMPLATE=/etc/haproxy/haproxy.tmpl
ExecStart=/path/to/haproxy-generator > /etc/haproxy/haproxy.cfg
ExecStartPost=/bin/systemctl restart haproxy
ExecStart=/path/to/haproxy-generator > /etc/haproxy/haproxy.cfg.new
ExecStartPost=/bin/bash /etc/haproxy/haproxy-generator-post.sh
```
@ -69,6 +69,23 @@ WantedBy=timers.target
```
# Reload Script for post start
Copy the script to /etc/haproxy/haproxy-generator-post.sh
```
#!/bin/bash
DIFF=$(diff /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.new)
/sbin/haproxy -f /etc/haproxy/haproxy.cfg.new -c
VALID=$?
if [ "$DIFF" != "" ] && [ $VALID -eq 0 ]
then
mv /etc/haproxy/haproxy.cfg.new /etc/haproxy/haproxy.cfg
/usr/sbin/service haproxy restart
fi
```
# Service Annotations
| Annotation-Key | Beschreibung | Typ | Beispielwert |