Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

DCOS-54009: Fix dklb picks up Ingress that has kubernetes.io/ingress.class annotation set to nginx #32

Merged
merged 4 commits into from
May 22, 2019

Conversation

sreis
Copy link
Contributor

@sreis sreis commented May 20, 2019

Description

  • Fix DCOS-54009
  • Refactor controllers to make it easier to write unit tests.
  • Add unit tests for IngressController
  • Add unit tests for IsEdgeLBIngress

I made the genericController an interface and created a fakeGenericController so we can inspect what is enqueued by the IngressController (and ServiceController).

Motivation and Context

A user reported that dklb picks up and Ingress that has kubernetes.io/ingress.class annotation set to something other than edgelb. The fix is to check if the ingress has the proper annotation before enqueuing it for processing. To make it easier to support the code going forward I made an effort to refactor the pkg/controllers so we can add unit tests.

@sreis sreis requested review from jimmidyson and bmcustodio May 20, 2019 19:17
@sreis sreis self-assigned this May 20, 2019
Simão Reis added 2 commits May 22, 2019 15:39
@bmcustodio bmcustodio force-pushed the sreis/dcos-54009 branch 2 times, most recently from 5dd2db5 to 5a9705b Compare May 22, 2019 15:41
Simão Reis added 2 commits May 22, 2019 17:18
Fixes DCOS-54009

Signed-off-by: Simão Reis <[email protected]>
@bmcustodio bmcustodio merged commit 1d6a32a into master May 22, 2019
@bmcustodio bmcustodio deleted the sreis/dcos-54009 branch May 22, 2019 16:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants