This commit is contained in:
parent
1ba52cb8fd
commit
f889527cc7
1 changed files with 19 additions and 2 deletions
21
README_GO.md
21
README_GO.md
|
@ -48,8 +48,8 @@ Environment=KUBERNETES_HOST=https://10.0.20.7:6443
|
||||||
Environment=KUBERNETES_TOKEN=eyJhbGciOi...
|
Environment=KUBERNETES_TOKEN=eyJhbGciOi...
|
||||||
Environment=KUBERNETES_VERIFYSSL=false
|
Environment=KUBERNETES_VERIFYSSL=false
|
||||||
Environment=HAPROXY_TEMPLATE=/etc/haproxy/haproxy.tmpl
|
Environment=HAPROXY_TEMPLATE=/etc/haproxy/haproxy.tmpl
|
||||||
ExecStart=/path/to/haproxy-generator > /etc/haproxy/haproxy.cfg
|
ExecStart=/path/to/haproxy-generator > /etc/haproxy/haproxy.cfg.new
|
||||||
ExecStartPost=/bin/systemctl restart haproxy
|
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
|
# Service Annotations
|
||||||
|
|
||||||
| Annotation-Key | Beschreibung | Typ | Beispielwert |
|
| Annotation-Key | Beschreibung | Typ | Beispielwert |
|
||||||
|
|
Loading…
Add table
Reference in a new issue