This commit is contained in:
parent
b15afb8c06
commit
f0b618c712
1 changed files with 13 additions and 7 deletions
6
main.go
6
main.go
|
@ -34,9 +34,11 @@ type Backend struct {
|
||||||
CookieName string
|
CookieName string
|
||||||
CookieFlags string
|
CookieFlags string
|
||||||
HealthCheck bool
|
HealthCheck bool
|
||||||
|
ServerOptions string
|
||||||
Servers []BackendServer
|
Servers []BackendServer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func getEnv(key, fallback string) string {
|
func getEnv(key, fallback string) string {
|
||||||
if val, ok := os.LookupEnv(key); ok && val != "" {
|
if val, ok := os.LookupEnv(key); ok && val != "" {
|
||||||
return val
|
return val
|
||||||
|
@ -221,6 +223,10 @@ func main() {
|
||||||
b.HealthCheck = false
|
b.HealthCheck = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if val, ok := ann["haproxy/server-options"]; ok && val != "" {
|
||||||
|
b.ServerOptions = val
|
||||||
|
}
|
||||||
|
|
||||||
servers := []BackendServer{}
|
servers := []BackendServer{}
|
||||||
serverIndex := 1
|
serverIndex := 1
|
||||||
for _, subset := range ep.Subsets {
|
for _, subset := range ep.Subsets {
|
||||||
|
|
Loading…
Add table
Reference in a new issue