Skip to content

Conversation

@M00nF1sh
Copy link
Member

@M00nF1sh M00nF1sh commented Nov 19, 2020

Ignore incorrectly configured Ingresses when building IngressGroup member list.

  1. if an Ingress's is incorrectly configured, it will be excluded from IngressGroup member list.
    e.g.
    • referenced a non-exists IngressClass
    • have malformed GroupName like my-xx#/e
  2. such Ingress's rule will also be cleaned up from ALBs and finalizer for that IngressGroup will be removed.

Why would we want such change?

  1. without this change, a single incorrectly configured Ingress will prevent all IngressGroup to reconcile.
  2. this change make sense since if an existing Ingress changed to be incorrectly configured for its IngressClass or IngressGroup, it shouldn't belong to any IngressGroup.

Test done

  1. change one Ingress(within IngressGroup) to have invalid groupName(my-group-2#)

    • The rules for this Ingress is removed from ALB.
    • finalizer of IngressGroup is removed from this Ingress
    • events emitted to Ingress: failed load groupID due to invalid ingress group: groupName must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character
  2. change one Ingress(within IngressGroup) to have non-exists IngressClass

    • The rules for this Ingress is removed from ALB.
    • finalizer of IngressGroup is removed from this Ingress
    • events emitted to Ingress: failed load groupID due to invalid ingress class: IngressClass.networking.k8s.io "my-class-2" not found
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 19, 2020
@M00nF1sh M00nF1sh changed the title ignore incorrectly configured Ingresses when building IngressGroup [WIP]ignore incorrectly configured Ingresses when building IngressGroup Nov 19, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 20, 2020
@codecov-io
Copy link

Codecov Report

Merging #1676 (e9ef999) into main (15066ef) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@ ## main #1676 +/- ## ========================================== + Coverage 46.04% 46.11% +0.07%  ========================================== Files 110 110 Lines 5916 5920 +4 ========================================== + Hits 2724 2730 +6  Misses 2926 2926 + Partials 266 264 -2 
Impacted Files Coverage Δ
pkg/ingress/group_loader.go 88.28% <100.00%> (+2.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15066ef...e9ef999. Read the comment docs.

@M00nF1sh M00nF1sh changed the title [WIP]ignore incorrectly configured Ingresses when building IngressGroup ignore incorrectly configured Ingresses when building IngressGroup Nov 20, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 20, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kishorj, M00nF1sh
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@M00nF1sh M00nF1sh merged commit 2abf77e into kubernetes-sigs:main Nov 20, 2020
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

4 participants