plugin/kubernetes: skip deleting pods (#2853)
Don't add pods to our internal cache that are being deleted. This saves a field in the struct as well. Add (extra) comments about adding fields to the object/{Pod,Service,Endpoint} structs. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
adc021d6ff
commit
3b3fb6f583
4 changed files with 6 additions and 9 deletions
|
@ -372,11 +372,6 @@ func (k *Kubernetes) findPods(r recordRequest, zone string) (pods []msg.Service,
|
|||
continue
|
||||
}
|
||||
|
||||
// exclude pods in the process of termination
|
||||
if p.Deleting {
|
||||
continue
|
||||
}
|
||||
|
||||
// check for matching ip and namespace
|
||||
if ip == p.PodIP && match(namespace, p.Namespace) {
|
||||
s := msg.Service{Key: strings.Join([]string{zonePath, Pod, namespace, podname}, "/"), Host: ip, TTL: k.ttl}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue