Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Kong/kubernetes-ingress-controller
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ed1ed660c1c5cb1a2bf459852720e8e5006477ab
Choose a base ref
..
head repository: Kong/kubernetes-ingress-controller
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 033b1e0ac29b30475c20627dd1f3d13e9063c590
Choose a head ref
Showing with 8 additions and 6 deletions.
  1. +8 −6 internal/controllers/knative/knative.go
14 changes: 8 additions & 6 deletions internal/controllers/knative/knative.go
Original file line number Diff line number Diff line change
@@ -146,12 +146,14 @@ func (r *Knativev1alpha1IngressReconciler) Reconcile(ctx context.Context, req ct
}

class := new(netv1.IngressClass)
if err := r.Get(ctx, types.NamespacedName{Name: r.IngressClassName}, class); err != nil {
// we log this without taking action to support legacy configurations that only set ingressClassName or
// used the class annotation and did not create a corresponding IngressClass. We only need this to determine
// if the IngressClass is default or to configure default settings, and can assume no/no additional defaults
// if none exists.
log.V(util.DebugLevel).Info("could not retrieve IngressClass", "ingressclass", r.IngressClassName)
if !r.DisableIngressClassLookups {
if err := r.Get(ctx, types.NamespacedName{Name: r.IngressClassName}, class); err != nil {
// we log this without taking action to support legacy configurations that only set ingressClassName or
// used the class annotation and did not create a corresponding IngressClass. We only need this to determine
// if the IngressClass is default or to configure default settings, and can assume no/no additional defaults
// if none exists.
log.V(util.DebugLevel).Info("could not retrieve IngressClass", "ingressclass", r.IngressClassName)
}
}
// if the object is not configured with our ingress.class, then we need to ensure it's removed from the cache
if !ctrlutils.MatchesIngressClass(obj, r.IngressClassName, ctrlutils.IsDefaultIngressClass(class)) {