Skip to content

Commit a3f3d23

Browse files
committed
fix lint nd remove namespace deletion detection
1 parent d1ed9f7 commit a3f3d23

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pkg/ingress/controller.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func (c *Controller) Init(ctx context.Context) error {
205205
},
206206
}
207207
if config.DefaultConfig.IngressDefault {
208-
ingressClass.ObjectMeta.Annotations = map[string]string{
208+
ingressClass.Annotations = map[string]string{
209209
networkingv1.AnnotationIsDefaultIngressClass: "true",
210210
}
211211
}
@@ -274,12 +274,6 @@ func (c *Controller) syncHandler(ctx context.Context, key string) error {
274274
ingress, err := c.ingressLister.Ingresses(namespace).Get(name)
275275
if err != nil {
276276
if errors.IsNotFound(err) {
277-
// Ingress is deleted.
278-
_, err := c.clientset.CoreV1().Namespaces().Get(ctx, namespace, metav1.GetOptions{})
279-
if errors.IsNotFound(err) {
280-
klog.V(4).Infof("Namespace %s not found, skipping Gateway reconciliation for deleted Ingress %s/%s", namespace, namespace, name)
281-
return nil // Namespace is gone, nothing to do.
282-
}
283277
// Kubernetes Garbage Collection will delete child HTTPRoutes due to OwnerReference.
284278
// We only need to reconcile the Gateway in case this Ingress
285279
// was the last one providing a particular TLS secret.

0 commit comments

Comments
 (0)