Ignore updates of ingress with invalid class

This commit is contained in:
Archangel_SDY 2018-12-06 21:20:00 +08:00
parent cc2b54472a
commit 9122c08b3e
2 changed files with 115 additions and 0 deletions

View file

@ -363,6 +363,9 @@ func New(checkOCSP bool,
recorder.Eventf(curIng, corev1.EventTypeNormal, "DELETE", fmt.Sprintf("Ingress %s/%s", curIng.Namespace, curIng.Name))
} else if validCur && !reflect.DeepEqual(old, cur) {
recorder.Eventf(curIng, corev1.EventTypeNormal, "UPDATE", fmt.Sprintf("Ingress %s/%s", curIng.Namespace, curIng.Name))
} else {
klog.Infof("ignoring ingress %v based on annotation %v", curIng.Name, class.IngressKey)
return
}
store.syncIngress(curIng)