diff --git a/main.go b/main.go index de68bb9..ade643d 100644 --- a/main.go +++ b/main.go @@ -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 {