Update main.go
Some checks failed
Build Go Binary / build (push) Failing after 28s

This commit is contained in:
holzi1005 2025-08-06 08:48:25 +02:00
parent d7c836ee86
commit 2441f259cf

View file

@ -181,6 +181,11 @@ func main() {
if svc.Spec.Type != "ClusterIP" {
continue
}
if val, ok := svc.Metadata.Annotations["haproxy/enabled"]; !ok || val != "true" {
continue
}
key := svc.Metadata.Namespace + "/" + svc.Metadata.Name
ep, found := endpointMap[key]
if !found || len(ep.Subsets) == 0 {