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