aboutsummaryrefslogtreecommitdiff
path: root/plugin/k8s_external/msg_to_dns.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/k8s_external/msg_to_dns.go')
-rw-r--r--plugin/k8s_external/msg_to_dns.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugin/k8s_external/msg_to_dns.go b/plugin/k8s_external/msg_to_dns.go
index 14a198063..e61adf657 100644
--- a/plugin/k8s_external/msg_to_dns.go
+++ b/plugin/k8s_external/msg_to_dns.go
@@ -103,6 +103,10 @@ func (e *External) srv(services []msg.Service, state request.Request) (records,
w1 *= float64(s.Weight)
}
weight := uint16(math.Floor(w1))
+ // weight should be at least 1
+ if weight == 0 {
+ weight = 1
+ }
what, ip := s.HostType()