Update main.go
Some checks failed
Build Go Binary / build (push) Has been cancelled

This commit is contained in:
holzi1005 2025-08-06 12:47:50 +02:00
parent b15afb8c06
commit f0b618c712

20
main.go
View file

@ -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 {