This commit is contained in:
emerson_gong 2023-08-31 00:04:46 -07:00 committed by GitHub
commit 39329df71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -470,10 +470,9 @@ func New(
var errOld, errCur error
var classCur string
if !icConfig.IgnoreIngressClass {
_, errOld = store.GetIngressClass(oldIng, icConfig)
classCur, errCur = store.GetIngressClass(curIng, icConfig)
}
_, errOld = store.GetIngressClass(oldIng, icConfig)
classCur, errCur = store.GetIngressClass(curIng, icConfig)
if errOld != nil && errCur == nil {
if hasCatchAllIngressRule(curIng.Spec) && disableCatchAll {
klog.InfoS("ignoring update for catch-all ingress because of --disable-catch-all", "ingress", klog.KObj(curIng))
@ -494,6 +493,9 @@ func New(
}
recorder.Eventf(curIng, corev1.EventTypeNormal, "Sync", "Scheduled for sync")
} else if errOld != nil && errCur != nil {
klog.InfoS("Ingress doesn't match the ingress class. Skipping update", "ingress", klog.KObj(curIng))
return
} else {
klog.V(3).InfoS("No changes on ingress. Skipping update", "ingress", klog.KObj(curIng))
return